Skip to content

Commit

Permalink
refactor: request data creation is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
gasspper committed Aug 13, 2024
1 parent f52c5ca commit 247d205
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions plugin/src/Controllers/ResponseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,8 @@ public function response($requestMethod, $params)
$this->logger->logInfo("Request: method -> $requestMethod");
$this->logger->logInfo('Request: payload -> ' . json_encode($params));

$requestData = [
'method' => $requestMethod,
'params' => $params
];

try {
$transaction = $this->webpayplusTransbankSdk->handleRequestFromTbkReturn($requestData);
$transaction = $this->webpayplusTransbankSdk->handleRequestFromTbkReturn($params);
$wooCommerceOrder = $this->getWooCommerceOrderById($transaction->order_id);
$commitResponse = $this->webpayplusTransbankSdk->commitTransaction($transaction->order_id, $transaction->token);
$this->completeWooCommerceOrder($wooCommerceOrder, $commitResponse, $transaction);
Expand Down

0 comments on commit 247d205

Please sign in to comment.