-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -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", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters