quickpos 1.0.921 → 1.0.922

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.
Files changed (2) hide show
  1. package/lib/paytr.js +2 -2
  2. package/package.json +1 -1
package/lib/paytr.js CHANGED
@@ -273,7 +273,7 @@ class PayTR {
273
273
 
274
274
  let token;
275
275
 
276
- if (callbackData.callback_id) type = "link";
276
+ if (callback_id) type = "link";
277
277
 
278
278
  if (type == 'iframe') {
279
279
  token = `${merchant_oid}${this.merchantSalt}${status}${total_amount}`;
@@ -289,7 +289,7 @@ class PayTR {
289
289
  .digest('base64');
290
290
 
291
291
  if (generatedHash !== hash) {
292
- throw new Error("PAYTR notification failed: bad hash");
292
+ throw new Error("PAYTR notification failed: bad hash type: " + type);
293
293
  }
294
294
 
295
295
  if (status === 'success') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quickpos",
3
- "version": "1.0.921",
3
+ "version": "1.0.922",
4
4
  "main": "app.js",
5
5
  "scripts": {
6
6
  "test": "node test.js"