Skip to content

Commit

Permalink
refined README(en section)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNorthMemory committed Sep 19, 2020
1 parent 4719bd0 commit 215a4e1
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ console.info(params)
- [x] The `OOP` developing style of the wechatpay APIv3
- [x] `Typescript` supported
- [x] Fulfill the XML based API requests, dependency on [node-xml2js](https://github.com/Leonidas-from-XIV/node-xml2js)
- [x] Yet another `AES-256-ECB/PKCS7PADDING` implementation for encryption/decryption the APIv2's notification
- [x] Usage samples of the APIv2 and APIv3's data exchange signature
## Installing
Expand Down Expand Up @@ -498,7 +500,9 @@ const client = wxp(instance, {

### Promise style

#### POST `/v3/combine-transactions/jsapi` with `JSON` body payload
#### combined orders payment

POST `/v3/combine-transactions/jsapi` with `JSON` body payload

```js
client.post('/v3/combine-transactions/jsapi', {}).then(response => {
Expand All @@ -508,7 +512,9 @@ client.post('/v3/combine-transactions/jsapi', {}).then(response => {
})
```

#### POST `/v3/smartguide/guides/{guide_id}/assign` mixed `RESTful` parameter with `JSON` body payload, response as `204` status code.
#### payment as customer service

POST `/v3/smartguide/guides/{guide_id}/assign` mixed `RESTful` parameter with `JSON` body payload, response as `204` status code.

```js
client.post(`/v3/smartguide/guides/${guide_id}/assign`, {
Expand All @@ -519,7 +525,9 @@ client.post(`/v3/smartguide/guides/${guide_id}/assign`, {
})
```

#### POST `/v3/marketing/favor/media/image-upload` with `multipart/form-data` payload
#### image file upload

POST `/v3/marketing/favor/media/image-upload` with `multipart/form-data` payload

```js
const FormData = require('form-data')
Expand All @@ -546,7 +554,9 @@ client.post('/v3/marketing/favor/media/image-upload', imageData, {
})
```

#### GET `/v3/bill/tradebill` chains with `/v3/billdownload/file`
#### download trade bill and cast

GET `/v3/bill/tradebill` chains with `/v3/billdownload/file`

```js
const assert = require('assert')
Expand All @@ -572,7 +582,9 @@ client.get('/v3/bill/tradebill', {

### Async/Await style

#### GET `/v3/merchant-service/complaints` with `query` parameters
#### retrieve the customer complaints

GET `/v3/merchant-service/complaints` with `query` parameters

```js
(async () => {
Expand All @@ -592,7 +604,9 @@ client.get('/v3/bill/tradebill', {
})()
```

#### POST `/v3/pay/partner/transactions/native` with `JSON` body payload
#### order payment by scanning qrcode

POST `/v3/pay/partner/transactions/native` with `JSON` body payload

```js
(async () => {
Expand All @@ -617,7 +631,9 @@ client.get('/v3/bill/tradebill', {
})()
```

#### GET `/v3/marketing/favor/stocks/{stock_id}` mixed `query` with `RESTful` parameters
#### detail the coupon stock

GET `/v3/marketing/favor/stocks/{stock_id}` mixed `query` with `RESTful` parameters

```js
(async () => {
Expand All @@ -634,7 +650,9 @@ client.get('/v3/bill/tradebill', {
})()
```

#### POST `/v3/marketing/partnerships/build` with special `Header` field parameter
#### the coupon stock associated

POST `/v3/marketing/partnerships/build` with special `Header` field parameter

```js
(async () => {
Expand All @@ -660,7 +678,9 @@ client.get('/v3/bill/tradebill', {
})()
```

#### POST `/v3/merchant/media/video_upload` with `multipart/form-data` payload
#### video file upload

POST `/v3/merchant/media/video_upload` with `multipart/form-data` payload

```js
const FormData = require('form-data')
Expand Down Expand Up @@ -690,7 +710,9 @@ const {createReadStream} = require('fs')
})()
```

#### GET `/v3/bill/tradebill` and `/v3/billdownload/file` with `gzip` special
#### download trade bill with `gzip` and cast

GET `/v3/bill/tradebill` and `/v3/billdownload/file` with `gzip` special

```js
const {unzipSync} = require('zlib')
Expand Down

0 comments on commit 215a4e1

Please sign in to comment.