1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Add DIRECT_DEBIT for PaymentType

This commit is contained in:
Benjamin Beganović 2021-10-16 15:53:05 +02:00
parent 05f4a33459
commit 9480215f47
2 changed files with 29 additions and 0 deletions

View File

@ -50,6 +50,7 @@ class PaymentType extends StaticModel
const GIROPAY = 39;
const PRZELEWY24 = 40;
const EPS = 41;
const DIRECT_DEBIT = 42;
public static function parseCardType($cardName)
{

View File

@ -0,0 +1,28 @@
<?php
use App\Models\GatewayType;
use App\Models\PaymentType;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddDirectDebitToPaymentTypes extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('payment_types', function (Blueprint $table) {
$type = new PaymentType();
$type->id = 42;
$type->name = 'Direct Debit';
$type->gateway_type_id = GatewayType::DIRECT_DEBIT;
$type->save();
});
}
}