We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 061c3e1 commit e56a91fCopy full SHA for e56a91f
src/three-domain-secure/component.jsx
@@ -115,9 +115,17 @@ export function getThreeDomainSecureComponent(): TDSComponent {
115
onSuccess: {
116
type: "function",
117
alias: "onContingencyResult",
118
- decorate: ({ value, onError }) => {
+ decorate: ({ props, value, onError }) => {
119
return (err, result) => {
120
- if (err) {
+ const isCardFieldFlow = props.userType === "UNBRANDED_GUEST";
121
+
122
+ // HostedFields ONLY rejects when the err object is not null. The below implementation ensures that CardFields follows the same pattern.
123
124
+ const hasError = isCardFieldFlow
125
+ ? err
126
+ : err || result?.success === false;
127
128
+ if (hasError) {
129
return onError(err);
130
}
131
0 commit comments