Skip to content

Commit

Permalink
fix(readme): updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
devbabs committed Feb 1, 2023
1 parent 833f5f1 commit a807728
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,24 @@ import Remita from 'react-native-remita';

Remita.init({
apiKey: YOUR_REMITA_PUBLIC_KEY, //Replace this with your own Remita Public Key
environment: 'demo'
environment: 'demo' // demo or production
})
```
#### Important ⚠️:
###### Demo Setup:
```
{
'apiKey': TEST_PUBLIC_KEY`,
'environment': 'demo'
}
```
###### Production Setup:
```
{
'apiKey': LIVE_PUBLIC_KEY`,
'environment': 'production'
}
```

## Usage
You can trigger the `Remita.pay()` method when a button is pressed.
Expand All @@ -33,8 +48,8 @@ Make sure you pass all required parameters to this method call.
```js
Remita.pay({
amount: 1000,
email: "[email protected]",
phone: "+2349031863448",
email: "[email protected]",
phone: "+23412345678",
firstName: "Babalola",
lastName: "Macaulay",
currencyCode: "NGN",
Expand Down
16 changes: 8 additions & 8 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import * as React from 'react';

import { StyleSheet, View, Text, Button } from 'react-native';
import { StyleSheet, View, Button } from 'react-native';
import Remita from 'react-native-remita';

export default function App() {
React.useEffect(() => {
Remita.init({
apiKey: "QzAwMDAxOTUwNjl8NDMyNTkxNjl8ZTg0MjI2MDg4MjU0NzA2NTY2MTYwNGU1NjNiMjUzYjk4ZDQwZjljZGFiMTVmYTljMDUwMGQ0MDg2MjIyYjEyNTA1ZTE2MTMxNmE3ZjM1OTZmYmJkOTE2MTRiY2NmZTY5NTM4MGQ2MDBlZGJlZmM2ODc2YTc2M2M4MjgyZmFjODc=",
apiKey: 'QzAwMDAxOTUwNjl8NDMyNTkxNjl8ZTg0MjI2MDg4MjU0NzA2NTY2MTYwNGU1NjNiMjUzYjk4ZDQwZjljZGFiMTVmYTljMDUwMGQ0MDg2MjIyYjEyNTA1ZTE2MTMxNmE3ZjM1OTZmYmJkOTE2MTRiY2NmZTY5NTM4MGQ2MDBlZGJlZmM2ODc2YTc2M2M4MjgyZmFjODc=',
environment: 'demo'
})
}, []);

const payPressed = () => {
Remita.pay({
amount: 1000,
email: "[email protected]",
phone: "+2349031863448",
firstName: "Babalola",
lastName: "Macaulay",
currencyCode: "NGN",
narration: "Test payment for this example",
email: '[email protected]',
phone: '+2349031863448',
firstName: 'Babalola',
lastName: 'Macaulay',
currencyCode: 'NGN',
narration: 'Test payment for this example',
paymentCompleted: (paymentResponse) => {
console.log("Payment completed", paymentResponse)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-remita",
"version": "0.1.0",
"version": "0.1.1",
"description": "This React Native module provides a wrapper to add Remita Payments to your React Native application using the Remita Android Mobile SDK and the Remita iOS Mobile SDK libraries.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit a807728

Please sign in to comment.