Skip to content

Commit

Permalink
Fix instant payment contact info condition (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
KeinAsylum authored Oct 9, 2024
1 parent b26baa0 commit ea5b03f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/common/paymentCondition/initPaymentCondition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ const isInstantPaymentContactInfoEligible = (
return true;
}
const { email, phoneNumber } = metadata;
// Metadata contactInfo email and phoneNumber are not required, instant payment is eligible
if (!email && !phoneNumber) {
return true;
}

console.warn(`isInstantPaymentContactInfoEligible, email: ${email}, phoneNumber: ${phoneNumber}`);
const { contactInfo } = initContext;
if (email && !isNil(contactInfo.email)) {
return true;
Expand Down

0 comments on commit ea5b03f

Please sign in to comment.