This repository has been archived by the owner on May 6, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Customer had no custom currency, thus added. No
- Loading branch information
Showing
13 changed files
with
107 additions
and
21 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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// A list of accaptable curenices for paypal | ||
const data = { | ||
/* | ||
Australian dollar AUD | ||
Brazilian real 2 BRL | ||
Canadian dollar CAD | ||
Chinese Renmenbi 3 CNY | ||
Czech koruna CZK | ||
Danish krone DKK | ||
Euro EUR | ||
Hong Kong dollar HKD | ||
Hungarian forint 1 HUF | ||
Israeli new shekel ILS | ||
Japanese yen 1 JPY | ||
Malaysian ringgit 3 MYR | ||
Mexican peso MXN | ||
New Taiwan dollar 1 TWD | ||
New Zealand dollar NZD | ||
Norwegian krone NOK | ||
Philippine peso PHP | ||
Polish złoty PLN | ||
Pound sterling GBP | ||
Russian ruble RUB | ||
Singapore dollar SGD | ||
Swedish krona SEK | ||
Swiss franc CHF | ||
Thai baht THB | ||
United States dollar USD | ||
*/ | ||
// Use these currencies for paypal | ||
currencies: ["AUD", "BRL", "CAD", "CNY", "CZK", "DKK", "EUR", "HKD", "HUF", "ILS", "JPY", "MYR", "MXN", "TWD", "NZD", "NOK", "PHP", "PLN", "GBP", "RUB", "SGD", "SEK", "CHF", "THB", "USD"] as const, | ||
} | ||
|
||
export const PaypalCurrencies = data.currencies; | ||
|
||
export function validCurrencyPaypal(currency: typeof data["currencies"]) | ||
{ | ||
// @ts-ignore | ||
return data.currencies.includes(currency); | ||
} |
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
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
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
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
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,2 +1,8 @@ | ||
export type TPaymentTypes = "one_time" | "recurring" | "free"; | ||
export const A_PaymentTypes = ["one_time", "recurring", "free"] as const; | ||
export const A_PaymentTypes = ["one_time", "recurring", "free"] as const; | ||
|
||
// Every currencie code is in ISO 4217 | ||
export type TPaymentCurrency = "usd" | "eur" | "gbp" | "cad" | "aud" | "jpy" | "nzd" | "chf" | "sek" | "dkk" | "nok" | "hkd" | "sgd" | "thb" | "eur" | "zar" | "brl" | "rub" | "krw" | "ils" | "php" | "vnd" | "myr" | "idr" | "cny" | "twd" | "huf" | "czk" | "pln" | "hkd" | "sgd" | "thb" | "eur" | "zar" | "brl" | "rub" | "krw" | "ils" | "php" | "vnd" | "myr" | "idr" | "cny" | "twd" | "huf" | "czk" | "pln" | "hkd" | "sgd" | "thb" | "eur" | "zar" | "brl" | "rub" | "krw" | "ils" | "php" | "vnd" | "myr" | "idr" | "cny" | "twd" | "huf" | "czk" | "pln" | "hkd" | "sgd" | "thb" | "eur" | "zar" | "brl" | "rub" | "krw" | "ils" | "php" | "vnd" | "myr" | "idr" | "cny" | "twd" | "huf" | "czk" | "pln" | "hkd" | "sgd" | "thb" | "eur" | "zar" | "brl" | "rub" | "krw" | "ils" | "php" | "vnd" | "myr" | "idr" | "cny" | "twd" | "huf" | "czk" | "pln" | "hkd" | "sgd" | "thb" | "eur" | "zar" | "brl" | "rub" | "krw" | "ils" | "php" | "vnd" | "myr" | "idr" | "cny" | "twd" | "huf" | "czk" | "pln" | "hkd" | "sgd" | "thb" | "eur" | "zar" | "brl" | "rub" | "krw" | "ils" | "php" | "vnd" | "myr" | "idr" | "cny" | "twd" | "huf" | "czk" | "pln" | "hkd" | "sgd" | "thb"; | ||
export const A_PaymentCurrency = [ | ||
"usd", "eur", "gbp", "cad", "aud", "jpy", "nzd", "chf", "sek", "dkk", "nok", "hkd", "sgd", "thb", "eur", "zar", "brl", "rub", "krw", "ils", "php", "vnd", "myr", "idr", "cny", "twd", "huf", "czk", "pln", "hkd", "sgd", "thb", "eur", "zar", "brl", "rub", "krw", "ils", "php", "vnd", "myr", "idr", "cny", "twd", "huf", "czk", "pln", "hkd", "sgd", "thb", "eur", "zar", "brl", "rub", "krw", "ils", "php", "vnd", "myr", "idr", "cny", "twd", "huf", "czk", "pln", "hkd", "sgd", "thb", "eur", "zar", "brl", "rub", "krw", "ils", "php", "vnd", "myr", "idr", "cny", "twd", "huf", "czk", "pln", "hkd", "sgd", "thb", "eur", "zar", "brl", "rub", "krw", "ils", "php", "vnd", "myr", "idr", "cny", "twd", "huf", "czk", "pln", "hkd", "sgd", "thb", "eur", "zar", "brl", "rub", "krw", "ils", "php", "vnd", "myr", "idr", "cny", "twd", "huf", "czk", "pln", "hkd", "sgd", "thb", "eur", "zar", "brl", "rub", "krw", "ils", "php", "vnd", "myr", "idr", "cny", "twd", "huf", "czk", "pln", "hkd", "sgd", "thb" | ||
] as const; |