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

No standard card token after successfuly payment #120

Open
sztomczyk opened this issue Aug 31, 2021 · 0 comments
Open

No standard card token after successfuly payment #120

sztomczyk opened this issue Aug 31, 2021 · 0 comments

Comments

@sztomczyk
Copy link

Hi, I want to implement recurring payments in my app. After getting one-use token I create order with this token and finally receive only status and orderId. How it is possible?

Order array:

$order = [
        'continueUrl' => 'http://czaszjesc.test/',
        'notifyUrl' => 'http://czaszjesc.test/',
        'customerIp' => $_SERVER['REMOTE_ADDR'],
        'merchantPosId' => OpenPayU_Configuration::getMerchantPosId(),
        'description' => 'Płatność za zamówienie #' . $orderId,
        'recurring' => 'FIRST',
        'currencyCode' => 'PLN',
        'totalAmount' => 10000,
        'extOrderId' => $orderId,
        'products' => [
            [
                'name' => 'Subskrypcja',
                'unitPrice' => 10000,
                'quantity' => 1
            ]
        ],
        'buyer' => [
            'email' => '[email protected]',
            'phone' => '505091321',
            'firstName' => 'Szymon',
            'lastName' => 'Tomczyk'
        ],
        'payMethods' => [
            'payMethod' => [
                'value' => $token,
                'type' => 'CARD_TOKEN'
            ]
        ]
];

Response:

{
  "status":  {
    "statusCode": "SUCCESS",
    "statusDesc": "Request successful"
   },
  "orderId": "6P939W2XPJ210831GUEST000P01"
}
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

1 participant