From ef2ab99cb4addbbeaeda6ae585d580794b4e984a Mon Sep 17 00:00:00 2001 From: Anyon Date: Tue, 13 Nov 2018 17:37:19 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=AE=9D=E6=94=AF=E4=BB=98=20#19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeChat/Contracts/BasicAliPay.php | 4 ++-- _test/alipay-wap.php | 3 +-- _test/alipay-web.php | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/WeChat/Contracts/BasicAliPay.php b/WeChat/Contracts/BasicAliPay.php index 36140ce..2f60801 100644 --- a/WeChat/Contracts/BasicAliPay.php +++ b/WeChat/Contracts/BasicAliPay.php @@ -183,7 +183,7 @@ abstract class BasicAliPay */ protected function applyData($options) { - $this->options['biz_content'] = json_encode($options, JSON_UNESCAPED_UNICODE); + $this->options['biz_content'] = json_encode($this->params->merge($options), JSON_UNESCAPED_UNICODE); $this->options['sign'] = $this->getSign(); } @@ -216,7 +216,7 @@ abstract class BasicAliPay protected function buildPayHtml() { $html = "
"; - foreach ($this->params->get() as $key => $value) { + foreach ($this->options->get() as $key => $value) { $value = str_replace("'", ''', $value); $html .= ""; } diff --git a/_test/alipay-wap.php b/_test/alipay-wap.php index 8a0aab3..3b63833 100644 --- a/_test/alipay-wap.php +++ b/_test/alipay-wap.php @@ -31,8 +31,7 @@ try { 'total_amount' => '1', // 支付金额 'subject' => '支付订单描述', // 支付订单描述 ]); - echo '
';
-    var_export($result);
+    echo $result;
 } catch (Exception $e) {
     echo $e->getMessage();
 }
diff --git a/_test/alipay-web.php b/_test/alipay-web.php
index 2225f11..e0e3b86 100644
--- a/_test/alipay-web.php
+++ b/_test/alipay-web.php
@@ -32,8 +32,7 @@ try {
         'total_amount' => '1', // 支付金额
         'subject'      => '支付订单描述', // 支付订单描述
     ]);
-    echo '
';
-    var_export($result);
+    echo $result;
 } catch (Exception $e) {
     echo $e->getMessage();
 }