Skip to content

Commit

Permalink
adding paypal control, fixing disable card option for android
Browse files Browse the repository at this point in the history
  • Loading branch information
GFean committed Apr 6, 2021
1 parent 16a1899 commit 5582c8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ public void show(final ReadableMap options, final Promise promise) {
.shippingAddressRequired(true).shippingAddressEditable(true);
dropInRequest.paypalRequest(payPalPaymentRequest);
}
if(options.hasKey("cardDisabled")) {
if(!options.getBoolean("payPal")){
//disable paypal
dropInRequest.disablePayPal();
}

if(options.getBoolean("cardDisabled")) {
dropInRequest.disableCard();
}
if (options.hasKey("threeDSecure")) {
Expand Down
4 changes: 4 additions & 0 deletions ios/RNBraintreeDropIn.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ - (dispatch_queue_t)methodQueue
request.vaultManager = YES;
}

if(![options[@"payPal"] boolValue]){ //disable paypal
request.paypalDisabled = YES;
}

if([options[@"cardDisabled"] boolValue]){
request.cardDisabled = YES;
}
Expand Down

0 comments on commit 5582c8f

Please sign in to comment.