PayPal JavaScript SDK module to deal with funding sources and eligibility.
Note: your client-id and domain must be approved to call this function
paypal.rememberFunding([ paypal.FUNDING.VENMO ]);import { rememberFunding } from '@paypal/funding-components';
import { FUNDING } from '@paypal/sdk-constants';
rememberFunding(req, res, [ FUNDING.VENMO ]);import { isFundingRemembered } from '@paypal/funding-components';
import { FUNDING } from '@paypal/sdk-constants';
if (isFundingRemembered(req, FUNDING.VENMO)) {
// ...
}Pass in a custom set of cookies:
isFundingRemembered(req, FUNDING.VENMO, { cookies })npm install --save @paypal/funding-components- Fork the module
- Run setup:
npm run setup - Start editing code in
./srcand writing tests in./tests npm run build
npm run build-
Edit tests in
./test/tests -
Run the tests:
npm test