Skip to content

Commit

Permalink
Add logging for partner country
Browse files Browse the repository at this point in the history
  • Loading branch information
scannillo committed Oct 28, 2019
1 parent 271375d commit 0ee237d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/main/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ server.port=${PORT:5000}
spring.profiles.active=production
logging.level.org.springframework=INFO

token=${TOKEN}
authorization.us=${US_AUTH}
authorization.uk=${UK_AUTH}
url=https://api.ppcpn.stage.paypal.com
3 changes: 2 additions & 1 deletion bin/test/application-test.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
spring.profiles.active=test
token=test-token
authorization.us=test-us-auth
authorization.uk=test-uk-auth
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ OrderValidationInfo getOrderValidationInfo(@RequestParam(value = "payeeEmail", r
System.out.println("\nREQUEST to /v2/checkout/orders:");
System.out.println("Headers: " + orderHeaders.toString());
System.out.println("Intent: " + intent);
System.out.println("Partner country: " + partnerCountry);
System.out.println("Payee Email: " + payeeEmail);
System.out.println("Amount: " + amount);

Expand All @@ -178,6 +179,7 @@ OrderCaptureInfo processOrder(@PathVariable String orderId,
System.out.println("\nREQUEST to /v2/checkout/orders/" + orderId + "/" + intent.toLowerCase());
System.out.println("Intent: " + intent.toLowerCase());
System.out.println("Headers: " + orderHeaders.toString());
System.out.println("Partner country: " + partnerCountry);

HttpEntity<String> orderRequest = new HttpEntity<>(null, orderHeaders);
ResponseEntity<Order> orderResponse = restTemplate.postForEntity(url + "/v2/checkout/orders/" + orderId + "/" + intent.toLowerCase(), orderRequest, Order.class);
Expand Down

0 comments on commit 0ee237d

Please sign in to comment.