PAYONE-GmbH / checkout-demo

New to the PAYONE API? Start here!
MIT License
3 stars 3 forks source link
code-examples demo-app payment

PAYONE checkout demo app

The demo app shows example use cases for an online-payment and serves as a demonstration of PAYONE's API usage and its concepts. The app shows a usage scenario for an e-shop that allows Credit Card, PayPal and paydirekt payment methods.

Use cases overview

  1. Pay via Credit Card (with/without 3DSecure)
  2. Pay via PayPal and paydirekt
  3. Receive an example transaction status notification from the PAYONE system

How to read the Readme?

As for how to read this README for the first time, we recommend to

Detailed Readme elaborates more on tech details and PAYONE's API concepts.
So, most probably, you would want to check it out. The link to it, again: the detailed Readme.

Running the app

You have two options: you can play around with the app on Gitpod, an online IDE, or you can install the app locally.

Gitpod

  1. Click the link below to open the app inside Gitpod's online IDE:

Open in Gitpod

  1. Populate the pre-created .env file with your PAYONE credentials like in .env.example
  2. Run php -S 0.0.0.0:3000 command in terminal (Ctrl + Shift + `) to run the PHP built-in server
  3. Then, in Gitpod, you should see a pop-up showing up on the right allowing you to go to a browser - just click 'Open browser' 🙂

Note: you will probably encounter problems accessing redirect payment methods like PayPal if viewing the app in Gitpod's built-in preview browser, i.e. by clicking 'Open preview' in the 4th step, so you should go to a dedicated browser window to be able to check how redirect payment methods work - so, just click 'Open browser', and you're good to go 🙂.

Locally

Simply clone the repo and spin up a server.

You can do this by following these steps:

  1. Clone the repository via this command - git clone git@github.com:PAYONE-GmbH/checkout-demo.git
  2. Go the app folder via cd checkout-demo/
  3. Create a new .env file and then populate it with your PAYONE credentials like in .env.example
  4. Run php -S localhost:3000 command to run the PHP built-in server
  5. Go to localhost:3000 in your browser 🙂

Prerequisites for the demo app to run are:

Use cases' showcase

Pay via Credit Card without 3DSecure

Pay via Credit Card with 3DSecure

Pay via paydirekt

Receive example transaction status notification

This is shown in the last seconds of 'Pay via Credit Card with 3DSecure' and 'Pay via paydirekt' showcases

For the test data - follow our more detailed Readme's section "Use cases' test data"