Add cash to mode of payments. #424

This commit is contained in:
Korina Cordero 2020-06-26 05:22:46 +00:00
parent 481420294e
commit 818a8fff30
2 changed files with 3 additions and 1 deletions

View file

@ -4,12 +4,14 @@ namespace App\Ramcar;
class CMBModeOfPayment extends NameValue
{
const CASH = 'cash';
const SHOPEE = 'shopee';
const LAZADA = 'lazada';
const CREDIT_CARD = 'credit_card';
const ONLINE_TRANSFER = 'online_transfer';
const COLLECTION = [
'cash' => 'Cash',
'shopee' => 'Shopee',
'lazada' => 'Lazada',
'credit_card' => 'Credit Card',

View file

@ -1256,7 +1256,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
// TODO: defaulting to credit_card for now if mode of payment is invalid
$mode = $req->request->get('mode_of_payment');
if (!CMBModeOfPayment::validate($mode))
$mode = CMBModeOfPayment::CREDIT_CARD;
$mode = CMBModeOfPayment::CASH;
$jo->setModeOfPayment($mode);
// generate new invoice