@teamdigipay/dgepay-customer-transaction-package 0.0.3 → 0.0.5
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.
|
@@ -228,7 +228,8 @@ class TransactionController {
|
|
|
228
228
|
var _b;
|
|
229
229
|
let isAgentAsMerchant = ((_b = payload.params) === null || _b === void 0 ? void 0 : _b.isAgentAsMerchant) || false;
|
|
230
230
|
(0, TransactionAPIHelper_1.getQrCodeDetailsHelper)(config, payload, (data) => __awaiter(this, void 0, void 0, function* () {
|
|
231
|
-
|
|
231
|
+
var _c;
|
|
232
|
+
const user_id = ((_c = data[0]) === null || _c === void 0 ? void 0 : _c.qr_code_type_id) || null;
|
|
232
233
|
const amount = (data === null || data === void 0 ? void 0 : data.amount) || null;
|
|
233
234
|
const qrId = data === null || data === void 0 ? void 0 : data.id;
|
|
234
235
|
(0, UserAPIHelpers_1.getUserDetailsHelper)(config, {
|
|
@@ -17,7 +17,7 @@ const DatadogTxn_1 = require("../utils/DatadogTxn");
|
|
|
17
17
|
const netinfo_1 = require("@react-native-community/netinfo");
|
|
18
18
|
const Strings_1 = require("../utils/Strings");
|
|
19
19
|
exports.default = (apiConfig, apiPayload, onSuccess, onFailure) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
var _a, _b, _c;
|
|
20
|
+
var _a, _b, _c, _d;
|
|
21
21
|
const isConnected = yield netinfo_1.default.fetch();
|
|
22
22
|
console.log('Internet connection', isConnected);
|
|
23
23
|
if (!isConnected.isConnected) {
|
|
@@ -59,12 +59,9 @@ exports.default = (apiConfig, apiPayload, onSuccess, onFailure) => __awaiter(voi
|
|
|
59
59
|
// headers = { ...apiPayload.headersFlutterWave }
|
|
60
60
|
// }
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
// "Content-Type": "multipart/form-data",
|
|
66
|
-
// };
|
|
67
|
-
// }
|
|
62
|
+
if ((_d = apiPayload === null || apiPayload === void 0 ? void 0 : apiPayload.data) === null || _d === void 0 ? void 0 : _d._parts) {
|
|
63
|
+
headers = Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" });
|
|
64
|
+
}
|
|
68
65
|
let config = {
|
|
69
66
|
baseURL: endPoint,
|
|
70
67
|
timeout: apiConfig.timeout || 6000000000,
|
package/package.json
CHANGED
|
@@ -738,7 +738,7 @@ export class TransactionController {
|
|
|
738
738
|
config,
|
|
739
739
|
payload,
|
|
740
740
|
async (data: any) => {
|
|
741
|
-
const user_id = data?.qr_code_type_id || null;
|
|
741
|
+
const user_id = data[0]?.qr_code_type_id || null;
|
|
742
742
|
const amount = data?.amount || null
|
|
743
743
|
const qrId = data?.id
|
|
744
744
|
getUserDetailsHelper(
|
|
@@ -56,7 +56,7 @@ const isConnected: NetInfoState = await NetInfo.fetch()
|
|
|
56
56
|
success: false
|
|
57
57
|
})
|
|
58
58
|
console.log('Please, Check your Internet Connection..!!!!!!!!!!!!!!!')
|
|
59
|
-
}
|
|
59
|
+
}
|
|
60
60
|
else{
|
|
61
61
|
const method: METHOD = apiConfig.method || "get";
|
|
62
62
|
|
|
@@ -101,12 +101,12 @@ const isConnected: NetInfoState = await NetInfo.fetch()
|
|
|
101
101
|
// }
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
if (apiPayload?.data?._parts) {
|
|
105
|
+
headers = {
|
|
106
|
+
...headers,
|
|
107
|
+
"Content-Type": "multipart/form-data",
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
|