Skip to content

Commit

Permalink
商品說明參數改為必填
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryder Hsieh authored and Ryder Hsieh committed Mar 13, 2023
1 parent a0bc671 commit 902199b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion upload/catalog/controller/extension/payment/payunipayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,19 @@ public function confirm() {
private function uppOnePointHandler() {
$this->load->model('checkout/order');
// 訂單資料
$orderInfo = $this->model_checkout_order->getOrder($this->session->data['order_id']);
$orderInfo = $this->model_checkout_order->getOrder($this->session->data['order_id']);
// 商品資料
$productsInfo = $this->model_checkout_order->getOrderProducts($this->session->data['order_id']);
$prodDesc = [];
foreach ($productsInfo as $product) {
$prodDesc[] = $product['name'] . ' * ' . $product['quantity'];
}

$encryptInfo = [
'MerID' => $this->configSetting['merchant_id'],
'MerTradeNo' => $orderInfo['order_id'],
'TradeAmt' => (int) $orderInfo['total'],
'ProdDesc' => implode(';', $prodDesc),
'ReturnURL' => $this->url->link('extension/payment/payunipayment/returnInfo'), //幕前
'NotifyURL' => $this->url->link('extension/payment/payunipayment/notify'), //幕後
'UsrMail' => (isset($orderInfo['email'])) ? $orderInfo['email'] : '',
Expand Down

0 comments on commit 902199b

Please sign in to comment.