Skip to content

Commit

Permalink
Merge pull request #236 from TransbankDevelopers/fix/kiuwan-report
Browse files Browse the repository at this point in the history
fix: kiuwan report
  • Loading branch information
mastudillot authored May 29, 2024
2 parents 8ac1add + b0dd55b commit 1c4fd68
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function process_payment($order_id)
$this->checkOrderCanBePaid($order);
$this->checkUserIsLoggedIn();

return $this->handleRequest($_POST, $order);
return $this->handleOneclickPayment($_POST, $order);
} catch (Throwable $exception) {
$errorHookName = 'wc_gateway_transbank_process_payment_error_' . $this->id;
$errorMessage = ErrorHelper::getErrorMessageBasedOnTransbankSdkException($exception);
Expand Down Expand Up @@ -335,9 +335,9 @@ public function form()
*
* @return array The result of the processing, including a success message and redirect URL.
*/
private function handleRequest(array $request, WC_Order $order)
private function handleOneclickPayment(array $request, WC_Order $order)
{
$paymentTokenId = $request["wc-{$this->id}-payment-token"] ?? null;
$paymentTokenId = wc_clean($request["wc-{$this->id}-payment-token"]) ?? null;

if ($paymentTokenId === 'new' || is_null($paymentTokenId)) {
return $this->handleInscription($order);
Expand Down

0 comments on commit 1c4fd68

Please sign in to comment.