Micro letter - Alipay - paid response body

Pay with Ali-Pay:

 This is the situation calls inside the sandbox Alipay:

GET 响应页面回调
alipay/?charset=utf-8&out_trade_no=201905311018080220368&method=alipay.trade.page.pay.return&total_amount=0.10&sign=WpCYcEajOO%2Bm4SkGXV8RxkGq%2BWhsqz8aNE2vtXd83qdRhWasCwEszY3p4U23QS5miOBNcO1cNqY8xAEgLFVQIhbKbRyCNPjqwKP8D8GLlCkwVTs%2FRjJfI4x39hGYsexfjqMCDn7NSajJd1zu1%2B9zDda6Lds%2BYcwyFO%2FGKASSw%2FFOwg3y7wd1QsVefkzO1Ip6xdrlGpsXChQjmXMTgSQuZeo%2F9u9T13AOtR%2FgyIXyOUebe5Lqj74TMO1Ebge2qjWX4EL1pa5c9ufnAZUCr%2BXXlx1clquYxtv1ebCQxgRvcozF3I9q7RUOj2lh17JU8R50HedGwr1VxEEUdmTyvhdkoQ%3D%3D&trade_no=2019053122001494381000047437&auth_app_id=2016092100560653&version=1.0&app_id=2016092100560653&sign_type=RSA2&seller_id=2088102176582150&timestamp=2019-05-31+10%3A18%3A52 HTTP/1.1" 200 0
POST response from the server callback 
<QueryDict: { ' gmt_create ' : [ ' 2019-05-31 10:18:38 ' ], ' charset ' : [ ' UTF-. 8 ' ], ' gmt_payment ' : [ ' 2019-05-31 10:18:45 ' ], ' notify_time ' : [ ' 2019-05-31 10:18:46 ' ], ' Subject ' : [ ' 201905311018080220368 ' ], ' Sign ' : [ 'Yk/B4gbgAR+vPihHu1YxMuZkpaDKa9R7dn/LPiREHGMFUGfDxlcduXKtjo2DnEsEpxIr46/8SGL58i5ZVqVddhNrmwdujBFgCyuwypP9ywSVVOb4K2MD/R2uQdfdCVwo/1y71OFFsO/VLFzl3fQAzs1tpQomYEyZ5qB1xQkoHXNM0Tf/SeRR/+4OSR1Kb5ZwvxgYWeorgQCTg/NWF3JSda24Gq44gIOrfeIWMl/H5AtqFSG+yLlwKha5cYYrjaNpNC8j/aLOriOAJ/gJo7VNX0J+zEZEqlCFFY/5jbpoUTJTXiGtADPTDyicNR6Dxdv9+9LlXc/gU4CYzsKTVGl+Ww=='], 'buyer_id': ['2088102176894385'], 'invoice_amount': ['0.10'], 'version': ['1.0'], 'notify_id': ['2019053100222101845094381000260648'], 'fund_bill_list': ['[{"amount":"0.10","fundChannel":"ALIPAYACCOUNT"}]'], 'notify_type': ['trade_status_sync'], 'out_trade_no': ['201905311018080220368'], 'total_amount': ['0.10'], 'trade_status': ['TRADE_SUCCESS'], 'trade_no': ['2019053122001494381000047437'], 'auth_app_id': ['2016092100560653'], 'receipt_amount': ['0.10'], 'point_amount': ['0.00'], 'app_id': ['2016092100560653'], 'buyer_pay_amount': ['0.10'], 'sign_type': ['RSA2'], 'seller_id': ['2088102176582150']}>

Synchronous return process (return_url): is a visual return, ie the page jump notification, as long as the successful payment, Alipay jump to get this address by the way, and with parameters for this page. Customer access to information affected buyers operations. If the buyer paid after the completion of the client server response is slow, buyers Close when displaying Alipay prompt "payment successful Instant Credit", then the customer site is to get less information, we here called "single out." And the return process is a one-time retrieval of that payment after the successful retrieval of synchronous return process.


Asynchronous return process (notify_url): its data exchange is exchanging data through inter-server, it must be placed on the server (public network) test server post message to the asynchronous process returns page, customer needs technical process returns page processing asynchronous related to data processing, and each step must be returned to the Alipay success (not contain other HTML scripting language, do not jump page.) If this returns processing integrated OK, so basically will not be out alone, because the payment will treasure points within 24 hours of the order of 6 to 10 times more information back to the customer site, Alipay until the capture success.

Micro letter callback:

  Only one callback server

  1, the same notice may be sent multiple times to the merchant system. Merchant system must be able to handle duplicate notifications correct.

  2, the background notification interaction, if the micro-channel receive business reply does not meet specifications or overtime, micro-channel will determine this notification fails, resend the notification, until it succeeds (in the notice have been unsuccessful, micro-channel total will launch 10 time notification that a frequency of 15s / 15s / 30s / 3m / 10m / 20m / 30m / 30m / 30m / 60m / 3h / 3h / 3h / 6h / 6h - Total 24h4m), but micro letter does not guarantee notice eventually will succeed.

  3, order status is unknown or in the case did not receive notice of the results of micro-channel pay, the proposed business initiative to call micro-channel pay [ Order Tracking API ] to confirm order status

<xml>
  <appid><![CDATA[wx2421b1c4370ec43b]]></appid>
  <attach><![CDATA[支付测试]]></attach>
  <bank_type><![CDATA[CFT]]></bank_type>
  <fee_type><![CDATA[CNY]]></fee_type>
  <is_subscribe><![CDATA[Y]]></is_subscribe>
  <mch_id><![CDATA[10000100]]></mch_id>
  <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e531c]]></nonce_str>
  <openid><![CDATA[oUpF8uMEb4qRXf22hE3X68TekukE]]></openid>
  <out_trade_no><![CDATA[1409811653]]></out_trade_no>
  <result_code><![CDATA[SUCCESS]]></result_code>
  <return_code><![CDATA[SUCCESS]]></return_code>
  <sign><![CDATA[B552ED6B279343CB493C5DD0D78AB241]]></sign>
  <sub_mch_id><![CDATA[10000100]]></sub_mch_id>
  <time_end><![CDATA[20140903131540]]></time_end>
  <total_fee>1</total_fee>
<coupon_fee_0><![CDATA[10]]></coupon_fee_0>
<coupon_count><![CDATA[1]]></coupon_count>
<coupon_type><![CDATA[CASH]]></coupon_type>
<coupon_id><![CDATA[10000]]></coupon_id> 
  <trade_type><![CDATA[JSAPI]]></trade_type>
  <transaction_id><![CDATA[1004400740201409030005092168]]></transaction_id>
</xml>

  Authentication servers to capture this calibration parameters, business logic. Merchant system must be able to handle duplicate notifications correct.

  For a small tips:

  After processing is complete, be sure to return a string .

  If it is something other object or its micro-channel will not be processed, will always respond to you must remember is the string . I ran into this pit.

  Back to the server in response to micro-letter

<xml>

  <return_code><![CDATA[SUCCESS]]></return_code>
  <return_msg><![CDATA[OK]]></return_msg>
</xml>

  

Guess you like

Origin www.cnblogs.com/Xingtxx/p/10953966.html