@henrylabs-interview/payment-processor 0.2.13 → 0.2.14

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.
@@ -80,11 +80,11 @@ export class Checkout {
80
80
  status: 'failure',
81
81
  substatus: '501-not-supported',
82
82
  code: 501,
83
- message: 'This currency is currently not supported, please convert first.',
83
+ message: 'This currency is currently not supported, please convert to another supported currency first.',
84
84
  };
85
85
  }
86
- // Simulated random internal failure
87
- if (Math.random() > 0.85) {
86
+ // Simulated stupid internal failures
87
+ if ((params.customerId ?? '').length === crypto.randomUUID().length || (params.customerId ?? '').includes('-') || params.customerId === '') {
88
88
  return {
89
89
  _reqId: genReqId(),
90
90
  status: 'failure',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henrylabs-interview/payment-processor",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",