From 2977f7b9063a8d04584daa4816e64d2e97039a1c Mon Sep 17 00:00:00 2001 From: TayGov Date: Thu, 27 Aug 2020 09:28:05 -0700 Subject: [PATCH 1/2] Fix order bug --- .../payment/starter/managment/BamboraCardServiceImpl.java | 2 +- .../payment/starter/managment/BamboraCardServiceImplTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bambora-payment-starter/src/main/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImpl.java b/src/bambora-payment-starter/src/main/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImpl.java index 8a46071..5d98d5b 100644 --- a/src/bambora-payment-starter/src/main/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImpl.java +++ b/src/bambora-payment-starter/src/main/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImpl.java @@ -49,7 +49,7 @@ private Uri buildRecurringPaymentUrl(RecurringPaymentDetails recurringPaymentDet paramString.append(formatBamboraParam("&", BamboraConstants.PARAM_PPRDIR_RETURN_URL, recurringPaymentDetails.getRedirectURL())); - paramString.append(formatBamboraParam("&", BamboraConstants.PARAM_PPRDIR_ORDER_NUMBER, recurringPaymentDetails.getRedirectURL())); + paramString.append(formatBamboraParam("&", BamboraConstants.PARAM_PPRDIR_ORDER_NUMBER, recurringPaymentDetails.getOrderNumber())); if (operationType.equals(BamboraConstants.OperationTypes.M.toString())) paramString.append(formatBamboraParam("&", BamboraConstants.PARAM_PPRDIR_CUSTOMER_CODE, recurringPaymentDetails.getEndUserId())); diff --git a/src/bambora-payment-starter/src/test/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImplTest.java b/src/bambora-payment-starter/src/test/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImplTest.java index f5faf43..44ace17 100644 --- a/src/bambora-payment-starter/src/test/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImplTest.java +++ b/src/bambora-payment-starter/src/test/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImplTest.java @@ -18,8 +18,8 @@ public class BamboraCardServiceImplTest { private static final String ECHODATA = "ECHODATA"; private static final String REDIRECTURL = "REDIRECTURL"; private static final String END_USER_ID = "123"; - private static final String BAMBORA_CLIENT_URL = "http://localhost?serviceVersion=HOSTEDPROFILE&merchantId=123&trnLanguage=eng&operationType=M&ref1=ECHODATA&trnReturnURL=REDIRECTURL&trnOrderNumber=REDIRECTURL&customerCode=123&hashValue=98C48E9A9C45B99698ED7D2ED7194A91"; - private static final String BAMBORA_NEW_URL = "http://localhost?serviceVersion=HOSTEDPROFILE&merchantId=123&trnLanguage=eng&operationType=N&ref1=ECHODATA&trnReturnURL=REDIRECTURL&trnOrderNumber=REDIRECTURL&hashValue=BB2616ADA96F7C72824835D484F23B9B"; + private static final String BAMBORA_CLIENT_URL = "http://localhost?serviceVersion=HOSTEDPROFILE&merchantId=123&trnLanguage=eng&operationType=M&ref1=ECHODATA&trnReturnURL=REDIRECTURL&trnOrderNumber=ORDERNUM&customerCode=123"; + private static final String BAMBORA_NEW_URL = "localhost?serviceVersion=HOSTEDPROFILE&merchantId=123&trnLanguage=eng&operationType=N&ref1=ECHODATA&trnReturnURL=REDIRECTURL&trnOrderNumber=ORDERNUM"; private BamboraCardServiceImpl sut; From ad3141f2805741ed7cfb3104a2d683f06cf5f88f Mon Sep 17 00:00:00 2001 From: TayGov Date: Thu, 27 Aug 2020 09:32:23 -0700 Subject: [PATCH 2/2] add http back --- .../payment/starter/managment/BamboraCardServiceImplTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bambora-payment-starter/src/test/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImplTest.java b/src/bambora-payment-starter/src/test/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImplTest.java index 44ace17..07ddb79 100644 --- a/src/bambora-payment-starter/src/test/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImplTest.java +++ b/src/bambora-payment-starter/src/test/java/ca/bc/gov/open/bambora/payment/starter/managment/BamboraCardServiceImplTest.java @@ -19,7 +19,7 @@ public class BamboraCardServiceImplTest { private static final String REDIRECTURL = "REDIRECTURL"; private static final String END_USER_ID = "123"; private static final String BAMBORA_CLIENT_URL = "http://localhost?serviceVersion=HOSTEDPROFILE&merchantId=123&trnLanguage=eng&operationType=M&ref1=ECHODATA&trnReturnURL=REDIRECTURL&trnOrderNumber=ORDERNUM&customerCode=123"; - private static final String BAMBORA_NEW_URL = "localhost?serviceVersion=HOSTEDPROFILE&merchantId=123&trnLanguage=eng&operationType=N&ref1=ECHODATA&trnReturnURL=REDIRECTURL&trnOrderNumber=ORDERNUM"; + private static final String BAMBORA_NEW_URL = "http://localhost?serviceVersion=HOSTEDPROFILE&merchantId=123&trnLanguage=eng&operationType=N&ref1=ECHODATA&trnReturnURL=REDIRECTURL&trnOrderNumber=ORDERNUM"; private BamboraCardServiceImpl sut;