Add cash to mode of payments. #424
This commit is contained in:
parent
481420294e
commit
818a8fff30
2 changed files with 3 additions and 1 deletions
|
|
@ -4,12 +4,14 @@ namespace App\Ramcar;
|
||||||
|
|
||||||
class CMBModeOfPayment extends NameValue
|
class CMBModeOfPayment extends NameValue
|
||||||
{
|
{
|
||||||
|
const CASH = 'cash';
|
||||||
const SHOPEE = 'shopee';
|
const SHOPEE = 'shopee';
|
||||||
const LAZADA = 'lazada';
|
const LAZADA = 'lazada';
|
||||||
const CREDIT_CARD = 'credit_card';
|
const CREDIT_CARD = 'credit_card';
|
||||||
const ONLINE_TRANSFER = 'online_transfer';
|
const ONLINE_TRANSFER = 'online_transfer';
|
||||||
|
|
||||||
const COLLECTION = [
|
const COLLECTION = [
|
||||||
|
'cash' => 'Cash',
|
||||||
'shopee' => 'Shopee',
|
'shopee' => 'Shopee',
|
||||||
'lazada' => 'Lazada',
|
'lazada' => 'Lazada',
|
||||||
'credit_card' => 'Credit Card',
|
'credit_card' => 'Credit Card',
|
||||||
|
|
|
||||||
|
|
@ -1256,7 +1256,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
// TODO: defaulting to credit_card for now if mode of payment is invalid
|
// TODO: defaulting to credit_card for now if mode of payment is invalid
|
||||||
$mode = $req->request->get('mode_of_payment');
|
$mode = $req->request->get('mode_of_payment');
|
||||||
if (!CMBModeOfPayment::validate($mode))
|
if (!CMBModeOfPayment::validate($mode))
|
||||||
$mode = CMBModeOfPayment::CREDIT_CARD;
|
$mode = CMBModeOfPayment::CASH;
|
||||||
$jo->setModeOfPayment($mode);
|
$jo->setModeOfPayment($mode);
|
||||||
|
|
||||||
// generate new invoice
|
// generate new invoice
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue