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, 'description' => $description,
'metadata' => [ 'metadata' => [
'payment_hash' => $payment_hash->hash, '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; 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 = [ $data = [
'gateway_type_id' => $cgt->gateway_type_id, 'gateway_type_id' => $cgt->gateway_type_id,
@ -177,6 +180,8 @@ class Charge
case 'mastercard': case 'mastercard':
return PaymentType::MASTERCARD; return PaymentType::MASTERCARD;
break; break;
case PaymentType::SEPA:
return PaymentType::SEPA;
default: default:
return PaymentType::CREDIT_CARD_OTHER; return PaymentType::CREDIT_CARD_OTHER;
break; break;