UnionPay payment interface Common Errors
Author attilax
1466519819@qq.com
FAQs
1) Error 157 is reported during development.
A: Check whether the consumer ID is 0001. If yes, delete 0001.
2) When I click Submit after online payment, the page prompts: the standard data domain cannot be blank. What should I do?
A: The Merchant checks whether each program is written according to the content in the netpayclient user manual. When this prompt appears, it indicates that the programmer did not follow the program in the manual, and there were low-level errors such as spelling errors and missing important data. Remind merchants to check the following important parameters: merid, ordid, transamt, curyid, transdate, transtype, and all programs related to these important parameters.
Typical cases:
When programming a company, enter:
......
<Input type = hidden name = "cruyid" value = "156">
......
The correct one should be:
<Input type = hidden name = "curyid" value = "156">. Due to a word error, the original important information cannot be read during data reading, that is, the important parameters contained in curyid cannot be found, resulting in the prompt that the standard data domain cannot be empty.
3) How can I solve the "Error 500" reported by the merchant during the test?
A: This error is a system error. It is a programming error. This error is caused by mixing the test submission address with the official submission address.
Typical cases:
Input:
......
<Form action = https://payment.chinapay.com/pay/transget method = post>
......
Because it is a test merchant, the content after the action should be http://payment-test.chinapay.com/, that is, the prepared input should be:
<Form action = http://payment-test.chinapay.com/pay/transget
Method = post>.
4) What should I do if the merchant encounters the-109 error?
A:-Error 109 indicates that the encryption is unsuccessful,It may be caused by multiple problems. The main reason for this problem is that the merchant's signature method used during the development process is incorrect, resulting in a failure to sign the signature. Here,Remind merchants to pay attention to the interface version number.The version 20070129 and 20040916 are different in development. Incorrect signature format may lead to incorrect signatures. Please read the operation documentation page 21st carefully ~ 25 pages.
In Version 07, a string signature is required. The specific differences are as follows:
|
|
Interface Type |
20040916 |
20070129 |
|
Send transaction |
Netpayclient for Java |
Signorder |
Sign |
|
Netpayclient for Win32 |
Sign |
Signdata |
|
Netpayclient for C |
Signorder |
Signdata |
|
Receive transactions |
Netpayclient for Java |
Verifytransresponse |
Verifytransresponse |
|
Netpayclient for Win32 |
Check |
Check |
|
Netpayclient for C |
Verifytransresponse |
Verifytransresponse |
When this error occurs, you can use the method mentioned in 2.1 to check the code sending status for the user.
5) What should I do if a merchant encounters an invalid length?
A: The Invalid Length is caused by the fact that the parameter length of the merchant is not configured as required during configuration. For example, if the order number is not 16 bits, the transaction date is not 8 bits, the transaction amount is not 12 bits, and the checkvalue is not generated, the length will be invalid.
The sending parameters are described as follows:
Parameter description:
String merid: The Merchant ID. It is a string of 15 bytes and is allocated by chinapay or the Clearing Bank.
String ordid order number, which is a 16-byte numeric string generated by the merchant system. The failed order number can be paid repeatedly.
String transamt transaction amount, which is a 12-byte numeric string. For example, a numeric string "000000001234" indicates 12.34 yuan.
String curyid currency code, which is a three-byte numeric string. Currently, only RMB is supported and the value is "156 ".
String transdate refers to the transaction date, which is an 8-byte numeric string in the format of yyyymmdd.
String transtype
Transaction type. It is a four-byte numeric string with a value range of: "0001" and "0002". "0001" indicates a consumption transaction, and "0002" indicates a return transaction.
Return Value:
String checkvalue [256] indicates the merchant digital signature generated by netpayclient based on the preceding input parameters. It is a string of 256 bytes.
6) What's wrong with errorcode = 110?
A: The response address on the merchant page or the background response address is too long. The URL received by background transactions. The length must not exceed 80 bytes. If the length exceeds 80 bytes, this error is returned. It is recommended that the merchant modify the background response and page response address by themselves, and control the address within 80 bytes.
7) What should I do if the axtivex control cannot create an object or the dynamic link library is not registered during ASP development?
Answer: 1) Ask the merchant to check whether the script of the XP system has been updated to the latest version. 2) whether the load is correctChinapay. dllAndCpnpc. dllFile. At the same time,Netpay. dll must be placed in the System32 folder.
8) What is the illegal page during development?
Answer:: The submission page should use a pop-up window. If the merchant uses a framework interface, the page cannot jump normally during submission, that is, an invalid page will be reported.. It is recommended that merchants modify the webpage structure. Do not try to jump to the page within the framework of the page, but use the pop-up window method.
9) Other possible error messages when sending transactions.
|
Signature Method |
|
-100 |
Environment Variable "npcdir" not set |
|
-101 |
The CMK file does not exist or cannot be opened |
|
-102 |
Incorrect key file format |
|
-103 |
The key merchant ID is inconsistent with the merchant ID used for signature. |
|
-130 |
The string used for signature is null. |
10) during the test, the payment is successful. Is the verification signature incorrect when the merchant page is returned?
A: First, check whether the various merchant programs are written in accordance with the content in the netpayclient user manual. At the same time, note that when receiving a response, the signature method of version 20070129 is different from that of version 20040916!
Typical cases:
Enter:
......
Chkvalue = request. getparameter ("chkvalue ")
......
Because the sent parameter name is chkvalue, the returned value is also chkvalue, which should actually be checkvalue. Therefore, the passed null value cannot be verified. That is:
Chkvalue = request. getparameter ("checkvalue ")
This is a verification signature error that has not been programmed in accordance with the Manual.
11) What should I do if the merchant fails to initialize the Public Key?
A:First, whether the merchant uses Java for interface development. If yes, ask the merchant to check whether the merchant ID should be filled in the public key code in the program.
Typical cases:
Programmers of a merchant enter:
......
Flag = key. buildkey ("808080002100999", 0 "C: \ winnt \ pgpubk. Key ");
......
The correct one should be:
......
Flag = key. buildkey ("999999999999999", 0 "C: \ winnt \ pgpubk. Key ");
......
12) What should I do if the merchant encounters the-118 error?
A: Generally, this problem does not occur. The main reason is that the key used by the merchant for signature verification is incorrect or the parameters for passing in the signature are incorrect. For example, when the merchant uses the key or signature of the production merchant, the input parameters are incorrect and cannot be correctly verified.
Typical cases:
A merchant used the public key of the producer during the launch of the test system, resulting in error-118.After the public key of the test merchant is replaced, the problem is solved.
13) What should I do if I fail to receive the reply in the background?
A: Check whether the receiving response code determines whether the receiving condition of the response is correct. Whether the receiving response address is correct when the response is sent.
14) How do I notify chinapay after receiving a response from the background?
A:Automatic websever feedback,Generally, Code 200 is automatically returned when a message is received successfully. Therefore, the merchant does not need to return any parameters. Only when orderstatus is 1001, the transaction is successful. Other transactions are failed transactions. Merchants must determine the transaction and add it to their own databases.
15) What should I do if loadlib (chinapay. dll) fails?
Netpay. dll must be placed in the System32 folder.
Reference
Merchant payment access user manual ver2.5.17 (version 2012.9)