Getting server-side query strings for Alipay mobile payment

I'm not quite sure how popular or whether this question will get any answers, since this question is more related to Chinese developers than developers outside, however, I'm currently working on integrating server-side scripts for Alipay to get success request lines for mobile devices.

I was able to successfully provide my mobile guys (through the squint of my eyes in the terrible Alipay API) the lines needed to pay them Alipay. It follows this format [no identifiable information specified]:

_input_charset=\"utf-8\"&body=\"Order Number: 20141121_80\"&it_b_pay=\"30m\"&notify_url=\"http://somePublicFacingIP:8080/index.php?route=payment/alipay/callback\"&out_trade_no=\"80\"&partner=\"2088611100000000\"&payment_type=\"1\"&seller_id=\"account@website.com\"&service=\"mobile.securitypay.pay\"&subject=\"Order Number: 20141121_80\"&total_fee=\"10.01\"

The above line is consumed by the Android / iOS API in their Alipay payment classes, then signed with a private key, and then sent to Alipay. After Alipay received their request, they would check our line of parameters and send status codes in the range from 6000 to 9000.

We have so far received resultStatus=9000in a line that is returned to the mobile guys, which indicates a successful payment (and, checking the history of Alipay's wallet, we really see that we made the payment)

result = {
    memo = "";
    result = "_input_charset=\"utf-8\"&body=\"\U4ea4\U6613\U53f7 20141124_80\"&it_b_pay=\"30m\"&notify_url=\"http://publicFacingIP:8080/index.php?route=payment/alipay/callback\"&out_trade_no=\"80\"&partner=\"208861100000000\"&payment_type=\"1\"&seller_id=\"account@website.com\"&service=\"mobile.securitypay.pay\"&subject=\"\U65b0\U5143\U7d20\U7f51\U4e0a\U70b9\U9910 - \U8ba2\U5355\U7f16\U53f7 20141124_87\"&total_fee=\"0.01\"&success=\"true\"&sign_type=\"RSA\"&sign=\"reallyLongSignedString\"";
    resultStatus = 9000;
}

Here everything stops working:

Alipay ( , ) notify_url, , , - Alipay. back-end, , .

- Alipay notify_url.

:

  • a var_dump() POST payment/alipay/callback. .

  • cURLing IP- payment/alipay/callback, , , , , URL callback .

  • . , , , .

, "大 神" ( ), / ?

+4
1

, Alipay.

, notify_url, notify PHP , ( HTML ).

, :

  • notify_url

  • Alipay - , (. , , ).

Notify ( ). , , . , . , && ..

+1

All Articles