mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2025-04-06 03:58:03 +08:00
[更新]修改支付宝支付 #19
This commit is contained in:
parent
7d02bdc83f
commit
ef2ab99cb4
@ -183,7 +183,7 @@ abstract class BasicAliPay
|
|||||||
*/
|
*/
|
||||||
protected function applyData($options)
|
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();
|
$this->options['sign'] = $this->getSign();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ abstract class BasicAliPay
|
|||||||
protected function buildPayHtml()
|
protected function buildPayHtml()
|
||||||
{
|
{
|
||||||
$html = "<form id='alipaysubmit' name='alipaysubmit' action='{$this->gateway}' method='post'>";
|
$html = "<form id='alipaysubmit' name='alipaysubmit' action='{$this->gateway}' method='post'>";
|
||||||
foreach ($this->params->get() as $key => $value) {
|
foreach ($this->options->get() as $key => $value) {
|
||||||
$value = str_replace("'", ''', $value);
|
$value = str_replace("'", ''', $value);
|
||||||
$html .= "<input type='hidden' name='{$key}' value='{$value}'/>";
|
$html .= "<input type='hidden' name='{$key}' value='{$value}'/>";
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,7 @@ try {
|
|||||||
'total_amount' => '1', // 支付金额
|
'total_amount' => '1', // 支付金额
|
||||||
'subject' => '支付订单描述', // 支付订单描述
|
'subject' => '支付订单描述', // 支付订单描述
|
||||||
]);
|
]);
|
||||||
echo '<pre>';
|
echo $result;
|
||||||
var_export($result);
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,7 @@ try {
|
|||||||
'total_amount' => '1', // 支付金额
|
'total_amount' => '1', // 支付金额
|
||||||
'subject' => '支付订单描述', // 支付订单描述
|
'subject' => '支付订单描述', // 支付订单描述
|
||||||
]);
|
]);
|
||||||
echo '<pre>';
|
echo $result;
|
||||||
var_export($result);
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user