@henrylabs-interview/payment-processor 0.2.15 → 0.2.16

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.
@@ -387,19 +387,19 @@ export class Checkout {
387
387
  immediateWeight -= sameRecords * 10;
388
388
  deferredWeight += sameRecords * 5;
389
389
  retryWeight += sameRecords * 5;
390
- fraudWeight += sameRecords * 5;
390
+ fraudWeight += sameRecords * 15;
391
391
  // --- Adjust based on amount ---
392
392
  if (amount > 1000) {
393
- deferredWeight += sameRecords * 5;
394
- retryWeight += sameRecords * 5;
393
+ deferredWeight += sameRecords * 5 + 10;
394
+ retryWeight += sameRecords * 5 + 10;
395
395
  }
396
396
  if (amount > 5000) {
397
- immediateWeight -= sameRecords * 5;
398
- retryWeight += sameRecords * 5;
399
- fraudWeight += sameRecords * 5;
397
+ immediateWeight -= sameRecords * 5 + 15;
398
+ retryWeight += sameRecords * 5 + 30;
399
+ fraudWeight += sameRecords * 10;
400
400
  }
401
401
  if (amount > 10000) {
402
- fraudWeight += sameRecords * 5;
402
+ fraudWeight += sameRecords * 30;
403
403
  }
404
404
  // Ensure no negative weights
405
405
  immediateWeight = Math.max(0, immediateWeight);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henrylabs-interview/payment-processor",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",