Braintree iOS下载并没有显示PayPal

时间:2017-04-11 15:15:28

标签: ios braintree

我正在尝试在我的iOS应用中使用Braintree Dropin UI。

我在沙盒中测试,它工作正常,但只接受卡 - 而不是PayPal?

我只是使用提供的目标C代码。

文档说Add the Drop-in UI with a few lines of code to get a full-featured checkout with credit card and PayPal payments. - 但我的PayPal按钮在哪里?

- (void)showDropIn:(NSString *)clientTokenOrTokenizationKey {
BTDropInRequest *request = [[BTDropInRequest alloc] init];
BTDropInController *dropIn = [[BTDropInController alloc] initWithAuthorization:clientTokenOrTokenizationKey request:request handler:^(BTDropInController * _Nonnull controller, BTDropInResult * _Nullable result, NSError * _Nullable error) {

    if (error != nil) {
        NSLog(@"ERROR");
    } else if (result.cancelled) {
        NSLog(@"CANCELLED");
    } else {
        // Use the BTDropInResult properties to update your UI
        // result.paymentOptionType
        // result.paymentMethod
        // result.paymentIcon
        // result.paymentDescription
    }
}];
[self presentViewController:dropIn animated:YES completion:nil];
}

iOS Screenshot (o

3 个答案:

答案 0 :(得分:10)

正如开发者页面所说:

  

默认情况下,Drop-in仅附带支持卡片。您可以通过添加各自的广告连播方式来添加其他付款方式。

您必须添加以下选项:

    Ruby
pod 'Braintree/PayPal'
pod 'Braintree/Venmo'
pod 'Braintree/Apple-Pay'
pod 'Braintree/3D-Secure'

https://developers.braintreepayments.com/guides/drop-in/ios/v4#pods

答案 1 :(得分:1)

答案 2 :(得分:0)

将此添加到请求中

request.paypalDisabled = false