NAXAM / braintree-ios-binding

Xamarin Binding Library - Braintree iOS SDK
Other
8 stars 7 forks source link

Exception consistently thrown attempting to complete a transaction using ApplePay #2

Closed TraceFerrier closed 6 years ago

TraceFerrier commented 6 years ago

After upgrading Naxam.BraintreeApplePay from v4.8.2 to v4.9.0, I'm getting an exception every time I try to complete a braintree payment via ApplePay:

System.MemberAccessException: Cannot create an instance of BraintreeApplePay.BTApplePayCardNonce because it is an abstract class occurred.

This occurs after using PKPaymentAuthorizationViewController to put up the ApplePay UI. In my implementation of the IPKPaymentAuthorizationViewControllerDelegate DidAuthorizePayment method, I call:

        var brainTreeClient = new BTAPIClient(m_paymentDetails.ClientToken);
        var applePayClient = new BTApplePayClient(brainTreeClient);
        applePayClient.TokenizeApplePayPayment(payment, DidAuthorizePaymentComplete);

and then the above exception is thrown before DidAuthorizePaymentComplete is ever called.

This worked without a problem when using v4.8.2.

markgibaud commented 6 years ago

Hi @TraceFerrier Did you ever figure out a workaround for this issue? Am getting exactly the same issue in 4.10.0. Did you just downgrade again?

@tuyen-vuduc any workarounds or fixes available for this issue?

tuyen-vuduc commented 6 years ago

Thanks for reporting. There is a mistake :D.

Plz check back in about 1 hour.

Cheers.

markgibaud commented 6 years ago

Thanks @tuyen-vuduc 👍