Home > Mobile >  Only pay once WeChat Android end, remove the WeChat user data, or uninstall WeChat to pay again
Only pay once WeChat Android end, remove the WeChat user data, or uninstall WeChat to pay again

Time:11-16

Phenomenon:

1 WeChat sharing and normal landing, WeChat pay always returns 1

2 WeChat payment and share with the same appid

3 WeChat payments permissions has opened three days, there is the ability to pay, open platform can also see that payment is approved

4 lift payment code is no problem (official demo app shouldn't be a problem, only replace the appid, package name and signature (also considering the differences, the debug and relece configuration the relece signature), can also replace another project normal payments)

5 PayEntityActivity properly configured, according to official demo configuration

6 put PayEntityActivity in the location specified by the

Ask each other with WeChat open platform reply below
#
1, unified order to return to normal (steps behind the interface USES the appid, McHid, prepayid, whether parameter matching)
#
2, the second signature process is correct (this step merchants must be strictly in accordance with the parameters of the document list for signature, remind merchant made check signature tool)
#
2.1, here comes a detail: the interface without sign_type parameters, if under the uniform use of HMAC - SHA256 signature, this step is must be HMAC - SHA256;
#
2.2, the signature of the parameter list must match exactly with document: the same case, the parameter value to consistent with the unified order interface, pay special attention to parameter name: partnerid, values for McHid (kaiping SDK historical reasons, cannot be renamed)
#
2.3, the sign and unity of the generated order this step is not the same, there are often merchants directly transfer orders with unified interface sign come
#
3, check the client calls sendReq (PayReq) object assignment is correct (if necessary) for merchants to provide data, as in the case of a merchant will through asynchronous access to the back-end data, such as data object is obtained by the asynchronous request object: request. AppId=data. The appId; The actual appid attribute value is empty,
#
4, check the configuration
#
4.1, the Android request application background is configured correctly on the open platform signatures and package name
#
4.2, IOS does not need to be in kaiping configuration, but for businesses in the development environment of red configuration for corresponding APPID is correct URLSchemes

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

According to the official reply of trying again and again, I don't believe in his own eyes, using the text alignment tool, couldn't find the official mentioned problems

As Android development is very difficult, because pay only lift time, first of all, the background development will use the WeChat provide the signature of the calibration tool, tell you it is no problem that the signature of the background

He will tell you, H5 and M stand there is no problem, must be my code has a problem, my god, I've developed for seven years, and lift to pay only ten lines of code

I keep trying to identify problems, finally there is no way, pulling back together from the new start screen, official WeChat inside each screening,

Results: because we WeChat exist multiterminal payment, so there are multiple appid, H5 with service, appid and our Android also has its own appid

Suspect this problem before, so let the background signature back to me, or not, because he did not use the appid to unified order, but directly to I returned, so has been an error:

Appid error, please contact service

conclusion: if the Android end ruled out all kinds of situation, or can only lift a payment, please note: unified order with appid and signature appid and Android end

Lift the appid paid to maintain consistent, inconsistent problems could

Why is a possible problem, not have problems? This is also I met a big pit, the analogy I will own code another project, found that the background of return to sign the

The appid and projects to lift the appid WeChat pay is not the same, still can normal payment, so I thought this should not be same appid, finally found that this involves

App of old and new replacement, although appid is different, but in application package name and signature are all the same, so the background return appid and Android side lift WeChat appid can

To different,
  • Related