@pax2pay/model-banking 0.1.210 → 0.1.212
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/Authorization/Status.ts +16 -13
- package/Authorization/index.ts +10 -4
- package/Card/Operation/Authorization.ts +1 -1
- package/dist/Authorization/Status.d.ts +3 -2
- package/dist/Authorization/Status.js +15 -12
- package/dist/Authorization/Status.js.map +1 -1
- package/dist/Authorization/index.d.ts +1 -1
- package/dist/Authorization/index.js +9 -2
- package/dist/Authorization/index.js.map +1 -1
- package/dist/Card/Operation/Authorization.d.ts +1 -1
- package/dist/Card/Operation/Authorization.js +1 -1
- package/dist/Card/Operation/Authorization.js.map +1 -1
- package/package.json +1 -1
package/Authorization/Status.ts
CHANGED
|
@@ -8,19 +8,23 @@ export namespace Status {
|
|
|
8
8
|
export interface Failed {
|
|
9
9
|
code: string
|
|
10
10
|
reason: string | string[]
|
|
11
|
-
error?: gracely.Error
|
|
11
|
+
error?: gracely.Error | Transaction.Note[]
|
|
12
12
|
}
|
|
13
13
|
export namespace Failed {
|
|
14
|
-
export function from(error
|
|
14
|
+
export function from(error: gracely.Error | Transaction.Note[]): Failed {
|
|
15
15
|
let result: Status
|
|
16
|
-
if (error
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
if (gracely.Error.is(error)) {
|
|
17
|
+
if (error.error?.includes("Card with id"))
|
|
18
|
+
result = { code: "14", reason: "Invalid card number" }
|
|
19
|
+
else if (error.error?.includes("must correspond to card limit")) {
|
|
20
|
+
result = { code: "13", reason: "Invalid amount" }
|
|
21
|
+
} else if (error.error?.includes("Failed to reach account")) {
|
|
22
|
+
result = { code: "78", reason: "Invalid/nonexistent account specified (general)" }
|
|
23
|
+
} else
|
|
24
|
+
result = { code: "05", reason: "Do not honor" }
|
|
25
|
+
} //default
|
|
26
|
+
else {
|
|
27
|
+
const reasons: string[] = error.reduce(
|
|
24
28
|
(a: string[], c: Transaction.Note) => [...a, `${c.created} ${c.author}: ${c.text ?? ""}`],
|
|
25
29
|
[]
|
|
26
30
|
)
|
|
@@ -29,8 +33,7 @@ export namespace Status {
|
|
|
29
33
|
//The restricted card is only allowed to be used for certain types of businesses or purchases."
|
|
30
34
|
reason: ["Restricted card.", ...reasons],
|
|
31
35
|
}
|
|
32
|
-
}
|
|
33
|
-
result = { code: "05", reason: "Do not honor" } //default
|
|
36
|
+
}
|
|
34
37
|
return { ...result, error }
|
|
35
38
|
}
|
|
36
39
|
}
|
|
@@ -39,7 +42,7 @@ export namespace Status {
|
|
|
39
42
|
isly.object<Status.Failed>({
|
|
40
43
|
code: isly.string(),
|
|
41
44
|
reason: isly.union(isly.string(), isly.string().array()),
|
|
42
|
-
error: isly.fromIs("gracely.Error", gracely.Error.is).optional(),
|
|
45
|
+
error: isly.union(Transaction.Note.type.array(), isly.fromIs("gracely.Error", gracely.Error.is)).optional(),
|
|
43
46
|
})
|
|
44
47
|
)
|
|
45
48
|
export const is = type.is
|
package/Authorization/index.ts
CHANGED
|
@@ -68,7 +68,7 @@ export namespace Authorization {
|
|
|
68
68
|
export function fromCreatable(
|
|
69
69
|
creatable: Creatable,
|
|
70
70
|
card: Card | gracely.Error,
|
|
71
|
-
transaction
|
|
71
|
+
transaction: Transaction | gracely.Error
|
|
72
72
|
): Authorization {
|
|
73
73
|
const partial: Pick<Authorization, "created" | "amount" | "merchant" | "acquirer" | "reference" | "description"> = {
|
|
74
74
|
created: isoly.DateTime.now(),
|
|
@@ -86,13 +86,20 @@ export namespace Authorization {
|
|
|
86
86
|
...partial,
|
|
87
87
|
card: { id: creatable.card },
|
|
88
88
|
}
|
|
89
|
-
else if (gracely.Error.is(transaction)
|
|
89
|
+
else if (gracely.Error.is(transaction))
|
|
90
90
|
result = {
|
|
91
91
|
id: Identifier.generate(),
|
|
92
92
|
status: Status.Failed.from(transaction),
|
|
93
93
|
...partial,
|
|
94
94
|
card: { id: card.id, iin: card.details.iin, last4: card.details.last4, token: card.details.token },
|
|
95
95
|
}
|
|
96
|
+
else if (transaction.status != "processing")
|
|
97
|
+
result = {
|
|
98
|
+
id: Identifier.generate(),
|
|
99
|
+
status: Status.Failed.from(transaction.notes),
|
|
100
|
+
...partial,
|
|
101
|
+
card: { id: card.id, iin: card.details.iin, last4: card.details.last4, token: card.details.token },
|
|
102
|
+
}
|
|
96
103
|
else
|
|
97
104
|
result = {
|
|
98
105
|
id: transaction.id,
|
|
@@ -100,11 +107,10 @@ export namespace Authorization {
|
|
|
100
107
|
...partial,
|
|
101
108
|
card: { id: card.id, iin: card.details.iin, last4: card.details.last4, token: card.details.token },
|
|
102
109
|
account: card.account,
|
|
103
|
-
transaction: { id: transaction
|
|
110
|
+
transaction: { id: transaction.id, posted: transaction.posted, description: transaction.description },
|
|
104
111
|
}
|
|
105
112
|
return result
|
|
106
113
|
}
|
|
107
|
-
|
|
108
114
|
export function toTransaction(authorization: Authorization): Transaction.Creatable {
|
|
109
115
|
return {
|
|
110
116
|
amount: authorization.amount[1],
|
|
@@ -9,7 +9,7 @@ export interface Authorization {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export namespace Authorization {
|
|
12
|
-
export const statuses = ["created", "confirmed", "
|
|
12
|
+
export const statuses = ["created", "confirmed", "refunded", "captured", "cancelled"] as const
|
|
13
13
|
export type Status = typeof statuses[number]
|
|
14
14
|
export const type = isly.object<Authorization>({
|
|
15
15
|
type: isly.string("authorization"),
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { isly } from "isly";
|
|
3
|
+
import { Transaction } from "../Transaction";
|
|
3
4
|
export type Status = "approved" | Status.Failed;
|
|
4
5
|
export declare namespace Status {
|
|
5
6
|
interface Failed {
|
|
6
7
|
code: string;
|
|
7
8
|
reason: string | string[];
|
|
8
|
-
error?: gracely.Error;
|
|
9
|
+
error?: gracely.Error | Transaction.Note[];
|
|
9
10
|
}
|
|
10
11
|
namespace Failed {
|
|
11
|
-
function from(error
|
|
12
|
+
function from(error: gracely.Error | Transaction.Note[]): Failed;
|
|
12
13
|
}
|
|
13
14
|
const type: isly.Type<"approved" | Failed>;
|
|
14
15
|
const is: isly.Type.IsFunction<"approved" | Failed>;
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { isly } from "isly";
|
|
3
|
+
import { Transaction } from "../Transaction";
|
|
3
4
|
export var Status;
|
|
4
5
|
(function (Status) {
|
|
5
6
|
let Failed;
|
|
6
7
|
(function (Failed) {
|
|
7
8
|
function from(error) {
|
|
8
9
|
let result;
|
|
9
|
-
if (error
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (gracely.Error.is(error)) {
|
|
11
|
+
if (error.error?.includes("Card with id"))
|
|
12
|
+
result = { code: "14", reason: "Invalid card number" };
|
|
13
|
+
else if (error.error?.includes("must correspond to card limit")) {
|
|
14
|
+
result = { code: "13", reason: "Invalid amount" };
|
|
15
|
+
}
|
|
16
|
+
else if (error.error?.includes("Failed to reach account")) {
|
|
17
|
+
result = { code: "78", reason: "Invalid/nonexistent account specified (general)" };
|
|
18
|
+
}
|
|
19
|
+
else
|
|
20
|
+
result = { code: "05", reason: "Do not honor" };
|
|
13
21
|
}
|
|
14
|
-
else
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
else if (gracely.client.InvalidContent.is(error) && error.content.description.includes("rules")) {
|
|
18
|
-
const reasons = error.content.details?.notes.reduce((a, c) => [...a, `${c.created} ${c.author}: ${c.text ?? ""}`], []);
|
|
22
|
+
else {
|
|
23
|
+
const reasons = error.reduce((a, c) => [...a, `${c.created} ${c.author}: ${c.text ?? ""}`], []);
|
|
19
24
|
result = {
|
|
20
25
|
code: "62",
|
|
21
26
|
reason: ["Restricted card.", ...reasons],
|
|
22
27
|
};
|
|
23
28
|
}
|
|
24
|
-
else
|
|
25
|
-
result = { code: "05", reason: "Do not honor" };
|
|
26
29
|
return { ...result, error };
|
|
27
30
|
}
|
|
28
31
|
Failed.from = from;
|
|
@@ -30,7 +33,7 @@ export var Status;
|
|
|
30
33
|
Status.type = isly.union(isly.string("approved"), isly.object({
|
|
31
34
|
code: isly.string(),
|
|
32
35
|
reason: isly.union(isly.string(), isly.string().array()),
|
|
33
|
-
error: isly.fromIs("gracely.Error", gracely.Error.is).optional(),
|
|
36
|
+
error: isly.union(Transaction.Note.type.array(), isly.fromIs("gracely.Error", gracely.Error.is)).optional(),
|
|
34
37
|
}));
|
|
35
38
|
Status.is = Status.type.is;
|
|
36
39
|
Status.flaw = Status.type.flaw;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Status.js","sourceRoot":"../","sources":["Authorization/Status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"Status.js","sourceRoot":"../","sources":["Authorization/Status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAI5C,MAAM,KAAW,MAAM,CA2CtB;AA3CD,WAAiB,MAAM;IAMtB,IAAiB,MAAM,CA0BtB;IA1BD,WAAiB,MAAM;QACtB,SAAgB,IAAI,CAAC,KAAyC;YAC7D,IAAI,MAAc,CAAA;YAClB,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC7B,IAAI,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC;oBACxC,MAAM,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAA;qBAClD,IAAI,KAAK,CAAC,KAAK,EAA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,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC3G,CAAC,CACF,CAAA;IACY,SAAE,GAAG,OAAA,IAAI,CAAC,EAAE,CAAA;IACZ,WAAI,GAAG,OAAA,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC,EA3CgB,MAAM,KAAN,MAAM,QA2CtB"}
|
|
@@ -38,6 +38,6 @@ export declare namespace Authorization {
|
|
|
38
38
|
const type: isly.object.ExtendableType<Authorization>;
|
|
39
39
|
const is: isly.Type.IsFunction<Authorization>;
|
|
40
40
|
const flaw: isly.Type.FlawFunction;
|
|
41
|
-
function fromCreatable(creatable: Creatable, card: Card | gracely.Error, transaction
|
|
41
|
+
function fromCreatable(creatable: Creatable, card: Card | gracely.Error, transaction: Transaction | gracely.Error): Authorization;
|
|
42
42
|
function toTransaction(authorization: Authorization): Transaction.Creatable;
|
|
43
43
|
}
|
|
@@ -54,13 +54,20 @@ export var Authorization;
|
|
|
54
54
|
...partial,
|
|
55
55
|
card: { id: creatable.card },
|
|
56
56
|
};
|
|
57
|
-
else if (gracely.Error.is(transaction)
|
|
57
|
+
else if (gracely.Error.is(transaction))
|
|
58
58
|
result = {
|
|
59
59
|
id: Identifier.generate(),
|
|
60
60
|
status: Status.Failed.from(transaction),
|
|
61
61
|
...partial,
|
|
62
62
|
card: { id: card.id, iin: card.details.iin, last4: card.details.last4, token: card.details.token },
|
|
63
63
|
};
|
|
64
|
+
else if (transaction.status != "processing")
|
|
65
|
+
result = {
|
|
66
|
+
id: Identifier.generate(),
|
|
67
|
+
status: Status.Failed.from(transaction.notes),
|
|
68
|
+
...partial,
|
|
69
|
+
card: { id: card.id, iin: card.details.iin, last4: card.details.last4, token: card.details.token },
|
|
70
|
+
};
|
|
64
71
|
else
|
|
65
72
|
result = {
|
|
66
73
|
id: transaction.id,
|
|
@@ -68,7 +75,7 @@ export var Authorization;
|
|
|
68
75
|
...partial,
|
|
69
76
|
card: { id: card.id, iin: card.details.iin, last4: card.details.last4, token: card.details.token },
|
|
70
77
|
account: card.account,
|
|
71
|
-
transaction: { id: transaction
|
|
78
|
+
transaction: { id: transaction.id, posted: transaction.posted, description: transaction.description },
|
|
72
79
|
};
|
|
73
80
|
return result;
|
|
74
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Authorization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,SAAS,IAAI,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAyBjC,MAAM,KAAW,aAAa,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Authorization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,QAAQ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Aa,CAAC,MAAM,CAAC,CAAC,CAAC;YAC/B,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;YACjC,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,WAAW,EAAE;gBACZ,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,aAAa,CAAC,QAAQ;gBAChC,QAAQ,EAAE,aAAa,CAAC,QAAQ;aAChC;SACD,CAAA;IACF,CAAC;IAXe,2BAAa,gBAW5B,CAAA;AACF,CAAC,EAzFgB,aAAa,KAAb,aAAa,QAyF7B"}
|
|
@@ -8,7 +8,7 @@ export interface Authorization {
|
|
|
8
8
|
created: isoly.DateTime;
|
|
9
9
|
}
|
|
10
10
|
export declare namespace Authorization {
|
|
11
|
-
const statuses: readonly ["created", "confirmed", "
|
|
11
|
+
const statuses: readonly ["created", "confirmed", "refunded", "captured", "cancelled"];
|
|
12
12
|
type Status = typeof statuses[number];
|
|
13
13
|
const type: isly.object.ExtendableType<Authorization>;
|
|
14
14
|
const is: isly.Type.IsFunction<Authorization>;
|
|
@@ -2,7 +2,7 @@ import { isoly } from "isoly";
|
|
|
2
2
|
import { isly } from "isly";
|
|
3
3
|
export var Authorization;
|
|
4
4
|
(function (Authorization) {
|
|
5
|
-
Authorization.statuses = ["created", "confirmed", "
|
|
5
|
+
Authorization.statuses = ["created", "confirmed", "refunded", "captured", "cancelled"];
|
|
6
6
|
Authorization.type = isly.object({
|
|
7
7
|
type: isly.string("authorization"),
|
|
8
8
|
id: isly.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorization.js","sourceRoot":"../","sources":["Card/Operation/Authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAS3B,MAAM,KAAW,aAAa,CAW7B;AAXD,WAAiB,aAAa;IAChB,sBAAQ,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"Authorization.js","sourceRoot":"../","sources":["Card/Operation/Authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAS3B,MAAM,KAAW,aAAa,CAW7B;AAXD,WAAiB,aAAa;IAChB,sBAAQ,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAU,CAAA;IAEjF,kBAAI,GAAG,IAAI,CAAC,MAAM,CAAgB;QAC9C,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;QAClC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;QACjB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,cAAA,QAAQ,CAAC;QAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;KACzD,CAAC,CAAA;IACW,gBAAE,GAAG,cAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAXgB,aAAa,KAAb,aAAa,QAW7B"}
|