diff --git a/ios/RCTBraintree/RCTBraintree.m b/ios/RCTBraintree/RCTBraintree.m index 6d5f3f18..26e0faf2 100644 --- a/ios/RCTBraintree/RCTBraintree.m +++ b/ios/RCTBraintree/RCTBraintree.m @@ -79,9 +79,6 @@ - (instancetype)init if (tintColor) dropInViewController.view.tintColor = [RCTConvert UIColor:tintColor]; if (bgColor) dropInViewController.view.backgroundColor = [RCTConvert UIColor:bgColor]; - if (title) [dropInViewController.paymentRequest setTitle:title]; - if (description) [dropInViewController.paymentRequest setDescription:description]; - if (amount) [dropInViewController.paymentRequest setAmount:amount]; dropInViewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(userDidCancelPayment)]; @@ -99,6 +96,10 @@ - (instancetype)init dropInViewController.paymentRequest = paymentRequest; } + if (title) [dropInViewController.paymentRequest setSummaryTitle:title]; + if (description) [dropInViewController.paymentRequest setSummaryDescription:description]; + if (amount) [dropInViewController.paymentRequest setDisplayAmount:amount]; + [self.reactRoot presentViewController:navigationController animated:YES completion:nil]; }); }