@paypal/legal-components
v1.2.2
Published
A PayPal Legal Messaging Library to display Legal Content on Merchant Websites
Downloads
20
Maintainers
Keywords
Readme
PayPal JS SDK Legal Messaging Component
PayPal JS SDK Legal Component to Display Legal Messages for various Payment Methods
Quick start
See src/index.js
Tests
Run the tests:
npm test
Testing with different/multiple browsers
npm run karma -- --browser=Chrome
npm run karma -- --browser=Safari
npm run karma -- --browser=Firefox
npm run karma -- --browser=Chrome,Safari,Firefox
Keeping the browser open after tests
npm run karma -- --browser=Chrome --keep-open
Releasing and Publishing
- Publish your code with a patch version:
npm run release
- Or
npm run release:patch
,npm run release:minor
,npm run release:major
Integration
<script src="https://www.paypal.com/sdk/js?client-id=test&components=legal"></script>
<!-- Place the container div right above the final Checkout Button -->
<div id="paypal-legal-container"></div>
<script>
paypal.Legal({
fundingSource: paypal.Legal.FUNDING.PAY_UPON_INVOICE
})
.render("#paypal-legal-container");
</script>
Hosted Example
See the hosted example here