diff --git a/main.go b/main.go index 7d3cf9e..09c39ec 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,7 @@ import ( ) const ( - buildVersion = "1.2.6" + buildVersion = "1.2.7" serviceName = "hardlink" pollingFrequency = 8 * time.Second ) diff --git a/payment/creditcall.go b/payment/creditcall.go index 620345d..05b549c 100644 --- a/payment/creditcall.go +++ b/payment/creditcall.go @@ -155,8 +155,9 @@ func BuildPreauthRedirectURL(result map[string]string) (string, bool) { func BuildSuccessURL(result map[string]string) string { q := url.Values{} - q.Set("CardNumber", hex.EncodeToString([]byte(result[types.PAN_MASKED]))) - q.Set("ExpiryDate", hex.EncodeToString([]byte(result[types.EXPIRY_DATE]))) + q.Set("CardNumber", hex.EncodeToString([]byte(result[types.PanMasked]))) + q.Set("CardType", hex.EncodeToString([]byte(result[types.CardType]))) + q.Set("ExpiryDate", hex.EncodeToString([]byte(result[types.ExpiryDate]))) q.Set("TxnReference", result[types.Reference]) q.Set("CardHash", hex.EncodeToString([]byte(result[types.CardHash]))) q.Set("CardReference", hex.EncodeToString([]byte(result[types.CardReference]))) diff --git a/release notes.md b/release notes.md index de8aaf8..3934ad0 100644 --- a/release notes.md +++ b/release notes.md @@ -2,6 +2,9 @@ builtVersion is a const in main.go +#### 1.2.7 - 13 May 2026 +retrieve CardType from the ChepDNA response + #### 1.2.6 - 20 April 2026 added the second attempt to send the card to the encoder after 6 seconds diff --git a/types/types.go b/types/types.go index 219338c..45b5668 100644 --- a/types/types.go +++ b/types/types.go @@ -39,8 +39,9 @@ const ( ReceiptDataMerchant = "RECEIPT_DATA_MERCHANT" ReceiptDataCardholder = "RECEIPT_DATA_CARDHOLDER" Reference = "REFERENCE" - PAN_MASKED = "PAN_MASKED" - EXPIRY_DATE = "EXPIRY_DATE" + CardType = "CARD_SCHEME_ID" + PanMasked = "PAN_MASKED" + ExpiryDate = "EXPIRY_DATE" TransactionResult = "TRANSACTION_RESULT" TransactionType = "TRANSACTION_TYPE" TransactionState = "TRANSACTION_STATE"