Skip to content

Commit bcd2510

Browse files
authored
Update README.md
Updated readme file for RN > 0.49 or may be unintentional mistakes.
1 parent dfdcbce commit bcd2510

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ InApp Billing for Cafe Bazaar (Android)
66
## Installation
77

88
1. `npm install --save react-native-cafe-bazaar`
9-
2. Add the following in `android/setting.gradle`
9+
2. Add the following in `android/settings.gradle`
1010

1111
```gradle
1212
...
1313
include ':react-native-cafe-bazaar', ':app'
14-
project(':react-native-cafe-bazaar').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cafe-bazaar/android')
14+
project(':react-native-cafe-bazaar').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cafe-bazaar/android/app')
1515
```
1616

1717
3. And the following in `android/app/build.gradle`
@@ -27,7 +27,7 @@ InApp Billing for Cafe Bazaar (Android)
2727
4. Update MainActivity or MainApplication depending on React Native version.
2828
- React Native version >= 0.29
2929
Edit `MainApplication.java`.
30-
1. Add `import com.contoriel.cafebazaar.CafeBazaarPackage;`
30+
1. Add `import com.contoriel.cafebazaar.CafeBazaarPackage;` in the top of the file.
3131
2. Register package:
3232
```java
3333
@Override
@@ -53,6 +53,10 @@ or for React Native 29+
5353
new CafeBazaarPackage("YOUR_CAFE_BAZAAR_PUBLIC_KEY_HERE")
5454
```
5555

56+
Add the billing permission as follows to AndroidManifest.xml file:
57+
```xml
58+
<uses-permission android:name="com.farsitel.bazaar.permission.PAY_THROUGH_BAZAAR"></uses-permission>
59+
```
5660

5761

5862
### ON THE BAZAAR DEVELOPER PANEL
@@ -78,6 +82,10 @@ Most of methods returns a `Promise`.
7882
**Important:** Opens the service channel to CafeBazaar. Must be called (once!) before any other billing methods can be called.
7983

8084
```javascript
85+
import CafeBazaar from 'react-native-cafe-bazaar'
86+
87+
...
88+
8189
CafeBazaar.open()
8290
.then(() => CafeBazaar.purchase('YOUR_SKU','DEVELOPER_PAYLOAD',RC_REQUEST));
8391
```

0 commit comments

Comments
 (0)