braintree-web-drop-in icon indicating copy to clipboard operation
braintree-web-drop-in copied to clipboard

feat: implemented a param to specify any vaulted payment method type that they want to block.

Open ale-grosselle opened this issue 2 years ago • 7 comments

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.

ale-grosselle avatar Mar 28 '22 13:03 ale-grosselle

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 avatar Apr 04 '22 20:04 crookedneighbor

@crookedneighbor good point, I'm going to implement your suggestions!

ale-grosselle avatar Apr 05 '22 08:04 ale-grosselle

@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 :/

ale-grosselle avatar Apr 05 '22 15:04 ale-grosselle

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 avatar Apr 05 '22 15:04 crookedneighbor

@crookedneighbor Implemented the param if you want to take a look!

ale-grosselle avatar Apr 08 '22 15:04 ale-grosselle

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.

crookedneighbor avatar Apr 11 '22 15:04 crookedneighbor

Hello @crookedneighbor, any news?

ale-grosselle avatar Apr 19 '22 08:04 ale-grosselle

Perfecto buen trabajo

shango420 avatar Nov 08 '22 00:11 shango420

Any news, could we merge it please? 🙏 🙏

ale-grosselle avatar Nov 09 '22 09:11 ale-grosselle

👍👍

shango420 avatar Nov 09 '22 17:11 shango420

Hello @crookedneighbor, any news?

ale-grosselle avatar Nov 17 '22 08:11 ale-grosselle

@ale-grosselle could you please rename vaultedPaymentMethodTypesThatShouldBeHidden to hiddenVaultedPaymentMethodTypes ? and resolve conflicts to merge your PR. Thanks

armandodlvr avatar Nov 17 '22 21:11 armandodlvr

Hi @armandodlvr done!

ale-grosselle avatar Nov 18 '22 08:11 ale-grosselle

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.

shango420 avatar Nov 18 '22 13:11 shango420

@ale-grosselle the changelog was removed. could you add it?... thanks

armandodlvr avatar Nov 18 '22 14:11 armandodlvr

hiddenVaultedPaymentMethodTypes

Done!

@ale-grosselle the changelog was removed. could you add it?... thanks

ale-grosselle avatar Nov 18 '22 15:11 ale-grosselle

@armandodlvr is it okay now?

ale-grosselle avatar Nov 30 '22 09:11 ale-grosselle

vaultedPaymentMethodTypesThatShouldBeHidden

shango420 avatar Jan 17 '23 02:01 shango420

Hello @cgdibble @crookedneighbor, is possible to merge this PR?

Thanks

ale-grosselle avatar Feb 08 '23 09:02 ale-grosselle

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.

cgdibble avatar Feb 10 '23 00:02 cgdibble