|
|
@@ -117,7 +117,18 @@ class Clearpay extends Afterpay
|
|
|
return $resultObject->token;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ public function captureAndVerify($order, $transactionId)
|
|
|
+ {
|
|
|
+ if ($order->status != Order::STATUS_PENDING) {
|
|
|
+ return new \Exception('order status is error');
|
|
|
+ }
|
|
|
+ $additional = $order->payment->additional;
|
|
|
+ $token = $additional['gateway_order_id'];
|
|
|
+ if ($transactionId != $token) {
|
|
|
+ return new \Exception('order token is error');
|
|
|
+ }
|
|
|
+ return $this->capture($token);
|
|
|
+ }
|
|
|
public function getCountryOptions(): array
|
|
|
{
|
|
|
return core()->countries()->map(function ($country) {
|