Skip to content

Commit 1b94443

Browse files
Merge pull request #11 from Flutterwave/pubkey-standard-init
Pubkey standard init
2 parents e1d4537 + 9cf8cf6 commit 1b94443

9 files changed

+17
-13
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<p align="center">
2-
<img title="Flutterwave" height="200" src="https://flutterwave.com/images/logo-colored.svg" width="50%"/>
2+
<img title="Flutterwave" height="200" src="https://flutterwave.com/images/logo-colored.svg" width="50%"/>
33
</p>
44

55

66
# React Native Flutterwave
7-
Easily implement Flutterwave for payments in your React Native appliction. This library supports both Android and iOS, and use the Flutterwave's V3 API
7+
Easily implement Flutterwave for payments in your React Native appliction. This library supports both Android and iOS, and use the Flutterwave's V3 API.
88

99
[![V2 API](https://img.shields.io/badge/API-V3-brightgreen)](https://developer.flutterwave.com/docs) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
1010

@@ -19,6 +19,7 @@ Easily implement Flutterwave for payments in your React Native appliction. This
1919
- [Installation](#installation)
2020
- [Dependencies](#dependencies)
2121
- [Activity Indicator (Android)](#activity-indicator-only-needed-for-android)
22+
- [Merchant Piblic Key](#fire-merchant-public-key-fire)
2223
- [Important Information](#fire-important-information-fire)
2324
- Usage
2425
- [PayWithFlutterwave ](#flutterwave-button)
@@ -70,6 +71,9 @@ dependencies {
7071
}
7172
````
7273

74+
### :fire: MERCHANT PUBLIC KEY :fire:
75+
In order to use this library you are required to use your merchant public key and not the secret key. See how to get your API Keys [here](https://developer.flutterwave.com/v3.0/docs/api-keys)
76+
7377
### :fire: IMPORTANT INFORMATION :fire:
7478
If the `options` property on [PayWithFlutterwave](#paywithflutterwaveprops-interface) changes, when next the user taps on the button a new payment will be initialized whether the last one was successful or not.
7579

@@ -94,7 +98,7 @@ import {PayWithFlutterwave} from 'flutterwave-react-native';
9498
onRedirect={handleOnRedirect}
9599
options={{
96100
tx_ref: transactionReference,
97-
authorization: '[merchant secret key]',
101+
authorization: '[merchant public key]',
98102
customer: {
99103
email: 'customer-email@example.com'
100104
},
@@ -159,7 +163,7 @@ try {
159163
// initialize payment
160164
const paymentLink = await FlutterwaveInit({
161165
tx_ref: generateTransactionRef(),
162-
authorization: '[your merchant secret Key]',
166+
authorization: '[your merchant public Key]',
163167
amount: 100,
164168
currency: 'USD',
165169
customer: {
@@ -183,7 +187,7 @@ try {
183187
[See Interface](#flutterwaveinitoptions-interface)
184188
| Name | Required | Type | Default | Description |
185189
| --------- | --------- | ---- | ------- | ----------- |
186-
| authorization | Yes | string | **REQUIRED** | Your merchant secret key, see how to get your [API Keys](https://developer.flutterwave.com/v3.0/docs/api-keys)|
190+
| authorization | Yes | string | **REQUIRED** | Your merchant public key, see how to get your [API Keys](https://developer.flutterwave.com/v3.0/docs/api-keys)|
187191
| tx_ref | Yes | string | **REQUIRED** | Your transaction reference. This MUST be unique for every transaction.|
188192
| amount | Yes | string | **REQUIRED** | Amount to charge the customer. |
189193
| currency | No | string | NGN | Currency to charge in. Defaults to NGN. |

dist/PaywithFlutterwaveBase.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/configs.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* V# API Standard initialization endpoint
33
*/
4-
export declare const STANDARD_URL = "https://api.flutterwave.com/v3/payments";
4+
export declare const STANDARD_URL = "https://api.flutterwave.com/v3/sdkcheckout/payments";
55
/**
66
* Redirect URL used in V3 FlutterwaveButton
77
*/

dist/configs.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/configs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* V# API Standard initialization endpoint
33
*/
4-
export var STANDARD_URL = 'https://api.flutterwave.com/v3/payments';
4+
export var STANDARD_URL = 'https://api.flutterwave.com/v3/sdkcheckout/payments';
55
/**
66
* Redirect URL used in V3 FlutterwaveButton
77
*/

dist/utils/CustomPropTypesRules.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export declare const PaymentOptionsPropRule: (options: Array<string>) => (props: {
1+
export declare const PaymentOptionsPropRule: (options: string[]) => (props: {
22
[k: string]: any;
33
}, propName: string) => Error | null;
44
//# sourceMappingURL=CustomPropTypesRules.d.ts.map

dist/utils/CustomPropTypesRules.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/AbortingPaymentInitialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MyCart extends React.Component {
2828
const paymentLink = await FlutterwaveInit(
2929
{
3030
tx_ref: generateTransactionRef(),
31-
authorization: '[merchant secret key]',
31+
authorization: '[merchant public key]',
3232
amount: 100,
3333
currency: 'USD',
3434
customer: {

src/configs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* V# API Standard initialization endpoint
33
*/
4-
export const STANDARD_URL = 'https://api.flutterwave.com/v3/payments';
4+
export const STANDARD_URL = 'https://api.flutterwave.com/v3/sdkcheckout/payments';
55

66
/**
77
* Redirect URL used in V3 FlutterwaveButton

0 commit comments

Comments
 (0)