I tried to implement Braintree iOS v4 in my app and followed steps that given at
https://developers.braintreepayments.com/guides/drop-in/ios/v4
But I got following error when I integrated using this steps.
I want to add drop in UI when I clicked on purchase button.
I used the following code to implement it.
(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];
}
Thanks, Hiten