-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate endpoints for UAT and order; add currencyCode to order creat…
…ion request; refactor switching between US and UK merchants
- Loading branch information
scannillo
committed
Oct 29, 2019
1 parent
0ee237d
commit 4aac364
Showing
17 changed files
with
350 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
US_AUTH=Basic QVE4eFlkSnh6SndRNmstMzV5dTFTdVpkWmpfcFVrR1lXNmVKZmhVbDkxRlhNLVRWUEF0TDNFWlBNSTdYVGQ4dHZ1aEtzb2pCRVRPbDNsWG46RU95WXI0d0ZzekJoYkxwQzRPLVkybTFYdWQ3NXVkVmJKeFUwbndLZjV3NTFpMUl6V3R4XzJnZjVWR3FKeVRJTDRsdnRaT1ZaRGstZXpXcXA= | ||
UK_AUTH=Basic QVMwVURWUG5PeEpVWjJZbDROY294TWVlMEVRUjFoLUVNMlBhb216b3c0OTAxaHVOM1p1VGVUNHg3QXFiN2VCTnh2THdIVjhTc2gwYmVxNXY6RUVIc0xuWml0XzdBWDJRazVlZk9adHZ6NWJrNzVYMnNadktmVDlfSzNmbWliRlYxeDNaamtpMTRpV1BkTUR3dFYySnZqcnotRjE3a3p6dlM= | ||
US_CLIENT_ID= AQ8xYdJxzJwQ6k-35yu1SuZdZj_pUkGYW6eJfhUl91FXM-TVPAtL3EZPMI7XTd8tvuhKsojBETOl3lXn | ||
US_CLIENT_SECRET= EOyYr4wFszBhbLpC4O-Y2m1Xud75udVbJxU0nwKf5w51i1IzWtx_2gf5VGqJyTIL4lvtZOVZDk-ezWqp | ||
|
||
GB_CLIENT_ID= AS0UDVPnOxJUZ2Yl4NcoxMee0EQR1h-EM2Paomzow4901huN3ZuTeT4x7Aqb7eBNxvLwHV8Ssh0beq5v | ||
GB_CLIENT_SECRET= EEHsLnZit_7AX2Qk5efOZtvz5bk75X2sZvKfT9_K3fmibFV1x3Zjki14iWPdMDwtV2Jvjrz-F17kzzvS |
192 changes: 0 additions & 192 deletions
192
src/main/java/com/braintree/braintreep4psamplemerchant/BTRestController.java
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
src/main/java/com/braintree/braintreep4psamplemerchant/CreateOrder/Amount.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.braintree.braintreep4psamplemerchant.CreateOrder; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class Amount { | ||
|
||
private String currencyCode; | ||
private String value; | ||
|
||
@JsonProperty("currency_code") | ||
public String getCurrencyCode() { | ||
return currencyCode; | ||
} | ||
|
||
@JsonProperty("currency_code") | ||
public void setCurrencyCode(String currencyCode) { | ||
this.currencyCode = currencyCode; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/com/braintree/braintreep4psamplemerchant/CreateOrder/CreateOrderRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.braintree.braintreep4psamplemerchant.CreateOrder; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.List; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class CreateOrderRequest { | ||
private String intent; | ||
private List<PurchaseUnit> purchaseUnits; | ||
private Payee payee; | ||
|
||
public String getIntent() { | ||
return intent; | ||
} | ||
|
||
public void setIntent(String intent) { | ||
this.intent = intent; | ||
} | ||
|
||
@JsonProperty("purchase_units") | ||
public List<PurchaseUnit> getPurchaseUnits() { | ||
return purchaseUnits; | ||
} | ||
|
||
@JsonProperty("purchase_units") | ||
public void setPurchaseUnits(List<PurchaseUnit> purchaseUnits) { | ||
this.purchaseUnits = purchaseUnits; | ||
} | ||
|
||
public Payee getPayee() { | ||
return payee; | ||
} | ||
|
||
public void setPayee(Payee payee) { | ||
this.payee = payee; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/braintree/braintreep4psamplemerchant/CreateOrder/Payee.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.braintree.braintreep4psamplemerchant.CreateOrder; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
class Payee { | ||
|
||
private String emailAddress; | ||
|
||
@JsonProperty("email_address") | ||
public String getEmailAddress() { | ||
return emailAddress; | ||
} | ||
|
||
@JsonProperty("email_address") | ||
public void setEmailAddress(String emailAddress) { | ||
this.emailAddress = emailAddress; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/braintree/braintreep4psamplemerchant/CreateOrder/PurchaseUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.braintree.braintreep4psamplemerchant.CreateOrder; | ||
|
||
public class PurchaseUnit { | ||
|
||
private Amount amount; | ||
|
||
public Amount getAmount() { | ||
return amount; | ||
} | ||
|
||
public void setAmount(Amount amount) { | ||
this.amount = amount; | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
src/main/java/com/braintree/braintreep4psamplemerchant/OrderCaptureInfo.java
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
src/main/java/com/braintree/braintreep4psamplemerchant/OrderValidationInfo.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.