Giter VIP home page Giter VIP logo

paysafe-paypal-example's Introduction

PayPal DEMO project

This demo features sample integrations with PayPal through Paysafe Checkout or APM API. Each scenario has to be run separately and they cover 4 different payment flows and a payout(standalone credit batch) flow.

Project Setup

  • Node version 8 is required
  • Each test case should be built using:
npm install
  • To start the test server run:
npm start
ngrok http 3002
  • Your test server is now also available on the URL ngrok provided you.

  • Create your test account.

Follow the steps on https://developer.paysafe.com/en/sdks/paysafe-checkout/overview/

Replace place holders YOUR_PRIVATE_API_KEY and YOUR_FMA in server.js files 
with your private api key and FMA.
  • Test accounts should be configured to send notifications to local ngrok
Log into: https://login.test.netbanx.com/office/public/preLogin.htm

Go to Settings/Notifications and change the Callback URL to point to local ngrok.

The notification URL is http://<ngrok_url_to_your_local_evn>:3002/notify

PayPal Scenarios

PayPal has quite a few features and scenarios that it supports and requires its merchants to follow. For all these, we have a ready-made project, that demonstrates some basic flows.

Scenarios

The project covers the following scenarios:

Scenario 1: PayPal w/ APM API, intentSale = true.

Gambling merchant initiates the payment via his backend. forceIntentSale flag is set to true. Merchant should use the /initialpayments endpoint in order to be able to verify payerId before finalizing the transaction.

Merchant should be able to verify the payerId before finalizing the transaction. It is returned from the initial payment lookup endpoint, which should be triggered before token is consumed. The merchant should be able to get the payerid before finishing the transaction.

Scenario 2: PayPal w/ APM API, intentSale = false.

Retail 2-step flow. Merchant initiates a payment through his backend. After receiving payment COMPLETED callback merchant manually initiates a settlement.

Scenario 3: PayPal w/ Paysafe Checkout, intentSale = true.

Gambling merchant using Paysafe Checkout. forceIntentSale flag is set to true.

Merchant should be able to verify the payerId before finalizing the transaction. It is returned from the token lookup endpoint, which should be triggered before token is consumed.

Scenario 4: PayPal w/ Paysafe Checkout, intentSale = false.

Retail 2-step flow using Paysafe checkout. Merchant should be able to obtain the shipping address to qualify for seller protection, before finishing the transaction. After receiving payment COMPLETED callback merchant manually initiates a settlement.

Scenario 5: PayPal w/ APM API, standalone credit batch.

Gambling merchant initiates a standalone credit batch via his backend.

paysafe-paypal-example's People

Contributors

nikolay-diyanov avatar

Watchers

James Cloos avatar  avatar  avatar Greg Roll avatar  avatar  avatar

Forkers

bostjan242

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.