Skip to content

Commit

Permalink
Armazenando apenas os 4 últimos dígitos do cartão.
Browse files Browse the repository at this point in the history
  • Loading branch information
Clayder committed Apr 30, 2019
1 parent 1b6acea commit f0948d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Gateway/Response/CardDetailsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function handle(array $handlingSubject, array $response)
*/
$response_obj = $this->subjectReader->readTransaction($response);

$payment->setCcLast4($response_obj->getCardNumber());
$payment->setCcLast4(substr($response_obj->getCardNumber(), -4));
$payment->setCcExpMonth($response_obj->getExpirationMonth());
$payment->setCcExpYear($response_obj->getExpirationYear());
$payment->setCcType($response_obj->getCardBin());
Expand All @@ -65,3 +65,4 @@ public function handle(array $handlingSubject, array $response)
}

}

0 comments on commit f0948d3

Please sign in to comment.