Skip to content

Commit 09399d8

Browse files
OctopusDeploy release: 12.0.1
1 parent 076494f commit 09399d8

File tree

6 files changed

+119
-10
lines changed

6 files changed

+119
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22

3-
## Latest Version - V12.0.0 (07/25/2024)
3+
## Latest Version - V12.0.1 (07/30/2024)
4+
### Bug Fixes
5+
- [VAPS]: VAPS 8583 Currency Code - Issue 10325
6+
- [Portico] : Added capture condition for Debit & Credit EMV transaction - Issue 10326
7+
8+
## V12.0.0 (07/25/2024)
49
### Enhancements
510
- [DiamondCloud] Add support for Diamond Cloud provider payment terminals.
611
- [GP-API] Add "/payers" endpoint

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.heartlandpaymentsystems</groupId>
55
<artifactId>globalpayments-sdk</artifactId>
6-
<version>12.0.0</version>
6+
<version>12.0.1</version>
77
<packaging>jar</packaging>
88
<name>Heartland &amp; Global Payments SDK</name>
99
<description>API for processing payments through Global Payments</description>

src/main/java/com/global/api/gateways/PorticoConnector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ public Transaction manageTransaction(ManagementBuilder builder) throws ApiExcept
535535
// Transaction ID
536536
et.subElement(root, "GatewayTxnId", builder.getTransactionId());
537537

