Skip to content

Commit 7962c89

Browse files
dmvrtxrtio
andauthored
Do not allow to challenge Visa compliance disputes (#10903)
Co-authored-by: Rafael Meneses <[email protected]>
1 parent 1206a6f commit 7962c89

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
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: update
3+
4+
Disallow challenging the Visa compliance disputes.

client/payment-details/dispute-details/dispute-awaiting-response-details.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,17 @@ const DisputeAwaitingResponseDetails: React.FC< Props > = ( {
239239
isDisputeAcceptRequestPending,
240240
} );
241241

242+
/**
243+
* The following cases cannot be defended:
244+
* - Klarna inquiries
245+
* - Visa Compliance disputes (require confirmation of a specific fee)
246+
*/
242247
const isDefendable = ! (
243-
paymentMethod === 'klarna' && isInquiry( dispute.status )
244-
); // Only Klarna inquires are not defendable
248+
( paymentMethod === 'klarna' && isInquiry( dispute.status ) ) ||
249+
( dispute?.enhanced_eligibility_types || [] ).includes(
250+
'visa_compliance'
251+
)
252+
);
245253

246254
const challengeButtonDefaultText = isInquiry( dispute.status )
247255
? __( 'Submit evidence', 'woocommerce-payments' )

client/types/disputes.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export interface Dispute {
110110
*/
111111
balance_transactions: BalanceTransaction[];
112112
payment_intent: string;
113+
enhanced_eligibility_types?: string[];
113114
}
114115

115116
export interface CachedDispute {

0 commit comments

Comments
 (0)