Skip to content

Commit c558ce9

Browse files
authored
Visa Compliance disputes: special notice and attention to a higher fee (#11121)
1 parent 2fa9d38 commit c558ce9

15 files changed

+2509
-14
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: add
3+
4+
Handling of the Visa Compliance disputes with attention to a specific dispute fee.

client/disputes/new-evidence/index.tsx

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,13 @@ export default ( { query }: { query: { id: string } } ) => {
576576
dispute.status !== 'needs_response' &&
577577
dispute.status !== 'warning_needs_response';
578578

579+
const isVisaComplianceDispute =
580+
dispute &&
581+
( dispute.reason === 'noncompliant' ||
582+
( dispute?.enhanced_eligibility_types || [] ).includes(
583+
'visa_compliance'
584+
) );
585+
579586
// --- Accordion summary content (must be before any early returns) ---
580587
const summaryItems = useMemo( () => {
581588
if ( ! dispute ) return [];
@@ -933,6 +940,25 @@ export default ( { query }: { query: { id: string } } ) => {
933940
</InlineNotice>
934941
);
935942

943+
const inlineNoticeVisaCompliance = () => (
944+
<InlineNotice
945+
icon
946+
isDismissible={ false }
947+
status="info"
948+
className="dispute-steps__notice-content"
949+
>
950+
{ createInterpolateElement(
951+
__(
952+
'<strong>The outcome of this dispute will be determined by Visa.</strong> WooPayments has no influence over the decision and is not liable for any chargebacks.',
953+
'woocommerce-payments'
954+
),
955+
{
956+
strong: <strong />,
957+
}
958+
) }
959+
</InlineNotice>
960+
);
961+
936962
// --- Step content ---
937963
const renderStepContent = () => {
938964
// if ( ! fields.length ) return null;
@@ -981,7 +1007,9 @@ export default ( { query }: { query: { id: string } } ) => {
9811007
fields={ recommendedDocumentsFields }
9821008
readOnly={ readOnly }
9831009
/>
984-
{ inlineNotice( bankName ) }
1010+
{ isVisaComplianceDispute
1011+
? inlineNoticeVisaCompliance()
1012+
: inlineNotice( bankName ) }
9851013
</>
9861014
);
9871015
}
@@ -1015,7 +1043,9 @@ export default ( { query }: { query: { id: string } } ) => {
10151043
fields={ recommendedShippingDocumentsFields }
10161044
readOnly={ readOnly }
10171045
/>
1018-
{ inlineNotice( bankName ) }
1046+
{ isVisaComplianceDispute
1047+
? inlineNoticeVisaCompliance()
1048+
: inlineNotice( bankName ) }
10191049
</>
10201050
);
10211051
}
@@ -1118,7 +1148,9 @@ export default ( { query }: { query: { id: string } } ) => {
11181148
} }
11191149
readOnly={ readOnly }
11201150
/>
1121-
{ inlineNotice( bankName ) }
1151+
{ isVisaComplianceDispute
1152+
? inlineNoticeVisaCompliance()
1153+
: inlineNotice( bankName ) }
11221154
</>
11231155
);
11241156
}

client/disputes/strings.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,19 @@ export const reasons: Record<
349349
),
350350
],
351351
},
352+
noncompliant: {
353+
display: __( 'Non-compliant', 'woocommerce-payments' ),
354+
claim: __(
355+
'Your customer’s bank claims this payment violates Visa’s rules.',
356+
'woocommerce-payments'
357+
),
358+
summary: [
359+
__(
360+
'The customer’s bank claims this transaction doesn’t conform to Visa’s network rules.',
361+
'woocommerce-payments'
362+
),
363+
],
364+
},
352365
};
353366

354367
// Mapping of disputes status to display string.

0 commit comments

Comments
 (0)