How do I test Braintree + Apple Pay on a real device?

后端 未结 3 1258
孤街浪徒
孤街浪徒 2021-01-12 17:15

I am developing an app using Apple Pay for a US Client from outside the US. I am using Braintree + Apple Pay. We support real credit cards to Passbook, but we can\'t verify

3条回答
  •  不要未来只要你来
    2021-01-12 17:44

    In version 3.9.3 of the BraintreeSDK, I found a bug in BTClientTokenApplePayPaymentNetworksValueTransformer in which there is no case for Discover Card when deserializing BTConfiguration.applePaySupportedNetworks. This results in a PKPaymentRequest with an array containing an instance of NSNull in its supportedNetworks. Passing that array to PKPaymentAuthorizationViewController.canMakePaymentsUsingNetworks results in a NO. This method contains the bug:

    - (id)transformedValue:(id)value {
        if ([PKPaymentRequest class]) {
            if ([value isEqualToString:@"amex"]) {
                return PKPaymentNetworkAmex;
            } else if ([value isEqualToString:@"visa"]) {
                return PKPaymentNetworkVisa;
            } else if ([value isEqualToString:@"mastercard"]) {
                return PKPaymentNetworkMasterCard;
            }
        }
    
        return [NSNull null];
    }
    

提交回复
热议问题