Skip to content

Commit

Permalink
Separate endpoints for UAT and order; add currencyCode to order creat…
Browse files Browse the repository at this point in the history
…ion request; refactor switching between US and UK merchants
  • Loading branch information
scannillo committed Oct 29, 2019
1 parent 0ee237d commit 4aac364
Show file tree
Hide file tree
Showing 17 changed files with 350 additions and 260 deletions.
7 changes: 5 additions & 2 deletions .env
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

This file was deleted.

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;
}
}
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;
}
}
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;
}
}
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;
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 4aac364

Please sign in to comment.