|
@@ -158,12 +158,25 @@ const callPay = async (ctx) => {
|
|
|
,
|
|
,
|
|
|
{
|
|
{
|
|
|
headers: {
|
|
headers: {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ 'Content-Type': ' application/json'
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ let consumeUrl = `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/${PackageName}/purchases/products/${productId}/tokens/${googleToken}:consume?access_token=${access_token}`
|
|
|
|
|
+ const consumeRes = await axios.post(consumeUrl,
|
|
|
|
|
+ {
|
|
|
|
|
+ developerPayload: ""
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
|
|
+ {
|
|
|
|
|
+ headers: {
|
|
|
|
|
+
|
|
|
'Content-Type': ' application/json'
|
|
'Content-Type': ' application/json'
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- console.log(acknowledgeRes.data)
|
|
|
|
|
|
|
+ logger.info(`订单${orderId} ${consumeRes} ${acknowledgeRes}`)
|
|
|
|
|
|
|
|
const update_time = formatDate(new Date())
|
|
const update_time = formatDate(new Date())
|
|
|
const res = await Order.updateOrderStats(
|
|
const res = await Order.updateOrderStats(
|