Offline payment method for customer

This commit is contained in:
cuneytsenturk
2017-11-18 16:57:55 +03:00
parent 6e7b9d6964
commit 994998dc0b
8 changed files with 180 additions and 21 deletions

View File

@@ -18,11 +18,28 @@ class OfflinePaymentConfirm
return [];
}
$invoice = $event->invoice;
$gateway = [];
$payment_methods = json_decode(setting('offlinepayment.methods'), true);
foreach ($payment_methods as $payment_method) {
if ($payment_method['code'] == $event->gateway) {
$gateway = $payment_method;
break;
}
}
$html = view('offlinepayment::confirm', compact('gateway', 'invoice'))->render();
return [
'code' => $event->gateway,
'name' => $event->gateway,
'code' => $gateway['code'],
'name' => $gateway['name'],
'description' => $gateway['description'],
'redirect' => false,
'html' => true,
'html' => $html,
];
}
}