Skip to content

Commit

Permalink
check refund status
Browse files Browse the repository at this point in the history
  • Loading branch information
hizbul25 committed Jul 16, 2020
1 parent e82659b commit 15db701
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Apis/Checkout/SupportApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,18 @@ public function refundTransaction( $amount, $paymentID, $trxID, $reason, $sku )
'sku' => $sku
])->post('/payment/refund');
}

/**
* @param $paymentID
* @param $trxID
*
* @return mixed
*/
public function refundStatus( $paymentID, $trxID )
{
return $this->json([
'paymentID' => $paymentID,
'trxID' => $trxID
])->post('/payment/refund');
}
}
13 changes: 13 additions & 0 deletions src/Managers/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,19 @@ public function refundTransaction( $amount, $paymentID, $trxID, $reason, $sku )
return $response();
}

/**
* @param $paymentID
* @param $trxID
*
* @return mixed
*/
public function refundStatus( $paymentID, $trxID )
{
$response = $this->supportApi->authorization($this->getToken())->refundStatus( $paymentID, $trxID );

return $response();
}


/**
* @return string
Expand Down

0 comments on commit 15db701

Please sign in to comment.