# wx.openCard(Object object)
Start from base library version 1.1.0. Please remaining backward compatible.
with Promise style call: Supported
Mini Program plugin: Not supported
Check your card coupon in your WeChat card package. Only through Authentication Mini Programs or cultural interaction category of small games to use. For more documentation please refer to WeChat card voucher interface document。
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
cardList | Array.<Object> | yes | List of card vouchers that need to be opened | |
success | function | no | Interface calls the successful callback function | |
fail | function | no | Interface calls failed callback functions | |
complete | function | no | Interface calls the end of the callback function (call success or failure will be executed) |
object.cardList Structure
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
cardId | string | yes | Card coupon ID | |
code | string | yes | by wx.addCard Encryption in the return object of code After decryption, decrypt please refer to:code Decode interface |
# sample code
wx.openCard({
cardList: [{
cardId: '',
code: ''
}, {
cardId: '',
code: ''
}],
success (res) { }
})