Braintree iOS 访问未显示 PayPal
Braintree iOS drop in doesn't show PayPal
我正在尝试在我的 iOS 应用程序中使用 Braintree Dropin UI。
我正在沙盒中进行测试,它工作正常,但只接受卡 - 不接受 PayPal?
我只是在使用 objective 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];
}
您可能错过了添加 LSApplicationQueriesSchemes:
https://developers.braintreepayments.com/guides/client-sdk/setup/ios/v4#register-a-url-type
正如开发者页面所说:
By default, Drop-in only ships with support for cards. You can include additional payment methods by adding their respective pods.
您必须添加这些选项:
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
将此添加到请求中
request.paypalDisabled = false
我正在尝试在我的 iOS 应用程序中使用 Braintree Dropin UI。
我正在沙盒中进行测试,它工作正常,但只接受卡 - 不接受 PayPal?
我只是在使用 objective 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];
}
您可能错过了添加 LSApplicationQueriesSchemes:
https://developers.braintreepayments.com/guides/client-sdk/setup/ios/v4#register-a-url-type
正如开发者页面所说:
By default, Drop-in only ships with support for cards. You can include additional payment methods by adding their respective pods.
您必须添加这些选项:
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
将此添加到请求中
request.paypalDisabled = false