Skip to content

Commit

Permalink
IAP function name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rleojoseph committed Feb 20, 2023
1 parent 8590d58 commit 65b88b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js-miniapp-bridge/src/common-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<MiniAppResponseInfo>((resolve, reject) => {
return this.executor.exec(
'purchaseProductWith',
'consumeProductWith',
{ product_id: id, transaction_id: transactionId },
consumedInfo => {
resolve(JSON.parse(consumedInfo) as MiniAppResponseInfo);
Expand Down
2 changes: 1 addition & 1 deletion js-miniapp-sample/src/pages/in-app-purchase.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function PurchaseComponent(props: PurchaseProductProps) {

function ConsumeProduct() {
props
.purchaseProductWith(inputValue)
.consumePurchaseWith(inputValue)
.then(() =>
dispatch({ type: 'PURCHASE_FETCH_SUCCESS', miniAppError: null })
)
Expand Down

0 comments on commit 65b88b8

Please sign in to comment.