1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fix for tests

This commit is contained in:
Hillel Coren 2017-08-31 18:56:58 +03:00
parent c68825d8a6
commit 63ebe4d106
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class PaymentType extends Eloquent
return $this->belongsTo('App\Models\GatewayType');
}
public static function resolveAlias($cardName)
public static function parseCardType($cardName)
{
$cardTypes = [
'visa' => PAYMENT_TYPE_VISA,

View File

@ -41,7 +41,7 @@ class CustomerTransformer extends BaseTransformer
'token' => $data->id,
'payment_method' => [
'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,
'last4' => $data->card_last4,
'expiration' => $data->card_exp_year . '-' . $data->card_exp_month . '-01',