我正在尝试在我的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];
}
Run Code Online (Sandbox Code Playgroud)
小智 10
正如开发者页面所说:
默认情况下,Drop-in仅附带支持卡.您可以通过添加各自的广告连播方式来添加其他付款方式.
您必须添加以下选项:
Ruby
pod 'Braintree/PayPal'
pod 'Braintree/Venmo'
pod 'Braintree/Apple-Pay'
pod 'Braintree/3D-Secure'
Run Code Online (Sandbox Code Playgroud)
https://developers.braintreepayments.com/guides/drop-in/ios/v4#pods
| 归档时间: |
|
| 查看次数: |
1380 次 |
| 最近记录: |