Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Finance/Chargeback/ChargebackReasonHelper.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace Packaged\Rwd\Finance\Chargeback;

use Packaged\Rwd\Finance\Chargeback\Reasons\AccelChargebackReason;
use Packaged\Rwd\Finance\Chargeback\Reasons\AmericanExpressChargebackReason;
use Packaged\Rwd\Finance\Chargeback\Reasons\DinersChargebackReason;
use Packaged\Rwd\Finance\Chargeback\Reasons\DiscoverCardChargebackReason;
Expand Down Expand Up @@ -97,6 +98,10 @@ public static function fromCode($value)
case DiscoverCardChargebackReason::RSN_4541;
case DiscoverCardChargebackReason::RSN_4553;
case DiscoverCardChargebackReason::RSN_4555;
case DiscoverCardChargebackReason::RSN_4542;
case DiscoverCardChargebackReason::RSN_4586;
case DiscoverCardChargebackReason::RSN_4865;
case DiscoverCardChargebackReason::RSN_4753;
case DiscoverCardChargebackReason::RSN_4752;
case DiscoverCardChargebackReason::RSN_4755;
case DiscoverCardChargebackReason::RSN_4866;
Expand Down Expand Up @@ -284,6 +289,9 @@ public static function fromCode($value)
case StarChargebackReason::RSN_6000:
case StarChargebackReason::RSN_6500:
return StarChargebackReason::create($value);

case AccelChargebackReason::RSN_41:
return AccelChargebackReason::create($value);
}

return ChargebackReason::create($value, self::UNKNOWN_REASON);
Expand Down
24 changes: 24 additions & 0 deletions src/Finance/Chargeback/Reasons/AccelChargebackReason.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace Packaged\Rwd\Finance\Chargeback\Reasons;

use Packaged\Rwd\Finance\Chargeback\ChargebackCategory;
use Packaged\Rwd\Finance\Chargeback\ChargebackReason;

class AccelChargebackReason extends ChargebackReason
{
const RSN_41 = "41";

public static function create($code, $description = '', $category = ChargebackCategory::OTHER)
{
$reason = parent::create($code, $description, $category);
switch($code)
{
case self::RSN_41:
$reason->description = "Correction Item";
$reason->category = ChargebackCategory::OTHER;
break;
}
return $reason;
}
}
32 changes: 28 additions & 4 deletions src/Finance/Chargeback/Reasons/DiscoverCardChargebackReason.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@ class DiscoverCardChargebackReason extends ChargebackReason
const RSN_3041 = '3041';
const RSN_4534 = '4534';
const RSN_4541 = '4541';
const RSN_4542 = '4542';
const RSN_4550 = '4550';
const RSN_4553 = '4553';
const RSN_4555 = '4555';
const RSN_4586 = '4586';
const RSN_4752 = '4752';
const RSN_4753 = '4753';
const RSN_4755 = '4755';
const RSN_4762 = '4762';
const RSN_4863 = '4863';
const RSN_4864 = '4864';
const RSN_4865 = '4865';
const RSN_4866 = '4866';
const RSN_4867 = '4867';
const RSN_5621 = '5621';
const RSN_6005 = '6005';
const RSN_6021 = '6021';
Expand All @@ -36,8 +45,8 @@ class DiscoverCardChargebackReason extends ChargebackReason
const RSN_CR = 'CR';
const RSN_DA = 'DA';
const RSN_DC = 'DC';
const RSN_DP = 'DP';
const RSN_DP1 = 'DP1';
const RSN_DP = 'DP';
const RSN_EX = 'EX';
const RSN_IC = 'IC';
const RSN_IN = 'IN';
Expand All @@ -51,8 +60,8 @@ class DiscoverCardChargebackReason extends ChargebackReason
const RSN_PM = 'PM';
const RSN_RG = 'RG';
const RSN_RM = 'RM';
const RSN_RN = 'RN';
const RSN_RN2 = 'RN2';
const RSN_RN = 'RN';
const RSN_SV = 'SV';
const RSN_TF = 'TF';
const RSN_TNM = 'TNM';
Expand Down Expand Up @@ -81,6 +90,7 @@ public static function create($code, $description = '', $category = ChargebackCa
switch($code)
{
case self::RSN_5:
case self::RSN_4762:
$reason->description = 'Good Faith Investigation';
$reason->category = ChargebackCategory::CONSUMER;
break;
Expand Down Expand Up @@ -169,10 +179,12 @@ public static function create($code, $description = '', $category = ChargebackCa
$reason->category = ChargebackCategory::CONSUMER;
break;
case self::RSN_AT:
$reason->description = 'Authorization Noncompliance';
case self::RSN_4863:
$reason->description = 'Authorization Non-compliance';
$reason->category = ChargebackCategory::AUTHORIZATION;
break;
case self::RSN_AW:
case self::RSN_4586:
$reason->description = 'Altered Amount';
$reason->category = ChargebackCategory::PROCESSING;
break;
Expand All @@ -185,6 +197,7 @@ public static function create($code, $description = '', $category = ChargebackCa
$reason->category = ChargebackCategory::FRAUD;
break;
case self::RSN_CD:
case self::RSN_4550:
$reason->description = 'Credit / Debit Posted Incorrectly';
$reason->category = ChargebackCategory::PROCESSING;
break;
Expand Down Expand Up @@ -241,14 +254,16 @@ public static function create($code, $description = '', $category = ChargebackCa
$reason->category = ChargebackCategory::OTHER;
break;
case self::RSN_NF:
$reason->description = 'Non - Receipt of Cash from ATM';
case self::RSN_4864:
$reason->description = 'Non receipt of Cash from ATM';
$reason->category = ChargebackCategory::CONSUMER;
break;
case self::RSN_P:
$reason->description = 'Cardholder not present at location of cash advance';
$reason->category = ChargebackCategory::FRAUD;
break;
case self::RSN_PM:
case self::RSN_4865:
$reason->description = 'Paid by Other Means';
$reason->category = ChargebackCategory::PROCESSING;
break;
Expand Down Expand Up @@ -297,6 +312,7 @@ public static function create($code, $description = '', $category = ChargebackCa
$reason->category = ChargebackCategory::FRAUD;
break;
case self::RSN_UA06:
case self::RSN_4867:
$reason->description = 'Chip and PIN Transaction';
$reason->category = ChargebackCategory::FRAUD;
break;
Expand Down Expand Up @@ -352,6 +368,14 @@ public static function create($code, $description = '', $category = ChargebackCa
$reason->description = 'Not compliant and not classifiable';
$reason->category = ChargebackCategory::OTHER;
break;
case self::RSN_4542:
$reason->description = 'Late Presentation';
$reason->category = ChargebackCategory::FRAUD;
break;
case self::RSN_4753:
$reason->description = 'Invalid Cardholder Number';
$reason->category = ChargebackCategory::CONSUMER;
break;
}
return $reason;
}
Expand Down