@crediblemark/buayar 0.1.1 → 0.1.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.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50,7 +50,7 @@ var DuitkuProvider = class extends BasePaymentProvider {
|
|
|
50
50
|
async createInvoice(params, config) {
|
|
51
51
|
const { orderId, amount, productDetails, customer, returnUrl, callbackUrl } = params;
|
|
52
52
|
const { merchantCode, apiKey, sandbox } = config;
|
|
53
|
-
const url = sandbox ? "https://sandbox.duitku.com/
|
|
53
|
+
const url = sandbox ? "https://api-sandbox.duitku.com/api/merchant/createInvoice" : "https://api-prod.duitku.com/api/merchant/createInvoice";
|
|
54
54
|
const integerAmount = Math.round(amount);
|
|
55
55
|
const rawSignature = merchantCode + orderId + integerAmount.toString() + apiKey;
|
|
56
56
|
const signature = import_crypto.default.createHash("md5").update(rawSignature).digest("hex");
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var DuitkuProvider = class extends BasePaymentProvider {
|
|
|
11
11
|
async createInvoice(params, config) {
|
|
12
12
|
const { orderId, amount, productDetails, customer, returnUrl, callbackUrl } = params;
|
|
13
13
|
const { merchantCode, apiKey, sandbox } = config;
|
|
14
|
-
const url = sandbox ? "https://sandbox.duitku.com/
|
|
14
|
+
const url = sandbox ? "https://api-sandbox.duitku.com/api/merchant/createInvoice" : "https://api-prod.duitku.com/api/merchant/createInvoice";
|
|
15
15
|
const integerAmount = Math.round(amount);
|
|
16
16
|
const rawSignature = merchantCode + orderId + integerAmount.toString() + apiKey;
|
|
17
17
|
const signature = crypto.createHash("md5").update(rawSignature).digest("hex");
|