在以上文件中添加如下语句:
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隐藏
===
隐藏处是部分数字或字符