mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for tests
This commit is contained in:
parent
c68825d8a6
commit
63ebe4d106
@ -22,7 +22,7 @@ class PaymentType extends Eloquent
|
|||||||
return $this->belongsTo('App\Models\GatewayType');
|
return $this->belongsTo('App\Models\GatewayType');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function resolveAlias($cardName)
|
public static function parseCardType($cardName)
|
||||||
{
|
{
|
||||||
$cardTypes = [
|
$cardTypes = [
|
||||||
'visa' => PAYMENT_TYPE_VISA,
|
'visa' => PAYMENT_TYPE_VISA,
|
||||||
|
@ -41,7 +41,7 @@ class CustomerTransformer extends BaseTransformer
|
|||||||
'token' => $data->id,
|
'token' => $data->id,
|
||||||
'payment_method' => [
|
'payment_method' => [
|
||||||
'contact_id' => $contact->id,
|
'contact_id' => $contact->id,
|
||||||
'payment_type_id' => PaymentType::resolveAlias($data->card_brand),
|
'payment_type_id' => PaymentType::parseCardType($data->card_brand),
|
||||||
'source_reference' => $data->card_id,
|
'source_reference' => $data->card_id,
|
||||||
'last4' => $data->card_last4,
|
'last4' => $data->card_last4,
|
||||||
'expiration' => $data->card_exp_year . '-' . $data->card_exp_month . '-01',
|
'expiration' => $data->card_exp_year . '-' . $data->card_exp_month . '-01',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user