From 63ebe4d1069a3ef74b85250523b7f08d59a83107 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 31 Aug 2017 18:56:58 +0300 Subject: [PATCH] Fix for tests --- app/Models/PaymentType.php | 2 +- app/Ninja/Import/Stripe/CustomerTransformer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/PaymentType.php b/app/Models/PaymentType.php index f1c2d7a70843..0c8a30c837c2 100644 --- a/app/Models/PaymentType.php +++ b/app/Models/PaymentType.php @@ -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, diff --git a/app/Ninja/Import/Stripe/CustomerTransformer.php b/app/Ninja/Import/Stripe/CustomerTransformer.php index 2fe75bffee51..ce6305d049f5 100644 --- a/app/Ninja/Import/Stripe/CustomerTransformer.php +++ b/app/Ninja/Import/Stripe/CustomerTransformer.php @@ -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',