JAVA development (H5 mall nested into a third-party H5 mall for cross-industry cooperation solutions)

Demand background:

    Many e-commerce websites or shopping websites are in the form of H5 malls, and each company has its own H5 mall. The nesting and docking of H5 malls and H5 malls is required when companies conduct cross-industry cooperation, malls guide each other or even malls converge. If there are A mall and B mall, now B mall needs to settle in A mall. So how to deal with it? The usual practice is described below.

1. To solve the login problem, first of all, the users of the two malls must be the same user, and the mobile phone number is generally defined as a user.

2. To solve the problem of commodity payment, the payment is made in the payment process of mall A. The background of mall A should be configured with the payment-related accounts and information of mall B. The money paid still belongs to the financial account of mall B.

3. To solve the problem of product refund, refund in the payment process of mall A. The background of mall A should configure the account and information related to the payment and refund of mall B. The refund money still belongs to the financial account of mall B.

4. To solve the problem of commodity information synchronization, A mall should be able to record the transaction information and order information of B mall.

Then the formed scene is: B mall embeds H5 into A mall to realize login and payment refund, commodity transaction information docking, all page interaction, operation strategy and marketing activities are built by B mall without interference.

Example:

            User A mall B mall

Log in

B mall provides H5 jump address

After Mall B obtains the OneID, it calls the interface of Mall A to obtain the user's detailed information

According to user information, complete user pre-registration and silent login

A mall URL transfer OneID

A mall provides user information query interface

to pay

It is necessary to call the interface to obtain the authorization code and complete the security verification of the payment application;

It is necessary to call the interface to transfer the store, order information, and callback address to A mall;

Receive the payment status through the callback address and update it synchronously;

In the multi-store mode, it is necessary to record the relationship between A mall store and B store store.

A mall creates a store and configures payment information (non-development work)

Receive order information, generate payment information, and apply for payment.

Payment result to B mall callback address.

Refund

Identify the channel order of Mall A, and call the refund application interface of Mall A;

Receive the refund status through the callback address and update it synchronously;

According to the refund application, mall A calls the refund interface to complete the refund.

Refund result to B mall callback address

data

Record the order of mall A, and push the data center of mall A;

Provide an order query interface;

Mall A receives the order data from Mall B and incorporates it into the data center;

 

 Interface development involved:

1. Login authorization

Get Access Token

  • Obtain the token before calling the interface. Only when the token is valid can the interface be called

2. Obtain a temporary authorization code based on user information

3. Payment interface

4. Refund interface

5. Query order interface

6. Payment callback interface

7. Refund callback interface

Guess you like

Origin blog.csdn.net/dongjing991/article/details/130280141