Paypal Braintree integration error in Ionic Cordova: Untrusted SSL certificate chain

I am facing a problem on integrating Paypal payment through Braintree SDK(sandbox) in iOS using Ionic Cordova. I’m currently using the cordova-plugin-braintree": "^0.5.0" for the integration. There were no error upon building but I’m having an error returning on xcode simulator when I run the app.

Here’s the error it returned:

2020-08-06 11:13:43.519 TestApp[14370:510078] Untrusted SSL certificate chain. Refusing to communicate with PayPal servers.
2020-08-06 11:14:42.581040+0800 TestApp[14370:512020] Connection 9: received failure notification
2020-08-06 11:14:40.372864+0800 TestApp[14370:512187] Connection 2: strict TLS Trust evaluation failed(-9802)
2020-08-06 11:14:40.373839+0800 TestApp[14370:512187] Connection 2: TLS Trust encountered error 3:-9802
2020-08-06 11:14:42.582533+0800 TestApp[14370:512020] Connection 9: failed to connect 3:-9858, reason -1
2020-08-06 11:14:42.582903+0800 TestApp[14370:512020] Connection 9: encountered error(3:-9858)
2020-08-06 11:14:42.093680+0800 TestApp[14370:512020] [BoringSSL] boringssl_session_handshake_error_print(111) [C8.1:2][0x7fe27ff09ac0] 140610784112104:error:1000042e:SSL
2020-08-06 11:14:42.590881+0800 TestApp[14370:512020] Task <EB8A44D8-C0BA-4A3B-8C9B-7F524D38799A>.<3> HTTP load failed, 0/0 bytes (error code: -1200 [3:-9858])
2020-08-06 11:14:42.592 TestApp[14370:510078] [BraintreeSDK] WARNING Failed to send analytics event. Remote configuration fetch failed. An SSL error has occurred and a secure connection to the server cannot be made

While it returns this error on the app:

I already tried whitelisting domains and embedding the required frameworks in xcode.

I also already edited the info.plist in xcode like this one.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
    <string>You can take photos</string>

Here’s my implementation using angular but I think the error is not coming from here:

import { Braintree, PaymentUIOptions, PaymentUIResult } from '@ionic-native/braintree/ngx';
paynow() {
        .then(() => this.braintree.presentDropInPaymentUI(this.paymentOptions))
        .then((result: PaymentUIResult) => {
            if (result.userCancelled) {
                console.log('User cancelled payment dialog.');
            } else {
                console.log('User successfully completed payment!');
                console.log('Payment Nonce: ' + result.nonce);
                console.log('Payment Result.', result);
        .catch((error: string) => console.error(error));

I’m testing this app on this environment:

  • Xcode v11
  • iPhone x (iOS 13)
  • Ionic v6.10.1
  • Cordova v9.0.0
  • Cordova-ios v5.1.1

Been stuck on this problem for a long time now. Hope you can help me on this one. Thanks in advance!

Hey there,
this old Braintree Plugin is maintained anymore and don’t uses the latest mobile SDK’s.
I created a new one, please read this to get known how to test it and support me in developing: