Skip to content

Commit 104f836

Browse files
authored
fix: fix undefined ShoppingCartID
1 parent 9bb13b3 commit 104f836

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

classes/class-wc-tpayway.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,6 @@ public function generate_ipg_form($order_id)
391391
'acq_id' => $this->acq_id, // secret key
392392
'PurchaseAmt' => $order_format_value,
393393

394-
'IntCurrency' => 'HRK',
395-
'IntAmount' => $total_amount_request * $this->ratehrkfixed,
396-
397394
// ISO 4217
398395
'CurrencyCode' => 978
399396
);
@@ -484,8 +481,15 @@ function check_tcompayway_response()
484481
global $woocommerce;
485482

486483
// Return if is error during installation
484+
// Back to homepage
487485
if (!isset($_POST['ShoppingCartID'])) {
488-
return;
486+
$text = '<html><meta charset="utf-8"><body><center>';
487+
$text .= __('Redirecting...', 'tcom-payway-wc');
488+
$text .= '</center><script>setTimeout(function(){ window.location.replace("' . home_url() . '"); },1500);</script></body></html>';
489+
490+
echo $text;
491+
492+
exit;
489493
}
490494

491495
if (!$_POST['Amount']) {

0 commit comments

Comments
 (0)