Requesting Services Using the SCMP API

Requesting Services Using the SCMP API
Processing Payments in China
This section provides detailed information about processing a China payment. For a simpler overview, see Credit Cards, China Bank Transfers, and China eWallet.
Sending a Payment Request to CyberSource
To request a payment:
Step 1
Payment Request Fields, describes the required and optional fields to include in the request.
Step 2
CyberSource responds with a payment reply message containing the fields described in Payment Reply Fields.
 
Sending the Form Data to the Processor
The payment reply message from CyberSource includes the china_payment_form_data field. The form data is fully formatted text that you must send to the processor. The form data uses the GBK character set.
To send the form data:
Step 1
An example of code you can use to decode the form data:
where:
encoded_data is a java.lang.String object that contains the form_data response field value.
Step 2
An example of a POST operation you can use to send the form data to the processor:
The POST operation sends the form data to the URL that is included in the form data.
The processor responds by sending you a payment response message with the fields described in PayEase Response Fields.
 
Verifying the Response from the Processor
Use an MD5 algorithm to verify the PayEase response.
The MD in MD5 stands for Message Digest. An MD5 algorithm can be used with any data and it always produces a string of the same size. This string is called a digest. When a public/private key pair is used to create a digest for a given text, the digest is called a signature. The recipient of the text can authenticate the text by using the signature, the MD5 digest of the text, and the public half of the key pair.
To verify a response from the processor:
Step 1
Use the v_pstatus value from the PayEase response to determine which CyberSource verification value to use. For example:
 
Step 2
 
Step 3
Invoke the MD5 object’s publicVerifyMD5 method with the following values:
Signature—the v_sign field value from the PayEase response.
CyberSource verification value—the value that you selected in Step 1 and is the text from which the digest is created. For example:
Example
 
Tracking the Transaction
Track the transaction as described in Obtaining Information About Your Transactions.