Using 3.0.3.8 getting the following error trying to link square.
An error was encountered while refreshing the token: This request could not be authorized.×
Your Square access token has expired or has been revoked! Click here to re-authorize the Square extension
Used the curl tool posted and curl can connect to site fine.
Error logs show
2021-09-14 17:36:17 - PHP Notice: Undefined index: access_token in /var/www/public_html/store/admin/controller/extension/payment/squareup.php on line 633
2021-09-14 17:36:18 - This request could not be authorized.
An error was encountered while refreshing the token: This request could not be authorized.×
Your Square access token has expired or has been revoked! Click here to re-authorize the Square extension
Used the curl tool posted and curl can connect to site fine.
Error logs show
2021-09-14 17:36:17 - PHP Notice: Undefined index: access_token in /var/www/public_html/store/admin/controller/extension/payment/squareup.php on line 633
2021-09-14 17:36:18 - This request could not be authorized.
I would suggest to use an extension version from the Marketplace since core extensions are no longer supported on anyhow.leeburgess wrote: ↑Wed Sep 15, 2021 1:39 amUsing 3.0.3.8 getting the following error trying to link square.
An error was encountered while refreshing the token: This request could not be authorized.×
Your Square access token has expired or has been revoked! Click here to re-authorize the Square extension
Used the curl tool posted and curl can connect to site fine.
Error logs show
2021-09-14 17:36:17 - PHP Notice: Undefined index: access_token in /var/www/public_html/store/admin/controller/extension/payment/squareup.php on line 633
2021-09-14 17:36:18 - This request could not be authorized.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thank you installed but getting this error
There was an error when trying to sync locations and token: The Apple Pay domain verification could not finish. The target directory does not exist, or has no write permissions: /var/www/public_html/.well-known×
There was an error when trying to sync locations and token: The Apple Pay domain verification could not finish. The target directory does not exist, or has no write permissions: /var/www/public_html/.well-known×
Contact the extension developer to resolve this issue.leeburgess wrote: ↑Wed Sep 15, 2021 2:11 amThank you installed but getting this error
There was an error when trying to sync locations and token: The Apple Pay domain verification could not finish. The target directory does not exist, or has no write permissions: /var/www/public_html/.well-known×
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Good morning, I am Cuban, but when I saw the facilities offered by OpenCart I fell in love with it, and I really liked it, I am developing a pluggin for payment gateways, and I am using the APIs of the payment gateways of my country, but when it comes to implement them does not give me do the steps, here I send the code and I can help me.
This is an example
<form class="form-amount" action="index.php" method="post">
<div class="form-group">
<label for="amount">Cantidad</label>
<input type="text" id="amount" name="amount" class="form-control" placeholder="Por ejemplo: 50.00">
</div>
<input class="btn btn-lg btn-primary btn-block" name="submitPayment" type="submit" value="Pagar">
</form>
<?php
if ($_POST['submitPayment']) {
include "api/enzona.php";
$miObj = new EnzonaAPI;
$amount = $_POST['amount'];
$url_tpv = 'https://dirección del pago de enzona/realizarPago';
$version = "HMAC_SHA256_V1";
$clave = 'TU CLAVE DE COMERCIO'; //poner la clave SHA-256 facilitada por el banco
$name = 'TU NOMBRE DE COMERCIO';
$code = 'TU CODIGO DE COMERCIO';
$terminal = '1';
$order = date('ymdHis');
$amount = $amount * 100;
$currency = '978';
$consumerlng = '001';
$transactionType = '0';
$urlMerchant = 'http://your-domain.com/';
$urlweb_ok = 'http://your-domain.com/tpv_ok.php';
$urlweb_ko = 'http://your-domain.com/tpv_ko.php';
$miObj->setParameter("DS_MERCHANT_AMOUNT", $amount);
$miObj->setParameter("DS_MERCHANT_CURRENCY", $currency);
$miObj->setParameter("DS_MERCHANT_ORDER", $order);
$miObj->setParameter("DS_MERCHANT_MERCHANTCODE", $code);
$miObj->setParameter("DS_MERCHANT_TERMINAL", $terminal);
$miObj->setParameter("DS_MERCHANT_TRANSACTIONTYPE", $transactionType);
$miObj->setParameter("DS_MERCHANT_MERCHANTURL", $urlMerchant);
$miObj->setParameter("DS_MERCHANT_URLOK", $urlweb_ok);
$miObj->setParameter("DS_MERCHANT_URLKO", $urlweb_ko);
$miObj->setParameter("DS_MERCHANT_MERCHANTNAME", $name);
$miObj->setParameter("DS_MERCHANT_CONSUMERLANGUAGE", $consumerlng);
$params = $miObj->createMerchantParameters();
$signature = $miObj->createMerchantSignature($clave);
?>
<form id="realizarPago" action="<?php echo $url_tpv; ?>" method="post">
<input type='hidden' name='Ds_SignatureVersion' value='<?php echo $version; ?>'>
<input type='hidden' name='Ds_MerchantParameters' value='<?php echo $params; ?>'>
<input type='hidden' name='Ds_Signature' value='<?php echo $signature; ?>'>
</form>
<script>
$(document).ready(function () {
$("#realizarPago").submit();
});
</script>
<?php
}
?>
This is an example
<form class="form-amount" action="index.php" method="post">
<div class="form-group">
<label for="amount">Cantidad</label>
<input type="text" id="amount" name="amount" class="form-control" placeholder="Por ejemplo: 50.00">
</div>
<input class="btn btn-lg btn-primary btn-block" name="submitPayment" type="submit" value="Pagar">
</form>
<?php
if ($_POST['submitPayment']) {
include "api/enzona.php";
$miObj = new EnzonaAPI;
$amount = $_POST['amount'];
$url_tpv = 'https://dirección del pago de enzona/realizarPago';
$version = "HMAC_SHA256_V1";
$clave = 'TU CLAVE DE COMERCIO'; //poner la clave SHA-256 facilitada por el banco
$name = 'TU NOMBRE DE COMERCIO';
$code = 'TU CODIGO DE COMERCIO';
$terminal = '1';
$order = date('ymdHis');
$amount = $amount * 100;
$currency = '978';
$consumerlng = '001';
$transactionType = '0';
$urlMerchant = 'http://your-domain.com/';
$urlweb_ok = 'http://your-domain.com/tpv_ok.php';
$urlweb_ko = 'http://your-domain.com/tpv_ko.php';
$miObj->setParameter("DS_MERCHANT_AMOUNT", $amount);
$miObj->setParameter("DS_MERCHANT_CURRENCY", $currency);
$miObj->setParameter("DS_MERCHANT_ORDER", $order);
$miObj->setParameter("DS_MERCHANT_MERCHANTCODE", $code);
$miObj->setParameter("DS_MERCHANT_TERMINAL", $terminal);
$miObj->setParameter("DS_MERCHANT_TRANSACTIONTYPE", $transactionType);
$miObj->setParameter("DS_MERCHANT_MERCHANTURL", $urlMerchant);
$miObj->setParameter("DS_MERCHANT_URLOK", $urlweb_ok);
$miObj->setParameter("DS_MERCHANT_URLKO", $urlweb_ko);
$miObj->setParameter("DS_MERCHANT_MERCHANTNAME", $name);
$miObj->setParameter("DS_MERCHANT_CONSUMERLANGUAGE", $consumerlng);
$params = $miObj->createMerchantParameters();
$signature = $miObj->createMerchantSignature($clave);
?>
<form id="realizarPago" action="<?php echo $url_tpv; ?>" method="post">
<input type='hidden' name='Ds_SignatureVersion' value='<?php echo $version; ?>'>
<input type='hidden' name='Ds_MerchantParameters' value='<?php echo $params; ?>'>
<input type='hidden' name='Ds_Signature' value='<?php echo $signature; ?>'>
</form>
<script>
$(document).ready(function () {
$("#realizarPago").submit();
});
</script>
<?php
}
?>
OC version. If an extension does not provide what you need from the Marketplace already, you could always create a new service request in the Commercial Support section of the forum to get this done as a custom job.ironmaiden wrote: ↑Wed Sep 15, 2021 10:40 pmGood morning, I am Cuban, but when I saw the facilities offered by OpenCart I fell in love with it, and I really liked it, I am developing a pluggin for payment gateways, and I am using the APIs of the payment gateways of my country, but when it comes to implement them does not give me do the steps, here I send the code and I can help me.
This is an example
<form class="form-amount" action="index.php" method="post">
<div class="form-group">
<label for="amount">Cantidad</label>
<input type="text" id="amount" name="amount" class="form-control" placeholder="Por ejemplo: 50.00">
</div>
<input class="btn btn-lg btn-primary btn-block" name="submitPayment" type="submit" value="Pagar">
</form>
<?php
if ($_POST['submitPayment']) {
include "api/enzona.php";
$miObj = new EnzonaAPI;
$amount = $_POST['amount'];
$url_tpv = 'https://dirección del pago de enzona/realizarPago';
$version = "HMAC_SHA256_V1";
$clave = 'TU CLAVE DE COMERCIO'; //poner la clave SHA-256 facilitada por el banco
$name = 'TU NOMBRE DE COMERCIO';
$code = 'TU CODIGO DE COMERCIO';
$terminal = '1';
$order = date('ymdHis');
$amount = $amount * 100;
$currency = '978';
$consumerlng = '001';
$transactionType = '0';
$urlMerchant = 'http://your-domain.com/';
$urlweb_ok = 'http://your-domain.com/tpv_ok.php';
$urlweb_ko = 'http://your-domain.com/tpv_ko.php';
$miObj->setParameter("DS_MERCHANT_AMOUNT", $amount);
$miObj->setParameter("DS_MERCHANT_CURRENCY", $currency);
$miObj->setParameter("DS_MERCHANT_ORDER", $order);
$miObj->setParameter("DS_MERCHANT_MERCHANTCODE", $code);
$miObj->setParameter("DS_MERCHANT_TERMINAL", $terminal);
$miObj->setParameter("DS_MERCHANT_TRANSACTIONTYPE", $transactionType);
$miObj->setParameter("DS_MERCHANT_MERCHANTURL", $urlMerchant);
$miObj->setParameter("DS_MERCHANT_URLOK", $urlweb_ok);
$miObj->setParameter("DS_MERCHANT_URLKO", $urlweb_ko);
$miObj->setParameter("DS_MERCHANT_MERCHANTNAME", $name);
$miObj->setParameter("DS_MERCHANT_CONSUMERLANGUAGE", $consumerlng);
$params = $miObj->createMerchantParameters();
$signature = $miObj->createMerchantSignature($clave);
?>
<form id="realizarPago" action="<?php echo $url_tpv; ?>" method="post">
<input type='hidden' name='Ds_SignatureVersion' value='<?php echo $version; ?>'>
<input type='hidden' name='Ds_MerchantParameters' value='<?php echo $params; ?>'>
<input type='hidden' name='Ds_Signature' value='<?php echo $signature; ?>'>
</form>
<script>
$(document).ready(function () {
$("#realizarPago").submit();
});
</script>
<?php
}
?>
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 183 guests