Skip to content

Commit 54ff695

Browse files
codlerchirag04
authored andcommitted
Typo (#105)
* Typo
1 parent 74289e7 commit 54ff695

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Readme.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ var productIdentifier = 'com.xyz.abc';
6767
InAppUtils.purchaseProduct(productIdentifier, (error, response) => {
6868
// NOTE for v3.0: User can cancel the payment which will be available as error object here.
6969
if(response && response.productIdentifier) {
70-
AlertIOS.alert('Purchase Successful', 'Your Transaction ID is ' + response.transactionIdentifier);
70+
Alert.alert('Purchase Successful', 'Your Transaction ID is ' + response.transactionIdentifier);
7171
//unlock store here.
7272
}
7373
});
@@ -88,19 +88,19 @@ InAppUtils.purchaseProduct(productIdentifier, (error, response) => {
8888
### Restore payments
8989

9090
```javascript
91-
InAppUtils.restorePurchases((error, response)=> {
91+
InAppUtils.restorePurchases((error, response) => {
9292
if(error) {
93-
AlertIOS.alert('itunes Error', 'Could not connect to itunes store.');
93+
Alert.alert('itunes Error', 'Could not connect to itunes store.');
9494
} else {
95-
AlertIOS.alert('Restore Successful', 'Successfully restores all your purchases.');
95+
Alert.alert('Restore Successful', 'Successfully restores all your purchases.');
9696

97-
if (response.length == 0) {
97+
if (response.length === 0) {
9898
Alert.alert('No Purchases', "We didn't find any purchases to restore.");
9999
return;
100100
}
101101

102-
response.forEach( function(purchase) {
103-
if (purchase.productIdentifier == "com.xyz.abc") {
102+
response.forEach((purchase) => {
103+
if (purchase.productIdentifier === 'com.xyz.abc') {
104104
// Handle purchased product.
105105
}
106106
});
@@ -127,7 +127,7 @@ iTunes receipts are associated to the users iTunes account and can be retrieved
127127
```javascript
128128
InAppUtils.receiptData((error, receiptData)=> {
129129
if(error) {
130-
AlertIOS.alert('itunes Error', 'Receipt not found.');
130+
Alert.alert('itunes Error', 'Receipt not found.');
131131
} else {
132132
//send to validation server
133133
}
@@ -143,9 +143,9 @@ Check if in-app purchases are enabled/disabled.
143143
```javascript
144144
InAppUtils.canMakePayments((enabled) => {
145145
if(enabled) {
146-
AlertIOS.alert('IAP enabled');
146+
Alert.alert('IAP enabled');
147147
} else {
148-
AlertIOS.alert('IAP disabled');
148+
Alert.alert('IAP disabled');
149149
}
150150
});
151151
```

0 commit comments

Comments
 (0)