Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save margoguryan/4f4593a847c2b204f6949ffe3f723ef0 to your computer and use it in GitHub Desktop.
Save margoguryan/4f4593a847c2b204f6949ffe3f723ef0 to your computer and use it in GitHub Desktop.
Paypal widget
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
<div id="paypal-button-container"></div>
<script>
// Render the PayPal button
paypal.Button.render({
// Set your environment
env: 'sandbox', // sandbox | production
// Specify the style of the button
style: {
layout: 'vertical', // horizontal | vertical
size: 'medium', // medium | large | responsive
shape: 'rect', // pill | rect
color: 'gold' // gold | blue | silver | white | black
},
// Specify allowed and disallowed funding sources
//
// Options:
// - paypal.FUNDING.CARD
// - paypal.FUNDING.CREDIT
// - paypal.FUNDING.ELV
funding: {
allowed: [
paypal.FUNDING.CARD,
paypal.FUNDING.CREDIT
],
disallowed: []
},
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment