Skip to content

Commit

Permalink
Merge pull request #6 from hizbul25/feature/check-refund-status
Browse files Browse the repository at this point in the history
check refund status
  • Loading branch information
Shipu committed Jul 16, 2020
2 parents e82659b + 15db701 commit 66f9efb
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
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
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 66f9efb

Please sign in to comment.