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

Apple Pay Error "20030", "Format error" #157

Closed
maulikm235 opened this issue May 23, 2022 · 2 comments
Closed

Apple Pay Error "20030", "Format error" #157

maulikm235 opened this issue May 23, 2022 · 2 comments

Comments

@maulikm235
Copy link

maulikm235 commented May 23, 2022

"Format error" event not using capabilityEMV
when I try to pay using apple its shows the error "Format error".

SDK version
Frames (3.3.0)

Screenshots
Screenshot 2022-05-23 at 11 42 39 AM

Code
`hi
func btnApplePayTapped(_ currency : String = "SAR",_ countryCode : String = "SR",money : Double,subtotal : Double? = nil,deliveryCharge : Double? = nil,VC : UIViewController, completion : ((String,Data)->())?){

    let paymentNetwork = [PKPaymentNetwork.amex , .discover, .visa, .masterCard, .mada]
    
    if PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: paymentNetwork){
        self.paymentRequest.currencyCode            = currency.uppercased()
        self.paymentRequest.countryCode             = countryCode.uppercased()
        self.paymentRequest.merchantIdentifier      = "merchant.checkoutProductionNew.test"
        self.paymentRequest.supportedNetworks       = paymentNetwork
        self.paymentRequest.merchantCapabilities    = [.capability3DS]
        self.paymentRequest.requiredShippingContactFields = [.emailAddress,.name,.phoneNumber,.postalAddress]
        self.paymentRequest.paymentSummaryItems = []
        //add subtotal
        if let subtotal = subtotal{
            self.paymentRequest.paymentSummaryItems.append(PKPaymentSummaryItem(label: "subtotal", amount: NSDecimalNumber(floatLiteral: subtotal), type: .final))
        }
        //add delivery charge
        if let deliveryCharge = deliveryCharge{
            self.paymentRequest.paymentSummaryItems.append(PKPaymentSummaryItem(label: "delivery charge", amount: NSDecimalNumber(floatLiteral: deliveryCharge), type: .final))
        }
        //add final
        self.paymentRequest.paymentSummaryItems.append(PKPaymentSummaryItem(label: "Test Inc.", amount: NSDecimalNumber(floatLiteral: money), type: .final))
        
        
        if let applePayVC = PKPaymentAuthorizationViewController(paymentRequest: self.paymentRequest){
            applePayVC.delegate = self
            VC.present(applePayVC, animated: true, completion: nil)
        }else{
            GFunctions.shared.showSnackBar("Error to open pay page")
        }
        
        self.complitionDelegate = { (applePayTransectionID, tokenData) in
            completion?(applePayTransectionID,tokenData)
        }
        
    }else{
        PKPassLibrary().openPaymentSetup()
        GFunctions.shared.showSnackBar("Please set-up card for Apple Pay")
    }
}`
@ehab-al-cko
Copy link
Contributor

Hi @maulikm235
Response code 20030
Description: The payment failed due to a technical issue. Please try again with the same card, or use a different card.

Please use new Frames release 4.0.1 and try again same case

@melting-snowman
Copy link
Contributor

Closing this due to lack of activity and multiple releases since. Please let us know if we can help further.

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

3 participants