iOS : Paypal Error We’re sorry Things don’t appear to be working at the moment

1.2k views Asked by At

I implemented checkout flow and I am getting below error

ios emulator screen shot

Code :

func startCheckout() {
        // Example: Initialize BTAPIClient, if you haven't already
        braintreeClient = BTAPIClient(authorization: clientToken)!
        let payPalDriver = BTPayPalDriver(apiClient: braintreeClient)
        payPalDriver.viewControllerPresentingDelegate = self
        payPalDriver.appSwitchDelegate = self // Optional

        // Specify the transaction amount here. "2.32" is used in this example.
        let request = BTPayPalRequest(amount: "2.32")
        request.currencyCode = "USD" // Optional; see BTPayPalRequest.h for more options

        payPalDriver.requestOneTimePayment(request) { (tokenizedPayPalAccount, error) in
            if let tokenizedPayPalAccount = tokenizedPayPalAccount {
                print("Got a nonce: \(tokenizedPayPalAccount.nonce)")

                // Access additional information
                let email = tokenizedPayPalAccount.email
                let firstName = tokenizedPayPalAccount.firstName
                let lastName = tokenizedPayPalAccount.lastName
                let phone = tokenizedPayPalAccount.phone

                // See BTPostalAddress.h for details
                let billingAddress = tokenizedPayPalAccount.billingAddress
                let shippingAddress = tokenizedPayPalAccount.shippingAddress
            } else if let error = error {
                print("Error here")
                // Handle error here...
            } else {
                print("Buyer cancelled the payment")
                // Buyer canceled payment approval
            }
        }
    }

I following this documentation link

1

There are 1 answers

0
Zeeshan Arif On

Most common reason for this issue is because of configuration in paypal.

You can check your configuration in below link https://docs.woocommerce.com/document/paypal-standard/

This link is for woo-commerce but will help you in your account configuration.