Card Form in PayPalWebPayments
Summary of changes
- BCDC using existing PayPalWebPayments module instead of creating a new one
- Add button changes for BCDC, logo image and new
CardButton - Demo app changes to enter in card as funding source
- Add card in
PayPalWebCheckoutFundingSourceenum this enablesstartfunction to distinguish the flows for API call (we need to get specs for) - UpdateClientConfig GraphQL endpoint for card fundingSource and unit tests
TODO:
- still to verify values for API for our mobile SDK
- CHANGELOG entires for new button and
new PayPalWebCheckoutFundingSourceenum value
I will do the last two after we decide on separate module vs an option in PayPalWebPayments
Checklist
- [ ] Added a changelog entry
Authors
List GitHub usernames for everyone who contributed to this pull request.
- @KunJeongPark
I like including the branded card checkout within the PayPalWebPayments module because:
- It's a web-based payment method option and it fits with the other web-based payment method options (PayPal, Pay Later, Credit)
- Since it's branded card processing and it's done via web, it naturally fits as an extension to the existing
PayPalWebPaymentsmodule. - Doing it this way will reduce the amount of code we need to add (both to the SDK and demo app) and thus reduces the amount of code that the merchant has to do (and reduces their file size).
- Since this is a short-term solution, having it as an extension to the existing module feels right.
When we build the native card fields solution, we can put it in it's own module because it will encompass BCDC, ACDC, and the other payment method options (PayPal, Pay Later, Credit, and more 👀 ).
@nirvan543 yes i think it makes sense to have it here. We just need to call the APi for the card funding option.
I considered having it as a separate library thinking that might be a new feature from the merchant/customer's point of view and something we could keep the same function signature for when we implement native.
I'm thinking about how we'd present this in our docs. If you want to be able to use card forms, we have guest checkout option available through PayPalWebPayments - is that confusing?
Is it confusing for people who want to use this module for PayPal checkout flows only to see "card" value in PayPalCheckoutFundingSource enum.
But I agree, this flow makes more sense from code perspective. As long as it doesn't cause confusion for the merchants, this definitely makes more sense.