Detailed micro-channel pay

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

  • 190 626 today to update this, the time will continue to add and follow the code section.
  • H5 pay code has been attached to the end of the text in the Appendix

Web micro-channel payment paid

Micro-letter web payment is more commonly used method of payment, the current domestic ordinary business popular web pays to have H5 payment, JSAPI payments, other micro-channel payment methods as well: App payment applet payment, Native payments, will highlight the H5 payment and JSAPI pay
micro-channel official document of an entry: [micro] ordinary letter to pay the merchant access the document .

H5 payment and payment JSAPI

Two kinds of payments the same page, a lot of people new to the micro-letter web payments do not know how to choose, H5 pay for the 微信外的浏览器call, and JSAPI pay for the 公众号开发的微信内的网页call

Features H5 pay JSAPI pay
scenes to be used User 微信以外的手机浏览器payment request micro-letter User by scanning the two-dimensional code, number, etc. to enter public attention H5 business page
and 微信内调用JSSDKcomplete the payment
Preparatory A public number (need to be certified and opened a micro-channel micro-channel pay)
a merchant number (number needed to bind the business public in the above No.)
subscribe to pay H5
configuration H5 paid domain
configuration API key (Merchant Center - Account Security Center -API set)
A public number
one business number
configuration authoritative name
configured public number directory payment authorization
configuration API key
Development Process 1, the user completes the merchant side single use micro-channel payment payment
2, initiates the order request (call unified single interface) by the merchant back to the micro-channel payment
: transaction type trade_type=MWEB
3, a unified single interface has returned merchant background paid parameters to If payment jump url (parameter name "mweb_url"), the merchant by mweb_url invoking the micro-channel pay middle page
check 4, intermediate pages H5 permissions, security checks
5. successful payment, the merchant back-end receives the micro channel side asynchronous notification
6, the user has completed the micro-channel pay the cashier to pay or cancel payment and return the merchant page (the default page for the return payment initiation)
7, the merchant page in the show guide the user initiates the query result of payment of
8,9, business background judge whether the results received to pay income micro-channel side of the notice, and if not, call our order back to confirm the order status query interface
10, showing the final result of the payment order to the user
Set authorization domain
settings paid directories
calls JSSDK evoke pay
configure the domain name and paid directory listings .
Brief step 1. Click Select payment products to pay (for example, their business: pay for a click background to create an order)
2. backstage after (their business) to create an order to initiate a micro-channel payment 统一下单request
3 single successful micro-channel will return to the pre-payment transaction links, That is mweb_url, the merchant payment by visiting this link for payment transfer from the micro-channel
4. successful payment, micro-channel pay will push address asynchronous notification to the merchant configuration, if canceled payment or failure will return payment initiation page
: the rest of the process, you can compare 开发流程the steps, where only to better understand the development process
Payment page introduction jssdk
use of micro-channel pay jssdk evoke pay
micro-channel JS-SDK documentation and Download .

Since both the payment 统一下单parameters should be noted that where an individual can easily be overlooked.
When you select the JSAPI支付time openidthat must pass parameters when you select the H5支付time scene_infothat must pass parameters . Elsewhere particular note is 交易类型the value of different types of payment transactions is also different.
: JSAPI-JSAPI pay (or applet payment), NATIVE-Native payment, APP-app payments, MWEB-H5 pay, different trade_type determines how transfer payments from

MICROPAY- payment code payment, payment code to pay a separate payment interface, the interface does not require uploading, this field will appear in the statement

Parameter comparison H5 pay JSAPI pay
- Click to view the API documentation . Click to view the API documentation .
Transaction Type
trade_type
MWEB JSAPI
User identity
openid
-
trade_type = JSAPI (i.e. JSAPI payment), this parameter must be passed,
this parameter uniquely identifies the user corresponding to the micro-channel under appid merchant. How to get openid .
Scene information
scene_info
Will pass -
Public account ID
appid
Will pass Will pass
business number
mch_id
Will pass Will pass
Random string
nonce_str
Will pass Will pass
signature
sign
It will pass
H5 pay - the signature generation algorithm .
It will pass
JSAPI pay - the signature generation algorithm .
product description
body
Will pass Will pass
Merchant Order Number
out_trade_no
Will pass Will pass
total amount
total_fee
Will pass Will pass
IP terminal
spbill_create_ip
Will pass Will pass
Asynchronous Notification address
notify_url
Will pass Will pass

: H5 pay unified under a single return call there is a special parameter pre-payment information mweb_url, the merchant paid through micro letter H5 jump this link.
Payment for the micro-channel pull mweb_url page intermediate cash register, a micro channel can be pulled by the client to access the url, to complete the payment, mweb_url period of 5 minutes.

appendix

Micro-channel pay -H5 payment page open process .
Micro-channel pay H5 - coding practices .
Micro-channel pay H5 - FAQ .
Micro-channel JSAPI payments - FAQ .

Guess you like

Origin blog.csdn.net/qy_0626/article/details/93716648