Payment webhook fixes

This commit is contained in:
Hillel Coren 2016-06-24 18:15:51 +03:00
parent 406249ef95
commit 45fce3bfe9
3 changed files with 3 additions and 2 deletions

View File

@ -84,7 +84,7 @@ class OnlinePaymentController extends BaseController
} }
} }
private function error($paymentDriver, $exception, $showPayment) private function error($paymentDriver, $exception, $showPayment = false)
{ {
if (is_string($exception)) { if (is_string($exception)) {
$displayError = $exception; $displayError = $exception;

View File

@ -162,7 +162,7 @@ class Payment extends EntityModel
Event::fire(new PaymentCompleted($this)); Event::fire(new PaymentCompleted($this));
} }
public function markFailed($failureMessage) public function markFailed($failureMessage = '')
{ {
$this->payment_status_id = PAYMENT_STATUS_FAILED; $this->payment_status_id = PAYMENT_STATUS_FAILED;
$this->gateway_error = $failureMessage; $this->gateway_error = $failureMessage;

View File

@ -215,6 +215,7 @@ class WePayPaymentDriver extends BasePaymentDriver
public function handleWebHook($input) public function handleWebHook($input)
{ {
$accountGateway = $this->accountGateway;
$accountId = $accountGateway->account_id; $accountId = $accountGateway->account_id;
foreach (array_keys($input) as $key) { foreach (array_keys($input) as $key) {