1. The first download of the demo, generally are some bugs, first to change.
2. There seems to be no separate development for the service provider model demo, download is also the ordinary merchant payment demo, in fact there is no need to write alone, because they are the difference between a few parameters.
(0) The parameters set in the demo are all to be filled out by the service provider, not the sub-merchant.
(1) The first difference is directly openid,demo in the OpenID, the service provider mode needs to pass Sub_openid, the way to obtain does not explain, in short, to obtain the required are sub-merchants that are special merchant Appid,appsecret.
(2) need to pass a sub_mch_id parameter on the incoming page.
(3) The calling class is judged by the code in the OpenID where it is commented out, or never in the next step.
(4) In the service provider's payment merchant backstage set up the authorization directory, but is not like the ordinary merchant in the public platform backstage to set up.
Updated the demo, also do not understand the brothers can download to see.
If no other special requirements, in the case of the correct parameters, can be used directly.
Address:
The above introduces the payment service provider model (accepting organization mode) development notes, JSAPI payment, including the content of the aspects, I hope that the PHP tutorial interested in a friend helpful.