jsapi.php必须传openid,微信小程序支付报错:JSAPI支付必须传openid

在以上文件中添加如下语句:

var_dump($order);

echo '
===';

var_dump($identity);

echo '
==='.$identity->phone .'
==='.$identity->wx_micro_openid;

exit();

返显信息如下:

array(10) { ["appid"]=> string(18) "隐藏" ["device_info"]=> string(4) "1000" ["err_code"]=> string(11) "PARAM_ERROR" ["err_code_des"]=> string(26) "JSAPI支付必须传openid" ["mch_id"]=> string(10) "隐藏" ["nonce_str"]=> string(16) "PewQgH4ihkniLh3K" ["result_code"]=> string(4) "FAIL" ["return_code"]=> string(7) "SUCCESS" ["return_msg"]=> string(2) "OK" ["sign"]=> string(32) "38002EE7C02E27B90CDCF10F8A77AF5B" }

===object(fecshop\models\mysqldb\Customer)#153 (10) { ["_attributes":"yii\db\BaseActiveRecord":private]=> array(28) { ["id"]=> int(12) ["email"]=> NULL ["phone"]=> string(11) "138044隐藏" ["firstname"]=> NULL ["lastname"]=> NULL ["is_subscribed"]=> int(2) ["status"]=> int(1) ["birth_date"]=> NULL ["favorite_product_count"]=> int(0) ["type"]=> string(7) "default" ["access_token_created_at"]=> int(1611237760) ["allowance"]=> NULL ["allowance_updated_at"]=> NULL ["wx_password_is_set"]=> int(2) ["wallet"]=> string(4) "0.00" ["group_id"]=> NULL ["console_add_group"]=> int(1) ["point"]=> string(4) "0.00" ["customer_code"]=> NULL ["customer_parent_id"]=> NULL ["is_distribute"]=> int(1) ["distribute_wallet"]=> string(4) "0.00" ["distribute_group_id"]=> NULL ["distribute_status"]=> int(1) ["distribute_code"]=> string(36) "36470588-508a-11eb-b225-隐藏" ["distribute_created_at"]=> int(1609984011) ["distribute_parent_id"]=> NULL ["distribute_phone"]=> string(11) "隐藏" } ["_oldAttributes":"yii\db\BaseActiveRecord":private]=> array(42) { ["id"]=> int(12) ["password_hash"]=> string(60) "隐藏" ["password_reset_token"]=> NULL ["register_enable_token"]=> NULL ["email"]=> NULL ["phone"]=> string(11) "138044隐藏" ["firstname"]=> NULL ["lastname"]=> NULL ["is_subscribed"]=> int(2) ["auth_key"]=> string(32) "_mog0Grn85隐藏" ["status"]=> int(1) ["created_at"]=> int(1606028410) ["updated_at"]=> int(1606028410) ["password"]=> string(0) "" ["access_token"]=> string(32) "1ZLa51yK_隐藏" ["birth_date"]=> NULL ["favorite_product_count"]=> int(0) ["type"]=> string(7) "default" ["access_token_created_at"]=> int(1611237760) ["allowance"]=> NULL ["allowance_updated_at"]=> NULL ["wx_session_key"]=> string(24) "7ttZd隐藏" ["wx_openid"]=> NULL ["wx_micro_openid"]=> string(28) "oUDEQ0YzOXlfCg6kvktj2_隐藏" ["wx_password_is_set"]=> int(2) ["customer_bank"]=> NULL ["customer_bank_name"]=> NULL ["customer_bank_account"]=> NULL ["wallet"]=> string(4) "0.00" ["group_id"]=> NULL ["console_add_group"]=> int(1) ["point"]=> string(4) "0.00" ["customer_code"]=> NULL ["customer_parent_id"]=> NULL ["is_distribute"]=> int(1) ["distribute_wallet"]=> string(4) "0.00" ["distribute_group_id"]=> NULL ["distribute_status"]=> int(1) ["distribute_code"]=> string(36) "36470588-508a-11eb-b2隐藏c" ["distribute_created_at"]=> int(1609984011) ["distribute_parent_id"]=> NULL ["distribute_phone"]=> string(11) "1380隐藏" } ["_related":"yii\db\BaseActiveRecord":private]=> array(0) { } ["_relationsDependencies":"yii\db\BaseActiveRecord":private]=> array(0) { } ["_errors":"yii\base\Model":private]=> NULL ["_validators":"yii\base\Model":private]=> NULL ["_scenario":"yii\base\Model":private]=> string(7) "default" ["_events":"yii\base\Component":private]=> array(0) { } ["_eventWildcards":"yii\base\Component":private]=> array(0) { } ["_behaviors":"yii\base\Component":private]=> array(0) { } }

===138044隐藏

===

隐藏处是部分数字或字符

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值