@teamdigipay/dgepay-customer-transaction-package 0.0.20 → 0.0.21
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.
|
@@ -64,6 +64,9 @@ exports.default = (apiConfig, apiPayload, onSuccess, onFailure) => __awaiter(voi
|
|
|
64
64
|
if ((_d = apiPayload === null || apiPayload === void 0 ? void 0 : apiPayload.data) === null || _d === void 0 ? void 0 : _d._parts) {
|
|
65
65
|
headers = Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" });
|
|
66
66
|
}
|
|
67
|
+
else if (apiConfig.ContentType === "text/plain") {
|
|
68
|
+
headers = Object.assign(Object.assign({}, headers), { "Content-Type": "text/plain" });
|
|
69
|
+
}
|
|
67
70
|
let config = {
|
|
68
71
|
baseURL: endPoint,
|
|
69
72
|
timeout: apiConfig.timeout || 6000000000,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamdigipay/dgepay-customer-transaction-package",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"author": "RM (peerbits)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"axios": "^1.2.1",
|
|
19
19
|
"crypto-js": "^4.1.1",
|
|
20
20
|
"lodash": "^4.17.21",
|
|
21
|
-
"react-native": "
|
|
21
|
+
"react-native": "0.75.4",
|
|
22
22
|
"typescript": "^4.9.4"
|
|
23
23
|
},
|
|
24
24
|
"description": "> This package contains all the necessary Transaction controllers, helpers and constants for DGePay Customer Application.",
|
|
@@ -25,6 +25,7 @@ export interface API_CONFIG {
|
|
|
25
25
|
timeout?: number;
|
|
26
26
|
headersFlutterWave?: any
|
|
27
27
|
languageCode?:string
|
|
28
|
+
ContentType?:string
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
export interface TOKEN_OBJ_TYPE {
|
|
@@ -115,6 +116,11 @@ const isConnected: NetInfoState = await NetInfo.fetch()
|
|
|
115
116
|
...headers,
|
|
116
117
|
"Content-Type": "multipart/form-data",
|
|
117
118
|
};
|
|
119
|
+
}else if(apiConfig.ContentType === "text/plain"){
|
|
120
|
+
headers = {
|
|
121
|
+
...headers,
|
|
122
|
+
"Content-Type": "text/plain",
|
|
123
|
+
};
|
|
118
124
|
}
|
|
119
125
|
|
|
120
126
|
|