Fixes for SEPA auto-billing

This commit is contained in:
David Bomba 2022-05-08 11:22:59 +10:00
parent 4a4bdf322d
commit 213e46e989
2 changed files with 61 additions and 0 deletions

View File

@ -84,6 +84,9 @@ class Charge
],
];
if($cgt->gateway_type_id == GatewayType::SEPA)
$data['payment_method_types'] = ['sepa_debit'];
$response = $this->stripe->createPaymentIntent($data, $this->stripe->stripe_connect_auth);
SystemLogger::dispatch($response, SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_SUCCESS, SystemLog::TYPE_STRIPE, $this->stripe->client, $this->stripe->client->company);

View File

@ -0,0 +1,58 @@
<?php
use App\Models\Gateway;
use App\Utils\Ninja;
use App\Utils\Traits\AppSetup;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class HealStripeGatewayConfiguration extends Migration
{
use AppSetup;
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(Ninja::isSelfHost())
{
Model::unguard();
$stripe = [
'name' => 'Stripe',
'provider' => 'Stripe',
'sort_order' => 1,
'key' => 'd14dd26a37cecc30fdd65700bfb55b23',
'fields' => '{"publishableKey":"","apiKey":"","appleDomainVerification":""}'
];
$record = Gateway::find(20);
if ($record) {
$record->fill($stripe);
$record->save();
}
$this->buildCache(true);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}