We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 62ff833 + f6e0173 commit e51a9e6Copy full SHA for e51a9e6
packages/app-elements/src/helpers/transactions.ts
@@ -9,10 +9,14 @@ import isEmpty from "lodash-es/isEmpty"
9
export function orderTransactionIsAnAsyncCapture(
10
transaction: Authorization | Void | Capture | Refund,
11
): boolean {
12
+ const isAsyncMessage =
13
+ isEmpty(transaction.message) ||
14
+ ["pending", "received"].includes(transaction.message?.toLowerCase() ?? "")
15
+
16
return (
17
transaction.type === "captures" &&
18
!transaction.succeeded &&
- isEmpty(transaction.message) &&
19
+ isAsyncMessage &&
20
isEmpty(transaction.error_code)
21
)
22
}
0 commit comments