Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where to get origPayId for oneclick/init #691

Open
Darlynnnn opened this issue Aug 31, 2024 · 1 comment
Open

Where to get origPayId for oneclick/init #691

Darlynnnn opened this issue Aug 31, 2024 · 1 comment
Assignees

Comments

@Darlynnnn
Copy link

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.

@jgrmelova
Copy link

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.

image


Jana Grmelová

@jgrmelova jgrmelova self-assigned this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants