GithubHelp home page GithubHelp logo

sebastianfdz / paypal-smart-payment-buttons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dalavancloud/paypal-smart-payment-buttons

0.0 0.0 0.0 298.8 MB

Smart Payment Buttons

License: Apache License 2.0

Shell 0.01% JavaScript 100.00%

paypal-smart-payment-buttons's Introduction

PayPal Smart Payment Buttons

build status code coverage npm version apache license

Smart Payment Buttons application, including:

  • Server-side buttons renderer
  • Client side logic

Please note: this repo is not intended as a public entry point into the smart buttons. Please see:

Development

Running the development server

npm install
npm start

Then load http://localhost:8003/smart/buttons?clientID=alc_client1 in your browser.

Running tests

npm test

Release

Release a new version

npm run release

Deploy the new version

npm run deploy

Activate traffic on the new version

npm run activate

Activate traffic on a specific version

npm run activate 2.0.123

Activate traffic on a specific version to a specific environment

npm run activate 2.0.123 sandbox

Activate traffic on a specific version to multiple specific environments

npm run activate 2.0.123 'local stage sandbox'

Using local paypal-checkout-components

This repo uses the button renderer from github.com/paypal/paypal-checkout-components. To pull in local changes from paypal-checkout-components to this module:

Preflight call

This section is relevant to integrations passing data-user-id-token, for vaulted/one-click button renders.

Rendering the vaulted button can be time consuming. The Smart Buttons server allows a pre-flight call to be made. This pre-caches the button, ready to be rendered immediately when the buyer lands on your page. This should typically be done in one of the following places:

  • On a page immediately prior to displaying the Smart Buttons
  • On a single-page app prior to displaying the Smart Buttons, if the Smart Buttons are displayed after a user action
  • On the server-side prior to rendering the cart or checkout page containing the Smart Buttons

To invoke, simply make a call to the following URL:

https://www.paypal.com/smart/buttons/preload?client-id=CLIENT_ID&user-id-token=ID_TOKEN

The following URL params can be passed:

  • client-id: (required) Your PayPal client id
  • user-id-token: (required) Your customer's id token
  • merchant-id (optional) The merchant id or email of the transaction payee
  • amount: (optional) The estimated amount of the transaction
  • currency: (optional) The currency of the transaction

This request can be made as a fire-and-forget call: you do not need to wait for a response, or check the status code of the response.

paypal-smart-payment-buttons's People

Contributors

mnicpt avatar wsbrunson avatar nbierdeman avatar elizabethmv avatar gregjopa avatar dtjones404 avatar ravishekhar avatar amyegan avatar jshawl avatar westeezy avatar oscarleonnogales avatar spencersablan avatar vishakha94 avatar andyfen avatar mstuart avatar siddy2181 avatar bluepnume avatar wickerpopstar avatar renovate[bot] avatar leogedler avatar prashantjagasia avatar abarco avatar sioked avatar jianyigao avatar aditya27marri avatar jscheinhorn avatar xuanwan05 avatar crookedneighbor avatar briceshatzer avatar gabrielo91 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.