Skip to content

Commit

Permalink
fix: use custom variable instead $_POST
Browse files Browse the repository at this point in the history
  • Loading branch information
mastudillot committed May 29, 2024
1 parent 8ac1add commit 39e5434
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ public function __construct()
public function process_payment($order_id)
{
try {
$request = $_POST;
$order = new WC_Order($order_id);

$this->checkOrderCanBePaid($order);
$this->checkUserIsLoggedIn();

return $this->handleRequest($_POST, $order);
return $this->handleRequest($request, $order);
} catch (Throwable $exception) {
$errorHookName = 'wc_gateway_transbank_process_payment_error_' . $this->id;
$errorMessage = ErrorHelper::getErrorMessageBasedOnTransbankSdkException($exception);
Expand Down

0 comments on commit 39e5434

Please sign in to comment.