Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Adds case for updating credit cards
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 21, 2016
1 parent cb42fa9 commit 445ed72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ public function valid()
$errors[] = Validator::set($params, 'pan') ? null : 'Credit card number not provided.';
$errors[] = Validator::set($params, 'expdate') ? null : 'Expiry date not provided.';

break;
case 'res_update_cc':
$errors[] = Validator::set($params, 'data_key') ? null : 'Data key not provided.';
$errors[] = Validator::set($params, 'pan') ? null : 'Credit card number not provided.';
$errors[] = Validator::set($params, 'expdate') ? null : 'Expiry date not provided.';

break;
default:
$errors[] = $params['type'].' is not a supported transaction type.';
Expand Down

0 comments on commit 445ed72

Please sign in to comment.