Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e87e5e124 | ||
|
|
8d27778ced |
@ -25,6 +25,13 @@ class Btcpay extends \Opencart\System\Engine\Controller
|
||||
true
|
||||
);
|
||||
|
||||
if (isset($this->session->data['error_warning'])) {
|
||||
$data['error_warning'] = $this->session->data['error_warning'];
|
||||
unset($this->session->data['error_warning']);
|
||||
} else {
|
||||
$data['error_warning'] = '';
|
||||
}
|
||||
|
||||
if ($useModal) {
|
||||
$host = $this->config->get('payment_btcpay_url');
|
||||
$data['btcpay_host'] = $host;
|
||||
@ -63,6 +70,16 @@ class Btcpay extends \Opencart\System\Engine\Controller
|
||||
$this->session->data['order_id']
|
||||
);
|
||||
|
||||
if (empty($order_info)) {
|
||||
if ($debug) {
|
||||
$this->log->write('Could not load order passed by session, order id: ' . $this->session->data['order_id']);
|
||||
}
|
||||
$this->session->data['error_warning'] = $this->language->get('session_checkout_order_error');
|
||||
$this->response->redirect(
|
||||
$this->url->link('checkout/checkout', '', true)
|
||||
);
|
||||
}
|
||||
|
||||
$invoiceId = '';
|
||||
$checkoutLink = '';
|
||||
|
||||
|
||||
@ -6,3 +6,4 @@ $_['invoice_expired_text'] = 'The invoice expired. Please try again or choose a
|
||||
$_['invoice_closed_text'] = 'Payment aborted. Please try again or choose a different payment method.';
|
||||
$_['invoice_failed_text'] = 'Payment aborted. Error processing the request. Please contact store owner if the problem persists.';
|
||||
$_['order_payment_link'] = 'You can check your payment status here: ';
|
||||
$_['session_checkout_order_error'] = 'Your cart order id could not be found, please try to log out and in again.';
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger">{{ error_warning }}</div>
|
||||
{% endif %}
|
||||
<form action="{{ action }}" method="post">
|
||||
<div class="buttons">
|
||||
<div class="text-end">
|
||||
|
||||
@ -13,6 +13,8 @@
|
||||
if (data.invoiceId !== undefined) {
|
||||
window.btcpay.setApiUrlPrefix('{{ btcpay_host }}');
|
||||
window.btcpay.showInvoice(data.invoiceId);
|
||||
} else {
|
||||
showError('{{ invoice_failed_text }}');
|
||||
}
|
||||
let invoice_paid = false;
|
||||
window.btcpay.onModalReceiveMessage(function (event) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "BTCPay Server payment gateway",
|
||||
"version": "4.2.1",
|
||||
"version": "4.2.2",
|
||||
"license": "MIT",
|
||||
"author": "BTCPay Server",
|
||||
"link": "https://btcpayserver.org"
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
define('BTCPAY_OPENCART_EXTENSION_VERSION', '4.2.1');
|
||||
define('BTCPAY_OPENCART_EXTENSION_VERSION', '4.2.2');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user