fenshen233
分神Mater
2017-11-15 08:17

微信支付回调sign与发送的sign不一致

  • 微信
  • php

我使用的是微信**官方的PHP微信支付demo**

可以正常生成支付二维码,也可以正常支付。

但是发送的签名和回调页面接收的签名不一致!

比如:
发送的数据如下:

(
[values:protected] => Array
(
[appid] => wx76f7cd2ec7b8ab2d
[attach] => test
[body] => test
[goods_tag] => test
[mch_id] => 1488792332
[nonce_str] => 8qr8mtclw9jy8xba2rvhcq32vc8wk2do
[notify_url] => http://xxx.xxx.com/wxpay/callback
[out_trade_no] => 148879233220171115161152
[product_id] => 123456789
[spbill_create_ip] => 192.168.1.37
[time_expire] => 20171115162152
[time_start] => 20171115161152
[total_fee] => 1
[trade_type] => NATIVE
[sign] => BB76D04E3DCAD9CE70257E3ACC9151D2
)

返回的数据如下:

array (
'appid' => 'wx76f7cd2ec7b8ab2d',
'attach' => 'test',
'bank_type' => 'CFT',
'cash_fee' => '1',
'fee_type' => 'CNY',
'is_subscribe' => 'Y',
'mch_id' => '1488792332',
'nonce_str' => '8qr8mtclw9jy8xba2rvhcq32vc8wk2do',
'openid' => 'oBKxE1S1yV9LbhVE6u50Jd0Uu_uM',
'out_trade_no' => '148879233220171115161152',
'result_code' => 'SUCCESS',
'return_code' => 'SUCCESS',
'sign' => 'FA8ECA45F2AB40D7ABEC5A0D7308ADC8',
'time_end' => '20171115161214',
'total_fee' => '1',
'trade_type' => 'NATIVE',
'transaction_id' => '4200000028201711154840327436',
)

可以看到sign字段不一致!求大神解答!

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答