Resolve "Resq - message prompt for non-serviceable area" #1353

Merged
korina.cordero merged 176 commits from 463-resq-message-prompt-for-non-serviceable-area into 465-resq-august-13-release 2020-08-12 05:41:57 +00:00
2 changed files with 15 additions and 5 deletions
Showing only changes of commit 4ec5ddd993 - Show all commits

View file

@ -4,13 +4,15 @@ namespace App\Ramcar;
class CMBModeOfPayment extends NameValue
{
const CASH = 'cash';
const SHOPEE = 'shopee';
const LAZADA = 'lazada';
const CREDIT_CARD = 'credit_card';
const BANK_TRANSFER = 'bank_transfer';
const ONLINE_TRANSFER = 'online_transfer';
const COLLECTION = [
'cash' => 'Cash',
'shopee' => 'Shopee',
'lazada' => 'Lazada',
'credit_card' => 'Credit Card',
'bank_transfer' => 'Bank Transfer',
'online_transfer' => 'Online Transfer',
];
}

View file

@ -1007,7 +1007,10 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
public function payment(Request $req)
{
$required_params = ['jo_id'];
$required_params = [
'jo_id',
'mode_of_payment',
];
$data = $this->checkActiveJO($req, $required_params, $jo);
if (isset($data['error']))
{
@ -1015,6 +1018,11 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
return $data;
}
// add mode of payment
$mode = $req->request->get('mode_of_payment');
$jo->setModeOfPayment($mode);
// set invoice to paid
$jo->getInvoice()->setStatus(InvoiceStatus::PAID);