Add mode of payment field for request jo api call #146

This commit is contained in:
Kendrick Chan 2018-06-17 14:01:45 +08:00
parent 68c3b8d4cc
commit 7f4f1e440e

View file

@ -737,6 +737,7 @@ class APIController extends Controller
'long',
'lat',
'warranty',
'mode_of_payment',
];
$em = $this->getDoctrine()->getManager();
$res = $this->checkParamsAndKey($req, $em, $required_params);
@ -749,7 +750,9 @@ class APIController extends Controller
->setDeliveryInstructions('')
->setTier1Notes('')
->setTier2Notes('')
->setDeliveryAddress('Set by mobile application');
->setDeliveryAddress('Set by mobile application')
// TODO: error check for valid mode of payment
->setModeOfPayment($req->request->get('mode_of_payment'));
// customer
$cust = $this->session->getCustomer();