Fixes for Stripe SEPA auto billing

This commit is contained in:
David Bomba 2022-05-09 08:19:35 +10:00
parent 61defbdb1d
commit 3c4894c806

View File

@ -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;