1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 00:53:10 +01:00
invoiceninja/database/seeds/PaymentLibrariesSeeder.php

66 lines
3.8 KiB
PHP
Raw Normal View History

2015-03-16 22:45:25 +01:00
<?php
2015-03-25 20:56:31 +01:00
use App\Models\Gateway;
2015-05-10 10:45:03 +02:00
use App\Models\PaymentTerm;
2015-06-03 19:55:48 +02:00
use App\Models\Currency;
2015-06-07 10:05:30 +02:00
use App\Models\DateFormat;
use App\Models\DatetimeFormat;
2015-07-28 09:00:00 +02:00
use App\Models\InvoiceDesign;
2015-09-07 11:07:55 +02:00
use App\Models\Country;
2015-03-25 20:56:31 +01:00
2015-03-16 22:45:25 +01:00
class PaymentLibrariesSeeder extends Seeder
{
2015-06-03 19:55:48 +02:00
public function run()
{
Eloquent::unguard();
2015-03-16 22:45:25 +01:00
2015-06-03 19:55:48 +02:00
$gateways = [
['name' => 'BeanStream', 'provider' => 'BeanStream', 'payment_library_id' => 2],
['name' => 'Psigate', 'provider' => 'Psigate', 'payment_library_id' => 2],
['name' => 'moolah', 'provider' => 'AuthorizeNet_AIM', 'sort_order' => 1, 'recommended' => 1, 'site_url' => 'https://invoiceninja.mymoolah.com/', 'payment_library_id' => 1],
['name' => 'Alipay', 'provider' => 'Alipay_Express', 'payment_library_id' => 1],
['name' => 'Buckaroo', 'provider' => 'Buckaroo_CreditCard', 'payment_library_id' => 1],
['name' => 'Coinbase', 'provider' => 'Coinbase', 'payment_library_id' => 1],
['name' => 'DataCash', 'provider' => 'DataCash', 'payment_library_id' => 1],
2016-03-01 09:23:58 +01:00
['name' => 'Neteller', 'provider' => 'Neteller', 'payment_library_id' => 2],
2015-06-03 19:55:48 +02:00
['name' => 'Pacnet', 'provider' => 'Pacnet', 'payment_library_id' => 1],
['name' => 'PaymentSense', 'provider' => 'PaymentSense', 'payment_library_id' => 1],
['name' => 'Realex', 'provider' => 'Realex_Remote', 'payment_library_id' => 1],
['name' => 'Sisow', 'provider' => 'Sisow', 'payment_library_id' => 1],
['name' => 'Skrill', 'provider' => 'Skrill', 'payment_library_id' => 1],
2015-04-15 18:35:41 +02:00
['name' => 'BitPay', 'provider' => 'BitPay', 'payment_library_id' => 1],
2015-05-31 14:37:29 +02:00
['name' => 'Dwolla', 'provider' => 'Dwolla', 'payment_library_id' => 1],
2015-09-20 23:05:02 +02:00
['name' => 'Eway Rapid', 'provider' => 'Eway_RapidShared', 'payment_library_id' => 1],
2015-11-04 19:13:15 +01:00
['name' => 'AGMS', 'provider' => 'Agms', 'payment_library_id' => 1],
['name' => 'Barclays', 'provider' => 'BarclaysEpdq\Essential', 'payment_library_id' => 1],
['name' => 'Cardgate', 'provider' => 'Cardgate', 'payment_library_id' => 1],
['name' => 'Checkout.com', 'provider' => 'CheckoutCom', 'payment_library_id' => 1],
['name' => 'Creditcall', 'provider' => 'Creditcall', 'payment_library_id' => 1],
['name' => 'Cybersource', 'provider' => 'Cybersource', 'payment_library_id' => 1],
['name' => 'ecoPayz', 'provider' => 'Ecopayz', 'payment_library_id' => 1],
['name' => 'Fasapay', 'provider' => 'Fasapay', 'payment_library_id' => 1],
['name' => 'Komoju', 'provider' => 'Komoju', 'payment_library_id' => 1],
['name' => 'Multicards', 'provider' => 'Multicards', 'payment_library_id' => 1],
['name' => 'Pagar.Me', 'provider' => 'Pagarme', 'payment_library_id' => 1],
['name' => 'Paysafecard', 'provider' => 'Paysafecard', 'payment_library_id' => 1],
['name' => 'Paytrace', 'provider' => 'Paytrace_CreditCard', 'payment_library_id' => 1],
['name' => 'Secure Trading', 'provider' => 'SecureTrading', 'payment_library_id' => 1],
['name' => 'SecPay', 'provider' => 'SecPay', 'payment_library_id' => 1],
['name' => 'WeChat Express', 'provider' => 'WeChat_Express', 'payment_library_id' => 1],
['name' => 'WePay', 'provider' => 'WePay', 'payment_library_id' => 1],
2016-04-27 01:59:52 +02:00
['name' => 'Braintree', 'provider' => 'Braintree', 'payment_library_id' => 1],
2015-06-03 19:55:48 +02:00
];
foreach ($gateways as $gateway) {
2015-09-20 23:05:02 +02:00
$record = Gateway::where('name', '=', $gateway['name'])->first();
if ($record) {
$record->provider = $gateway['provider'];
$record->save();
} else {
2015-06-03 19:55:48 +02:00
Gateway::create($gateway);
}
}
2015-03-16 22:45:25 +01:00
2015-06-07 10:05:30 +02:00
}
2015-06-03 19:55:48 +02:00
}