nextemos 4.12.9 → 4.12.11
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.
|
@@ -19,3 +19,13 @@ export declare enum PAYMENT_PROVIDERS {
|
|
|
19
19
|
OTHER = "Other",
|
|
20
20
|
ODERO_CREDIT_CARD = "OderoCreditCard"
|
|
21
21
|
}
|
|
22
|
+
export declare enum PAYMENT_TYPES {
|
|
23
|
+
CreditCart = 1,
|
|
24
|
+
BankTransfer = 2,
|
|
25
|
+
FreeOfCharge = 3,
|
|
26
|
+
GarantiPay = 4,
|
|
27
|
+
BKMEkspress = 5,
|
|
28
|
+
GiroGate = 6,
|
|
29
|
+
Paypal = 7,
|
|
30
|
+
PayAtDoor = 8
|
|
31
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PAYMENT_PROVIDERS = void 0;
|
|
3
|
+
exports.PAYMENT_TYPES = exports.PAYMENT_PROVIDERS = void 0;
|
|
4
4
|
var PAYMENT_PROVIDERS;
|
|
5
5
|
(function (PAYMENT_PROVIDERS) {
|
|
6
6
|
PAYMENT_PROVIDERS["CREDIT_CARD"] = "CreditCard";
|
|
@@ -23,3 +23,14 @@ var PAYMENT_PROVIDERS;
|
|
|
23
23
|
PAYMENT_PROVIDERS["OTHER"] = "Other";
|
|
24
24
|
PAYMENT_PROVIDERS["ODERO_CREDIT_CARD"] = "OderoCreditCard";
|
|
25
25
|
})(PAYMENT_PROVIDERS || (exports.PAYMENT_PROVIDERS = PAYMENT_PROVIDERS = {}));
|
|
26
|
+
var PAYMENT_TYPES;
|
|
27
|
+
(function (PAYMENT_TYPES) {
|
|
28
|
+
PAYMENT_TYPES[PAYMENT_TYPES["CreditCart"] = 1] = "CreditCart";
|
|
29
|
+
PAYMENT_TYPES[PAYMENT_TYPES["BankTransfer"] = 2] = "BankTransfer";
|
|
30
|
+
PAYMENT_TYPES[PAYMENT_TYPES["FreeOfCharge"] = 3] = "FreeOfCharge";
|
|
31
|
+
PAYMENT_TYPES[PAYMENT_TYPES["GarantiPay"] = 4] = "GarantiPay";
|
|
32
|
+
PAYMENT_TYPES[PAYMENT_TYPES["BKMEkspress"] = 5] = "BKMEkspress";
|
|
33
|
+
PAYMENT_TYPES[PAYMENT_TYPES["GiroGate"] = 6] = "GiroGate";
|
|
34
|
+
PAYMENT_TYPES[PAYMENT_TYPES["Paypal"] = 7] = "Paypal";
|
|
35
|
+
PAYMENT_TYPES[PAYMENT_TYPES["PayAtDoor"] = 8] = "PayAtDoor";
|
|
36
|
+
})(PAYMENT_TYPES || (exports.PAYMENT_TYPES = PAYMENT_TYPES = {}));
|
|
@@ -53,9 +53,16 @@ const fetchRequest = () => {
|
|
|
53
53
|
method === __1.HTTPMethod.DELETE) {
|
|
54
54
|
options.headers = Object.assign({ ["Content-Type"]: "application/json" }, options.headers);
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
// İstek seçeneklerini oluştur
|
|
57
|
+
const requestOptions = Object.assign(Object.assign({}, options), { method });
|
|
58
|
+
// Node.js(Next.js) için cache'i no-cache yap
|
|
59
|
+
if (process.env.NEXT_RUNTIME === "nodejs")
|
|
60
|
+
requestOptions.cache = "no-cache";
|
|
61
|
+
// Cache seçeneği varsa onu kullan
|
|
62
|
+
if (options.cache)
|
|
63
|
+
requestOptions.cache = options.cache;
|
|
57
64
|
if (process.env.NODE_ENV === "development")
|
|
58
|
-
console.log(`Fetch Request: ${method}`, apiURL.toString(),
|
|
65
|
+
console.log(`Fetch Request: ${method}`, apiURL.toString(), process.env.NODE_DEBUG === "true" && requestOptions);
|
|
59
66
|
try {
|
|
60
67
|
const response = yield fetch(apiURL.toString(), requestOptions);
|
|
61
68
|
if (!response.ok) {
|
|
@@ -88,7 +95,6 @@ const fetchRequest = () => {
|
|
|
88
95
|
responseModel = yield response.json().catch(() => ({}));
|
|
89
96
|
if (process.env.NODE_ENV === "development") {
|
|
90
97
|
console.log("Fetch Success: ", {
|
|
91
|
-
api: apiURL,
|
|
92
98
|
apiUrl: apiURL.toString(),
|
|
93
99
|
status: response.status,
|
|
94
100
|
});
|