Open Darlynnnn opened 2 months ago
Hello,
At first you create a OneClick payment template.
Create a OneClick payment template
The initial payment is very similar to a regular card payment at the payment gateway. The only difference is that in the e-shop the customer chooses to store the card for the next payment. It is absolutely necessary to obtain this consent and at the same time it is not allowed to hide the consent - the consent must always take place by active customer selection ("check boxes checked by default" are not allowed). After obtaining approval, you indicate to the payment gateway when creating the payment that you want to create a template for OneClick payment (see also the API documentation of the payment/init). If this initial payment is successfully authorised, the payment gateway creates a template, which it identifies using the payID of the initial payment.
payment/init method (choose oneclickPayment)
Item: payOperation Type: String Description: Type of payment operation. Allowed values: payment, oneclickPayment, customPayment. Optional parameter since version 1.9, default value: payment.
This transaction's PayID (OneClick payment template) is "origPayId", which you use for next transactions in oneclick/init method.
Jana Grmelová
In the API the flow is as follows:
1) oneclick/echo - to validate template 2) oneclick/init - to init payment 3) oneclick/process - to process the payment
oneclick/init requires origPayId as param, however where do i get this ?
Using the java example provided in the repository , i tried to:
1) first make basic payment - payment/init and payment/process 2) pass payId returned from these calls to oneclick payments
But it doesnt work and still return status code 700 - template not found.
Going straight for oneclick/init also doesnt work.
So what is the process of obtaining the origPayId / creating it?
Thanks.