Closed Bado-Obly closed 10 months ago
Hello @Bado-Obly,
Thank you for your message. Kindly note that when creating a payment order for a pre-authorization (with preauth = true), tipAmount should only be set when capturing the pre-authorization, and not when creating the initial payment order.
Kind regards, Viva Wallet E-commerce Support Team
Thank you! I will try asap and let you know the results!
Hello, same issue here, tried your fix but not working, can you help us?
Hello! After trying your adjustments, it still seems that the online version works while the sandbox version doesn't. Please let me know what specific information you may require to help or if there are any further steps i can try.
Thank you Bado
Hello @Bado-Obly, @lucabosso,
Thank you for your message. It is working on your Live account but not on your Demo account? Can you please clarify that? Also, can you please send us the code you used?
Kind regards, Viva Wallet E-commerce Support Team
Hello @Bado-Obly,
We just wanted to follow up on the reply we sent yesterday. We were simply wondering if you read our response.
In any case this ticket will remain active for at least 24 hours, so that you can come back if you wish.
However, if you have any questions, please don't hesitate to reply here and we'd be happy to help!
Kind regards, Viva Wallet E-commerce Support Team
Hello! Thank you for your message and the assistance you have provided. After opening the ticket, I spent some time examining the issue and found that it no longer occurred after recreating the code from scratch. At the moment, the problem seems to be resolved.
I apologize for not responding to your previous messages; I wanted to ensure that the issue was indeed resolved before providing a response. I greatly appreciate your support and promptness in responding.
I still don't know why with live keys worked and with demos not.
Thank you again
Hello, i'm encountering issues during the implementation of Vivawallet. After authenticating an access token and initiating the creation of an order, upon its completion, the redirect URL (set in the settings panel on the VW website) results in a "failure."
This does not occur when the same procedure is tested with Postman, (url contains "success").
I am available for any additional information needed, below are excerpts of the relevant code.
Client side functions: `document.getElementById("viva-btn").addEventListener("click", () => {
Functions Server side: `if (isset($_POST['function_name']) && $_POST['function_name'] == 'autenticate') { header('Content-Type: application/json'); echo json_encode(autenticate()); }
if (isset($_POST['function_name']) && $_POST['function_name'] == 'createVivaOrder') { header('Content-Type: application/json'); echo json_encode(createVivaOrder()); }
// VivaWallet [Autenticate] function autenticate() {
$url = 'xxxxx'; // Production $clientId = 'xxxxx'; $clientSecret = 'xxxxx';
}
// VivaWallet [CreateOrder] function createVivaOrder() { $array = array( CURLOPT_URL => 'https://api.vivapayments.com/checkout/v2/orders', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => '{ "amount": 100, "customerTrns": "string", "customer": { "email": "' . $_POST['email'] . '", "fullName": "' . $_POST['fullname'] . '", "phone": "' . $_POST['phone'] . '", "countryCode": "", "requestLang": "" }, "paymentTimeout": 999999, "preauth": true, "allowRecurring": false, "maxInstallments": 0, "paymentNotification": true, "tipAmount": 1, "disableExactAmount": false, "disableCash": true, "disableWallet": true, "sourceCode": "6076", "merchantTrns": "string", "tags": ["string"], }', CURLOPT_HTTPHEADER => array( 'Authorization: Bearer ' . $_POST['access_token'], 'Content-Type: application/json' ), );
}`