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.
- Pay via Credit Card (with/without 3DSecure)
- Pay via PayPal and paydirekt
- Receive an example transaction status notification from the PAYONE system
As for how to read this README for the first time, we recommend to
- first, check out "Use cases' showcase" section
- (then you can install the app to be able to play around with it yourself - follow section "Running the app")
- secondly, read "Let's do it" section in the more detailed doc - Detailed Readme
- and then, read "Internals" section in the more detailed Readme
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.
You have two options: you can play around with the app on Gitpod, an online IDE, or you can install the app locally.
- Click the link below to open the app inside Gitpod's online IDE:
- Populate the pre-created
.env
file with your PAYONE credentials like in.env.example
- Run
php -S 0.0.0.0:3000
command in terminal (Ctrl + Shift + `
) to run the PHP built-in server - 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 🙂.
Simply clone the repo and spin up a server.
You can do this by following these steps:
- Clone the repository via this command -
git clone git@github.com:PAYONE-GmbH/checkout-demo.git
- Go the app folder via
cd checkout-demo/
- Create a new
.env
file and then populate it with your PAYONE credentials like in.env.example
- Run
php -S localhost:3000
command to run the PHP built-in server - Go to
localhost:3000
in your browser 🙂
Prerequisites for the demo app to run are:
- PHP at least 7.1
- cURL installed on the server and
php-curl
extension
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"