538-
// reversal
539-
if (type.equals(TransactionType.Reversal) || ((paymentType != null) && paymentType.equals(PaymentMethodType.ACH))) {
538+
// reversal & Capture
539+
if (type.equals(TransactionType.Reversal) || type.equals(TransactionType.Capture) || ((paymentType != null) && paymentType.equals(PaymentMethodType.ACH))) {
540540
// client transaction id
541541
et.subElement(root, "ClientTxnId", builder.getClientTransactionId());
542542

src/main/java/com/global/api/gateways/VapsConnector.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,11 @@ else if(reference.getOriginalPaymentMethod() instanceof Credit) {
10031003
}
10041004
// DE 50: Currency Code, Reconciliation - n3
10051005
if(transactionType.equals(TransactionType.BatchClose) && !currencyCode.equals(Iso4217_CurrencyCode.USD)) {
1006-
request.set(DataElementId.DE_050,currencyCode.getValue());
1006+
if(!StringUtils.isNullOrEmpty(builder.getCurrency())) {
1007+
if(builder.getCurrency().equalsIgnoreCase("CAD")) {
1008+
request.set(DataElementId.DE_050, Iso4217_CurrencyCode.CAD);
1009+
}
1010+
}
10071011
}
10081012

10091013
// DE 52: Personal Identification Number (PIN)
@@ -1251,6 +1255,7 @@ public Transaction resubmitTransaction(ResubmitBuilder builder) throws ApiExcept
12511255
throw new BuilderException("The transaction token cannot be null for resubmitted transactions.");
12521256
}
12531257
String currency = builder.getCurrency();
1258+
12541259
// get the original request/implied capture
12551260
NetworkMessage request = this.decodeRequest(builder.getTransactionToken());
12561261
switch(builder.getTransactionType()) {
@@ -1260,8 +1265,10 @@ public Transaction resubmitTransaction(ResubmitBuilder builder) throws ApiExcept
12601265
if(builder.isForceToHost()) {
12611266
request.set(DataElementId.DE_025, DE25_MessageReasonCode.Forced_AuthCapture);
12621267
}
1263-
if(currency != null) {
1264-
request.set(DataElementId.DE_050, currency);
1268+
if(!StringUtils.isNullOrEmpty(currency)) {
1269+
if(currency.equalsIgnoreCase("CAD")) {
1270+
request.set(DataElementId.DE_050, Iso4217_CurrencyCode.CAD);
1271+
}
12651272
}
12661273
//DE 28
12671274
request.set(DataElementId.DE_028,DateTime.now().toString("yyMMdd"));
@@ -1329,8 +1336,10 @@ public Transaction resubmitTransaction(ResubmitBuilder builder) throws ApiExcept
13291336
issuerData.add(CardIssuerEntryTag.NTS_System, builder.getNtsData().toString());
13301337
request.set(DataElementId.DE_062, issuerData);
13311338
}
1332-
if(currency!=null) {
1333-
request.set(DataElementId.DE_050, currency);
1339+
if(!StringUtils.isNullOrEmpty(currency)) {
1340+
if(currency.equalsIgnoreCase("CAD")) {
1341+
request.set(DataElementId.DE_050, Iso4217_CurrencyCode.CAD);
1342+
}
13341343
}
13351344
// DE 127
13361345
if (builder.getPaymentMethod() instanceof Debit || builder.getPaymentMethod() instanceof EBT) {

src/test/java/com/global/api/tests/network/vaps/VapsBatchTests.java

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public VapsBatchTests() throws ApiException {
7272
config.setPrimaryEndpoint("test.7eleven.secureexchange.net");
7373
config.setSecondaryPort(15031);
7474
config.setCompanyId("0044");
75-
config.setTerminalId("0000912197711");
75+
config.setTerminalId("0007999999911");
7676
config.setUniqueDeviceId("0001");
7777
config.setMerchantType("5541");
7878
config.setAcceptorConfig(acceptorConfig);
@@ -396,7 +396,77 @@ public void test10289_044_retransmit_data_collect_partialAmount_withNetworkServi
396396

397397
assertNotNull(resubmitBatch);
398398
assertEquals(resubmitBatch.getResponseMessage(), "580", resubmitBatch.getResponseCode());
399+
}
400+
@Test
401+
public void test_currency_code_CAD_retransmit_batch() throws ApiException {
402+
configName = "NoBatch";
403+
CreditTrackData track = TestCards.MasterCardSwipe();
404+
405+
Transaction dataCollect = track.charge(new BigDecimal(11.51))
406+
.withCurrency("CAD")
407+
.execute();
408+
assertNotNull(dataCollect);
409+
assertEquals(dataCollect.getResponseMessage(), "000", dataCollect.getResponseCode());
410+
assertNotNull(dataCollect.getTransactionToken());
411+
412+
413+
Transaction batchClose = BatchService.closeBatch(
414+
batchProvider.getBatchNumber(),
415+
batchProvider.getSequenceNumber(),
416+
new BigDecimal(11.51),
417+
BigDecimal.ZERO
418+
)
419+
.execute(configName);
420+
assertNotNull(batchClose);
421+
422+
423+
BatchSummary summary = batchClose.getBatchSummary();
424+
assertNotNull(summary);
425+
assertNotNull(summary.getTransactionToken());
426+
427+
Transaction resubmitBatch = NetworkService.resubmitBatchClose(batchClose.getTransactionToken())
428+
.withCurrency("CAD")
429+
.withForceToHost(true)
430+
.execute();
431+
432+
assertNotNull(resubmitBatch);
433+
assertEquals(resubmitBatch.getResponseMessage(), "580", resubmitBatch.getResponseCode());
434+
}
435+
@Test
436+
public void test_currency_code_USD_retransmit_batch() throws ApiException {
437+
configName = "NoBatch";
438+
CreditTrackData track = TestCards.MasterCardSwipe();
439+
440+
Transaction dataCollect = track.charge(new BigDecimal(11.51))
441+
.withCurrency("USD")
442+
.withAllowPartialAuth(true)
443+
.execute();
444+
assertNotNull(dataCollect);
445+
assertEquals(dataCollect.getResponseMessage(), "000", dataCollect.getResponseCode());
446+
assertNotNull(dataCollect.getTransactionToken());
447+
448+
449+
Transaction batchClose = BatchService.closeBatch(
450+
batchProvider.getBatchNumber(),
451+
batchProvider.getSequenceNumber(),
452+
new BigDecimal(11.51),
453+
BigDecimal.ZERO
454+
)
455+
.execute(configName);
456+
assertNotNull(batchClose);
457+
458+
459+
BatchSummary summary = batchClose.getBatchSummary();
460+
assertNotNull(summary);
461+
assertNotNull(summary.getTransactionToken());
399462

463+
Transaction resubmitBatch = NetworkService.resubmitBatchClose(batchClose.getTransactionToken())
464+
.withCurrency("USD")
465+
.withForceToHost(true)
466+
.execute();
467+
468+
assertNotNull(resubmitBatch);
469+
assertEquals(resubmitBatch.getResponseMessage(), "580", resubmitBatch.getResponseCode());
400470

401471
}
402472
}

src/test/java/com/global/api/tests/portico/PorticoCreditTests.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,5 +869,30 @@ public void creditAuthorizationWithCOF_categoryIndicator() throws ApiException {
869869
assertNotNull(capture);
870870
assertEquals("00", capture.getResponseCode());
871871
}
872+
873+
@Test
874+
public void credit_AddtoBatch() throws ApiException {
875+
PorticoConfig config = new PorticoConfig();
876+
config.setSecretApiKey("skapi_cert_MTeSAQAfG1UA9qQDrzl-kz4toXvARyieptFwSKP24w");
877+
config.setServiceUrl("https://cert.api2.heartlandportico.com");
878+
config.setEnableLogging(true);
879+
880+
ServicesContainer.configureService(config);
881+
882+
Transaction response = track.authorize(new BigDecimal(14))
883+
.withCurrency("USD")
884+
.withAllowDuplicates(true)
885+
.withTagData("9F1A0208409C0150950500000088009F0702FF009F03060000000000009F2701809F3901059F0D05B850AC88009F350121500B56697361204372656469745F3401019F0802008C9F120B56697361204372656469749F0E0500000000009F360200759F40057E0000A0019F0902008C9F0F05B870BC98009F370425D254AC5F280208409F33036028C882023C004F07A00000000310109F4104000000899F0607A00000000310105F2A0208409A031911229F02060000000001009F2608D4EC434B9C1CBB358407A00000000310109F100706010A03A088069B02E8009F34031E0300")
886+
.execute();
887+
assertNotNull(response);
888+
assertEquals("00", response.getResponseCode());
889+
890+
Transaction captureResponse = response.capture(new BigDecimal(14))
891+
.withTagData(response.getEmvIssuerResponse())
892+
.withChipCondition(EmvChipCondition.ChipFailPreviousSuccess)
893+
.execute();
894+
assertNotNull(captureResponse);
895+
assertEquals("00", captureResponse.getResponseCode());
896+
}
872897
}
873898

0 commit comments

Comments
 (0)