Order push configuration
1. How to push orders
1. What is order push
Duomai Alliance supports the initiative to push the main traffic promotion effect orders to the main traffic platform.
2. Fill in the push address
After the traffic master accesses the Domai Alliance, fill in the "Order Push Address" on the Domai Alliance website and wait for review. Domicile Alliance will construct a test push during the review, so please fill in the push address correctly.
Log in to Domicel Alliance, My Tools-》Order Push Service (Version 2.0, as shown below). Enter the push address to receive the order in the push address input box of the corresponding media, and click "Submit".
3. Review the push address
After submitting the review, please wait patiently for the staff review, and contact customer service staff if necessary. Domicile Alliance will do a test push to verify the interface during the review.
If the push address is approved, Domic will push the order data in real time after the promotion effect order is generated (some special merchants do not support real-time return of orders, such as the next day, one hour, etc., please consult the docking media).
If the push fails, Duo Mai retries the push 3 times with an interval of 30 seconds.
4. Schematic diagram of the push process
5. Matters needing attention
Example: IQIYI member CPS promotion, from order creation to settlement, the settlement order data is not updated in real time. IQIYI will provide Domai settlement order data in the following month. The merchant does not provide real-time order status information.
If the traffic owner needs the original order status (creation, payment, return, etc.) of the e-commerce platform, please use the Domai order details query API. Merchants that currently support real-time order status updates will have status updates, such as Jingdong and Taobao.
Two, push data
Domicile Alliance will initiate a Get request to the push address and send the order data in the form of request parameters. Each time an order is pushed, the push verification parameter checksum will be added to the parameters at the same time, see below for instructions.
1. Push parameter description
The parameters are all lowercase characters, and the parameter value is UTF8 encoding
Parameter | Description |
---|---|
id | Push ID |
ads_id | Promotion Plan ID |
ads_name | Promotion plan name |
site_id | Media ID |
link_id | Promotion plan link ID |
euid | Feedback tag value of the order |
order_sn | Order number |
order_time | Order Placement Time |
orders_price | Order amount, when the order status is 1 or 2, order_price represents the confirmed order amount |
siter_commission | Order commission, when the order status is 1 or 2, siter_commission means confirmation commission, other status values are order estimated commission |
currency | ISO 4217 Alpha-3 Code: CNY, USD, etc |
status | Order Status -1 Invalid 0 Unconfirmed 1 Confirmed 2 Settlement View Order Status Description |
checksum | Push data verification parameters, checksum=MD5 (arranged in ascending order of the first letter of the parameters, "parameter value" spliced string + interface key hash), the spliced parameter values do not include checksum and id parameter values |
2. Receiving request safety verification instructions
Request parameters may increase or decrease according to demand. For the receiver, we recommend verifying the checksum value. The verification logic and code examples are as follows:
After receiving the request
- First extract checksum, id
- Sort the remaining data according to the first letter of the array index
- Sort the array data according to value1 + value2 + value3 + . . . Concatenate in order to get string
- Verify that the checksum is equal to md5( string + hash)
PHP code example:
$hash =''; // interface key
$query = $_REQUEST;
$checksum = $query['checksum'];
$id = $query['id'];
unset($query['checksum'],$query['id']);
ksort($query);
$localsum = md5(join('', array_values($query)).$hash);
//If $localsum == $checksum is a legal push
Three, response requirements after receiving the request
Fourth, review the test push of the push address
In order to review the validity of the filled-in interface, we will construct a test push during the review. The pushed data is as follows:
Parameter | Value |
---|---|
ads_id | 0 |
ads_name | Test Activity |
site_id | 0 |
link_id | 0 |
euid | |
order_sn | 0 |
order_time | 0000-00-00 00:00:00 |
orders_price | 0.00 |
siter_commission | 0.00 |
currency | CNY |
status | -1 |
After receiving the above information, please output 0 or 1 through the interface. By default, the interface does not receive data. For direct access, please output -1 or no output.