diff --git a/app/PaymentDrivers/Stripe/Charge.php b/app/PaymentDrivers/Stripe/Charge.php index 47508ca1fe4a..2683dd2f0241 100644 --- a/app/PaymentDrivers/Stripe/Charge.php +++ b/app/PaymentDrivers/Stripe/Charge.php @@ -80,7 +80,7 @@ class Charge 'description' => $description, 'metadata' => [ 'payment_hash' => $payment_hash->hash, - 'gateway_type_id' => GatewayType::CREDIT_CARD, + 'gateway_type_id' => $cgt->gateway_type_id, ], ]; @@ -135,7 +135,10 @@ class Charge return false; } - $payment_method_type = $response->charges->data[0]->payment_method_details->card->brand; + if($cgt->gateway_type_id == GatewayType::SEPA) + $payment_method_type = PaymentType::SEPA; + else + $payment_method_type = $response->charges->data[0]->payment_method_details->card->brand; $data = [ 'gateway_type_id' => $cgt->gateway_type_id, @@ -177,6 +180,8 @@ class Charge case 'mastercard': return PaymentType::MASTERCARD; break; + case PaymentType::SEPA: + return PaymentType::SEPA; default: return PaymentType::CREDIT_CARD_OTHER; break;