diff --git a/plugins/redform_payment/nganluong/helpers/payment.php b/plugins/redform_payment/nganluong/helpers/payment.php index c6bdc1c94eb3..d544c25136e5 100644 --- a/plugins/redform_payment/nganluong/helpers/payment.php +++ b/plugins/redform_payment/nganluong/helpers/payment.php @@ -104,10 +104,12 @@ public function notify() $returnUrl = $input->post->get('return_url'); $cancelUrl = urlencode($input->post->get('cancel_url')); - $buyerFullname = $input->post->get('buyer_fullname'); - $buyerEmail = $input->post->get('buyer_email'); - $buyerMobile = $input->post->get('buyer_mobile'); - $buyerAddress = ''; + $billingInfo = $this->getBillingInfo($details->id); + + $buyerFullname = $billingInfo->fullname; + $buyerEmail = $billingInfo->email; + $buyerMobile = $billingInfo->phone; + $buyerAddress = $billingInfo->address; $resp = array(); $resp[] = 'id:' . $orderCode; @@ -176,4 +178,22 @@ protected function getOrderID($cartId) return $db->setQuery($query)->loadResult(); } + + /** + * get order id + * + * @param int $cartId cart ID + * + * @return object + */ + protected function getBillingInfo($cartId) + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true) + ->select('b.*') + ->from($db->qn('#__rwf_billinginfo', 'b')) + ->where($db->qn('b.cart_id') . ' = ' . $db->q((int) $cartId)); + + return $db->setQuery($query)->loadObject(); + } } diff --git a/plugins/redform_payment/nganluong/layouts/notify.php b/plugins/redform_payment/nganluong/layouts/notify.php index b76d0b11d266..c7468e55fbe7 100644 --- a/plugins/redform_payment/nganluong/layouts/notify.php +++ b/plugins/redform_payment/nganluong/layouts/notify.php @@ -92,27 +92,7 @@ width: 90px; } -
- - - - - - - - - - - - - -

- -
- -
- -
+