Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to do payment via credit card or debit card swift #32

Open
dmaulikr opened this issue Jul 16, 2023 · 1 comment
Open

Not able to do payment via credit card or debit card swift #32

dmaulikr opened this issue Jul 16, 2023 · 1 comment

Comments

@dmaulikr
Copy link

I have been using this SDK in my project and it was working perfectly like I was able to do payments with all available options but recently I have started encountring an issue with card option it's getting failed every time but other modes are working perfectly.

Here's the code I have code:

`if let myParams = response["parameters"] as? JSONDictionary {

        let callback1 = "\(callbackCheckSumURL)\(transactionId)"
        var orderDict : [String : AnyObject] = [:]
        if let userInfo = myParams["userInfo"] as? JSONDictionary {
            orderDict["custId"] = userInfo["custId"] as AnyObject
        }
        if let txn = myParams["txnAmount"] as? JSONDictionary {
            orderDict["txnAmount"] = txn["value"] as AnyObject
            if let amt = txn["value"] as? String {
                self.amount = amt
            }
        }
        orderDict["ORDER_ID"] = myParams["orderId"] as AnyObject
        orderDict["CALLBACK_URL"] = myParams["callbackUrl"] as AnyObject
        orderDict["MID"] = myParams["mid"] as AnyObject
        orderDict["WEBSITE"] = myParams["websiteName"] as AnyObject
        orderDict["MOBILE_NO"] = myParams["MOBILE_NO"] as AnyObject
        orderDict["CHANNEL_ID"] = myParams["CHANNEL_ID"] as AnyObject
        orderDict["INDUSTRY_TYPE_ID"] = myParams["INDUSTRY_TYPE_ID"] as AnyObject
        orderDict["EMAIL"] = myParams["EMAIL"] as AnyObject
        orderDict["CHECKSUMHASH"] = checkSumId as AnyObject

        if let oID = myParams["orderId"] as? String {
            self.orderId = oID
        }
        if let cURL = myParams["callbackUrl"] as? String {
            self.callBackURL = cURL
        }
        if let txnToken = response["txtToken"] as? String {
            self.txnToken = txnToken
        }
        if let mid = myParams["mid"] as? String {
            self.merchantId = mid
        }
        
        print("\norderDict:\(orderDict)\n")
        
        self.appInvoke.openPaytm(merchantId: self.merchantId, orderId: self.orderId, txnToken: self.txnToken, amount: self.amount, callbackUrl: self.callBackURL, delegate: self, environment: .production, urlScheme: "")
    }`

This is the only code I am using to invoke it and it was working perfectly and still it's working but only excluding card payment mode. I am getting error as below:

["response": "{\"STATUS\":\"TXN_FAILURE\",\"CHECKSUMHASH\":\"vyYy1iQGO9fvMtXHxy98yGx53vmrZt\\/8y5REMFRcfdu8Q\\/ozIgNiSIZgIXVlGDmIsu7ULU5tLu00ZASiO2vW4R4zeJvkMrHAhPEFXseEwZU=\",\"TXNAMOUNT\":\"14.00\",\"RESPCODE\":\"227\",\"BANKNAME\":\"RBL Bank\",\"GATEWAYNAME\":\"HDFC\",\"RESPMSG\":\"Your payment has been declined by your bank. Please try again or use a different option to complete the payment.\",\"TXNDATE\":\"2023-07-16 12:51:21.0\",\"ORDERID\":\"c365e9b1-8a0c-4422-8c24-49967e836b5b\",\"TXNID\":\"20230716010840000887319611727572834\",\"MID\":\"Corwhi93423578092957\",\"CURRENCY\":\"INR\",\"PAYMENTMODE\":\"CC\",\"BANKTXNID\":\"\"}", "statusReason": "error", "trimmedurl": "paytmCorwhi93423578092957://payment", "orderId": "c365e9b1-8a0c-4422-8c24-49967e836b5b", "mid": "Corwhi93423578092957", "txnToken": "cafce3b9db884b2096ce9dfcfc43112a1689492080982", "status": "PYTM_105"]

Now, I am not using only one card here I have tried with almost 10 different cards with different banks but they all are giving same error and those cards are working perfectly fine with all kind of transactions that I am doing for any shopping or any payments outside.

@rahul2bisht
Copy link
Collaborator

Hi,

Please raise a mail on payments.helpdesk@paytm.com with details consisting of your mid and sample orderid for the team to check the issue in detail with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants