braintree-web-drop-in
braintree-web-drop-in copied to clipboard
feat: implemented a param to specify any vaulted payment method type that they want to block.
Summary
~~Implemented vaultedPaypalAccountsDisabled
argument.
If set to true, it force to disable paypal vault.~~
Implemented vaultedPaymentMethodTypesThatShouldBeHidden
.
It accepts an array of paymentMethodTypes (e.g CreditCard, PayPalAccount) and specify any vaulted payment method type that want to block. Important: ApplePayCard, VenmoAccount, AndroidPayCard are always blocked.
This is very useful when you have two different payment flows and on one it is not possible to enable paypal vaulting (due to legal restriction for example).
Checklist
- [ ] Added a changelog entry
Authors
List GitHub usernames for everyone who contributed to this pull request.
I think this should be done more holistically and allow the merchant to specify any vaulted payment method type that they want to block.
Also, I think it should be a parameter under vaultManager
, not a top level parameter.
@crookedneighbor good point, I'm going to implement your suggestions!
@crookedneighbor "I think it should be a parameter under vaultManager", could you explain to me where I would add the parameter?
I didn't find in this project :/
My mistake the vaultManager
option is a boolean
, not an object: https://github.com/braintree/braintree-web-drop-in/blob/bf05e9a9ad10a7b22ccc80fa2e86561d16d7ed72/src/index.js#L269
Making it a top level object with the payment methods to hide as the keys should be fine.
@crookedneighbor Implemented the param if you want to take a look!
Made a couple of adjustments, added a changelog entry and rebased. I force pushed the changes, so if you have this checked out locally, you'll need to fetch the changes and reset to the remote branch if you need to make any changes.
Hello @crookedneighbor, any news?
Perfecto buen trabajo
Any news, could we merge it please? 🙏 🙏
👍👍
Hello @crookedneighbor, any news?
@ale-grosselle could you please rename vaultedPaymentMethodTypesThatShouldBeHidden
to hiddenVaultedPaymentMethodTypes
? and resolve conflicts to merge your PR. Thanks
Hi @armandodlvr done!
Summary
~~Implemented
vaultedPaypalAccountsDisabled
argument.
If set to true, it force to disable paypal vault.~~Implemented
vaultedPaymentMethodTypesThatShouldBeHidden
. It accepts an array of paymentMethodTypes (e.g CreditCard, PayPalAccount) and specify any vaulted payment method type that want to block. Important: ApplePayCard, VenmoAccount, AndroidPayCard are always blocked.This is very useful when you have two different payment flows and on one it is not possible to enable paypal vaulting (due to legal restriction for example).
Checklist
- [x] Added a changelog entry
Authors
List GitHub usernames for everyone who contributed to this pull request.
@ale-grosselle the changelog was removed. could you add it?... thanks
hiddenVaultedPaymentMethodTypes
Done!
@ale-grosselle the changelog was removed. could you add it?... thanks
@armandodlvr is it okay now?
vaultedPaymentMethodTypesThatShouldBeHidden
Hello @cgdibble @crookedneighbor, is possible to merge this PR?
Thanks
I'm going to have some teammates take a look as an extra set of eyes in the morning, but otherwise it looks good and we should be able to merge it tomorrow.