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();
 }