Skip to content

Commit c5a556b

Browse files
Merge pull request #14 from Flutterwave/missing-currencies
Missing currencies
2 parents 1b94443 + 0cce066 commit c5a556b

7 files changed

Lines changed: 90 additions & 7 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ try {
190190
| authorization | Yes | string | **REQUIRED** | Your merchant public key, see how to get your [API Keys](https://developer.flutterwave.com/v3.0/docs/api-keys)|
191191
| tx_ref | Yes | string | **REQUIRED** | Your transaction reference. This MUST be unique for every transaction.|
192192
| amount | Yes | string | **REQUIRED** | Amount to charge the customer. |
193-
| currency | No | string | NGN | Currency to charge in. Defaults to NGN. |
193+
| currency | No | string | NGN | Currency to charge in. Defaults to NGN. [See accepted currencies here](https://support.flutterwave.com/en/articles/3632719-accepted-currencies)|
194194
| integrity_hash | No | string | undefined | This is a sha256 hash of your FlutterwaveCheckout values, it is used for passing secured values to the payment gateway. |
195195
| payment_options | Yes | string | **REQUIRED** | This specifies the payment options to be displayed e.g - card, mobilemoney, ussd and so on. |
196196
| payment_plan | No | number | undefined | This is the payment plan ID used for [Recurring billing](https://developer.flutterwave.com/v3.0/docs/recurring-billing). |

dist/FlutterwaveInit.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// <reference types="react-native" />
2-
export declare type Currency = 'GBP' | 'NGN' | 'USD' | 'GHS' | 'KES' | 'ZAR' | 'TZS';
2+
export declare type Currency = 'AUD' | 'BIF' | 'CDF' | 'CAD' | 'CVE' | 'EUR' | 'GBP' | 'GHS' | 'GMD' | 'GNF' | 'KES' | 'LRD' | 'MWK' | 'MZN' | 'NGN' | 'RWF' | 'SLL' | 'STD' | 'TZS' | 'UGX' | 'USD' | 'XAF' | 'XOF' | 'ZAR' | 'ZMK' | 'ZMW' | 'ZWD';
33
export interface FlutterwaveInitSubAccount {
44
id: string;
55
transaction_split_ratio?: number;

dist/FlutterwaveInit.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/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/PaywithFlutterwaveBase.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,35 @@ export var PayWithFlutterwavePropTypesBase = {
7575
};
7676
export var OptionsPropTypeBase = {
7777
amount: PropTypes.number.isRequired,
78-
currency: PropTypes.oneOf(['GBP', 'NGN', 'USD', 'GHS', 'KES', 'ZAR', 'TZS']),
78+
currency: PropTypes.oneOf([
79+
'AUD',
80+
'BIF',
81+
'CDF',
82+
'CAD',
83+
'CVE',
84+
'EUR',
85+
'GBP',
86+
'GHS',
87+
'GMD',
88+
'GNF',
89+
'KES',
90+
'LRD',
91+
'MWK',
92+
'MZN',
93+
'NGN',
94+
'RWF',
95+
'SLL',
96+
'STD',
97+
'TZS',
98+
'UGX',
99+
'USD',
100+
'XAF',
101+
'XOF',
102+
'ZAR',
103+
'ZMK',
104+
'ZMW',
105+
'ZWD'
106+
]),
79107
payment_plan: PropTypes.number,
80108
subaccounts: PropTypes.arrayOf(PropTypes.shape({
81109
id: PropTypes.string.isRequired,

src/FlutterwaveInit.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,34 @@ import FlutterwaveInitError from './utils/FlutterwaveInitError';
22
import ResponseParser from './utils/ResponseParser';
33
import {STANDARD_URL} from './configs';
44

5-
export type Currency = 'GBP' | 'NGN' | 'USD' | 'GHS' | 'KES' | 'ZAR' | 'TZS';
5+
export type Currency =
6+
'AUD' |
7+
'BIF' |
8+
'CDF' |
9+
'CAD' |
10+
'CVE' |
11+
'EUR' |
12+
'GBP' |
13+
'GHS' |
14+
'GMD' |
15+
'GNF' |
16+
'KES' |
17+
'LRD' |
18+
'MWK' |
19+
'MZN' |
20+
'NGN' |
21+
'RWF' |
22+
'SLL' |
23+
'STD' |
24+
'TZS' |
25+
'UGX' |
26+
'USD' |
27+
'XAF' |
28+
'XOF' |
29+
'ZAR' |
30+
'ZMK' |
31+
'ZMW' |
32+
'ZWD';
633

734
export interface FlutterwaveInitSubAccount {
835
id: string;

src/PaywithFlutterwaveBase.tsx

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,35 @@ export const PayWithFlutterwavePropTypesBase = {
3636

3737
export const OptionsPropTypeBase = {
3838
amount: PropTypes.number.isRequired,
39-
currency: PropTypes.oneOf(['GBP', 'NGN', 'USD', 'GHS', 'KES', 'ZAR', 'TZS']),
39+
currency: PropTypes.oneOf([
40+
'AUD',
41+
'BIF',
42+
'CDF',
43+
'CAD',
44+
'CVE',
45+
'EUR',
46+
'GBP',
47+
'GHS',
48+
'GMD',
49+
'GNF',
50+
'KES',
51+
'LRD',
52+
'MWK',
53+
'MZN',
54+
'NGN',
55+
'RWF',
56+
'SLL',
57+
'STD',
58+
'TZS',
59+
'UGX',
60+
'USD',
61+
'XAF',
62+
'XOF',
63+
'ZAR',
64+
'ZMK',
65+
'ZMW',
66+
'ZWD'
67+
]),
4068
payment_plan: PropTypes.number,
4169
subaccounts: PropTypes.arrayOf(PropTypes.shape({
4270
id: PropTypes.string.isRequired,

0 commit comments

Comments
 (0)