Open sztomczyk opened 3 years ago
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' => 'szymon.tomczyk26@gmail.com', 'phone' => '505091321', 'firstName' => 'Szymon', 'lastName' => 'Tomczyk' ], 'payMethods' => [ 'payMethod' => [ 'value' => $token, 'type' => 'CARD_TOKEN' ] ] ];
Response:
{ "status": { "statusCode": "SUCCESS", "statusDesc": "Request successful" }, "orderId": "6P939W2XPJ210831GUEST000P01" }
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:
Response: