Skip to content

Commit 6d70505

Browse files
committed
fix: return url fix
1 parent c6e6b1a commit 6d70505

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

classes/class-wc-tpayway.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public function __construct()
2929
$this->shop_id = isset($settings['mer_id']) ? $settings['mer_id'] : '';
3030
$this->acq_id = isset($settings['acq_id']) ? $settings['acq_id'] : '';
3131
$this->pg_domain = $this->get_option( 'pg_domain' );
32-
$this->response_url_success = $this->get_return_url($_POST['ShoppingCartID']);
3332
$this->checkout_msg = isset($settings['checkout_msg']) ? $settings['checkout_msg'] : '';
3433
$this->woo_active = isset($settings['woo_active']) ? $settings['woo_active'] : '';
3534
$this->description = isset($settings['description']) ? $settings['description'] : '';
@@ -312,7 +311,7 @@ public function generate_ipg_form($order_id)
312311
'ShoppingCartID' => $pgw_order_id,
313312
'Version' => $this->version,
314313
'TotalAmount' => $total_amount_request,
315-
'ReturnURL' => $this->response_url_success,
314+
'ReturnURL' => $this->get_return_url($order),
316315
'ReturnErrorURL' => $order->get_cancel_order_url(),
317316
'CancelURL' => $order->get_cancel_order_url(),
318317
'Signature' => $pgw_signature,
@@ -485,7 +484,7 @@ function check_tcompayway_response()
485484

486485
$order->payment_complete();
487486

488-
wp_redirect($this->response_url_success, 302);
487+
wp_redirect($this->get_return_url($order), 302);
489488
exit;
490489
}
491490
}

0 commit comments

Comments
 (0)