@kumbify/sdk 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,7 +27,7 @@ class KPaymentClient {
|
|
|
27
27
|
async makeStripePayment({ ...data }) {
|
|
28
28
|
try {
|
|
29
29
|
const response = await (0, api_1.fetchRequest)({
|
|
30
|
-
url: `${helpers_1.APP_CONFIG.PAYMENT.API_BASE_URL}
|
|
30
|
+
url: `${helpers_1.APP_CONFIG.PAYMENT.API_BASE_URL}/${this.config.provider.international.seller}`,
|
|
31
31
|
method: "post",
|
|
32
32
|
body: data,
|
|
33
33
|
headers: {
|
|
@@ -44,7 +44,7 @@ class KPaymentClient {
|
|
|
44
44
|
async makeCryptoPayment({ ...data }) {
|
|
45
45
|
try {
|
|
46
46
|
const response = await (0, api_1.fetchRequest)({
|
|
47
|
-
url: `${helpers_1.APP_CONFIG.PAYMENT.API_BASE_URL}
|
|
47
|
+
url: `${helpers_1.APP_CONFIG.PAYMENT.API_BASE_URL}/${this.config.provider.international.seller}`,
|
|
48
48
|
method: "post",
|
|
49
49
|
body: data,
|
|
50
50
|
headers: {
|
|
@@ -71,7 +71,7 @@ class KPaymentClient {
|
|
|
71
71
|
message: this.config.api.lang == "en" ? message.en : message.pt,
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
const url = `${helpers_1.APP_CONFIG.PAYMENT.API_BASE_URL}
|
|
74
|
+
const url = `${helpers_1.APP_CONFIG.PAYMENT.API_BASE_URL}/${this.config.provider.angolan}`;
|
|
75
75
|
const response = await (0, api_1.fetchRequest)({
|
|
76
76
|
url: url,
|
|
77
77
|
method: "post",
|
|
@@ -52,6 +52,7 @@ export interface IProduct {
|
|
|
52
52
|
*/
|
|
53
53
|
export type StripeCurrencies = "USD" | "EUR";
|
|
54
54
|
export interface IMakeStripePaymentParams {
|
|
55
|
+
amount: number;
|
|
55
56
|
transactionId: string;
|
|
56
57
|
customer: {
|
|
57
58
|
email: string;
|
|
@@ -72,11 +73,12 @@ export interface IMakeStripePaymentResponse {
|
|
|
72
73
|
*/
|
|
73
74
|
type CryptoCurrencies = "USDC" | "ETH" | "BTC" | "USDT";
|
|
74
75
|
export interface IMakeCryptoPaymentParams {
|
|
76
|
+
amount: number;
|
|
75
77
|
transactionId: string;
|
|
76
78
|
customer: {
|
|
77
|
-
email
|
|
78
|
-
name
|
|
79
|
-
phone
|
|
79
|
+
email?: string;
|
|
80
|
+
name?: string;
|
|
81
|
+
phone?: string;
|
|
80
82
|
};
|
|
81
83
|
products: IProduct[];
|
|
82
84
|
currency: CryptoCurrencies;
|
package/dist/utils/helpers.js
CHANGED
package/package.json
CHANGED