[x] New feature (non-breaking change which adds functionality)
Notes
IMPORTANT
So far this is only for development stage and not any production code yet. For production code there should not be any amount sent, which could be manipulated. Also we are connected to a developer demo account not a production account.
TO BE DONE for the next PR:
Simplify functions in vivawallet.go since there is a lot of repeating code
Generate customer and paymentOrder from database or frontend information instead of sample as it is right now
For the first POST request, only accept items to be sent and calculate amount in the backend instead of sending amount of money via POST request
Create tests for whole process !!
Create a good solution to switch between PaymentProviders (also for accounting purposes)
Description
This PR covers the MVP (minimal viable product) of the VIvaWallet checkout process. Each process step is described below:
After being redirected to the VivaWallet checkout URL, you need VivaWallet Test Cards
to have a successful process.
NOTE: First option with Visa card did not work for me but third card option for Mastercard did.
After a successful transaction the user is being redirected to a success page, which is right now https://local.com/success and will be changed towards production.
NOTE: The whole sample URL, looks something like this https://local.com/success?t=d87ea0e6-91da-4312-abdf-67ebb84ee981&s=5857961245421135&lang=en-GB&eventId=0&eci=1
Here the frontend (or developer for testing purposes) has to extract the transactionID, which is t or in this sample URL above d87ea0e6-91da-4312-abdf-67ebb84ee981
It is the frontends task to extract the transactionID from the URL to verify the transaction via new endpoint
Type of change
Notes
IMPORTANT
So far this is only for development stage and not any production code yet. For production code there should not be any amount sent, which could be manipulated. Also we are connected to a developer demo account not a production account.
TO BE DONE for the next PR:
vivawallet.go
since there is a lot of repeating codeDescription
This PR covers the MVP (minimal viable product) of the VIvaWallet checkout process. Each process step is described below:
Create payment order via new endpoint
http://localhost:3000/api/transaction/
{"SmartCheckoutURL":"https://demo.vivapayments.com/web/checkout?ref=8958019584072636"}
After being redirected to the VivaWallet checkout URL, you need VivaWallet Test Cards to have a successful process.
After a successful transaction the user is being redirected to a success page, which is right now
https://local.com/success
and will be changed towards production.https://local.com/success?t=d87ea0e6-91da-4312-abdf-67ebb84ee981&s=5857961245421135&lang=en-GB&eventId=0&eci=1
d87ea0e6-91da-4312-abdf-67ebb84ee981
It is the frontends task to extract the transactionID from the URL to verify the transaction via new endpoint
{"Verification":true}
Checklist: