Clarfiy paymen error failure

This commit is contained in:
Hillel Coren 2017-10-18 20:13:57 +03:00
parent 6304d707a7
commit f84bc4136a

View File

@ -318,7 +318,11 @@ class BasePaymentDriver
// parse the transaction reference
if ($this->transactionReferenceParam) {
if (isset($this->purchaseResponse[$this->transactionReferenceParam])) {
$ref = $this->purchaseResponse[$this->transactionReferenceParam];
} else {
throw new Exception($response->getMessage() ?: trans('texts.payment_error'));
}
} else {
$ref = $response->getTransactionReference();
}