diff --git a/js-miniapp-bridge/src/common-bridge.ts b/js-miniapp-bridge/src/common-bridge.ts index a16171b70..036a85829 100644 --- a/js-miniapp-bridge/src/common-bridge.ts +++ b/js-miniapp-bridge/src/common-bridge.ts @@ -722,14 +722,14 @@ export class MiniAppBridge { } /** - * This will request to Consume the product that is purchased using purchaseProductWith API + * This will request to Consume the product that is purchased using consumePurchaseWith API * @param id Product id of the product that is purchased. * @returns */ consumePurchaseWith(id: string, transactionId: string) { return new Promise((resolve, reject) => { return this.executor.exec( - 'purchaseProductWith', + 'consumeProductWith', { product_id: id, transaction_id: transactionId }, consumedInfo => { resolve(JSON.parse(consumedInfo) as MiniAppResponseInfo); diff --git a/js-miniapp-sample/src/pages/in-app-purchase.js b/js-miniapp-sample/src/pages/in-app-purchase.js index 2902ac0e0..d7e4521d2 100644 --- a/js-miniapp-sample/src/pages/in-app-purchase.js +++ b/js-miniapp-sample/src/pages/in-app-purchase.js @@ -203,7 +203,7 @@ function PurchaseComponent(props: PurchaseProductProps) { function ConsumeProduct() { props - .purchaseProductWith(inputValue) + .consumePurchaseWith(inputValue) .then(() => dispatch({ type: 'PURCHASE_FETCH_SUCCESS', miniAppError: null }) )