1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/database/seeds/PaymentLibrariesSeeder.php

94 lines
5.2 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 = [
2016-10-06 15:48:42 +02:00
['name' => 'Authorize.Net AIM', 'provider' => 'AuthorizeNet_AIM', 'sort_order' => 4],
['name' => 'Authorize.Net SIM', 'provider' => 'AuthorizeNet_SIM', 'payment_library_id' => 2],
['name' => 'CardSave', 'provider' => 'CardSave'],
['name' => 'Eway Rapid', 'provider' => 'Eway_RapidShared', 'is_offsite' => true],
['name' => 'FirstData Connect', 'provider' => 'FirstData_Connect'],
['name' => 'GoCardless', 'provider' => 'GoCardless', 'is_offsite' => true],
['name' => 'Migs ThreeParty', 'provider' => 'Migs_ThreeParty'],
['name' => 'Migs TwoParty', 'provider' => 'Migs_TwoParty'],
['name' => 'Mollie', 'provider' => 'Mollie', 'is_offsite' => true, 'sort_order' => 7],
['name' => 'MultiSafepay', 'provider' => 'MultiSafepay'],
['name' => 'Netaxept', 'provider' => 'Netaxept'],
['name' => 'NetBanx', 'provider' => 'NetBanx'],
['name' => 'PayFast', 'provider' => 'PayFast', 'is_offsite' => true],
['name' => 'Payflow Pro', 'provider' => 'Payflow_Pro'],
['name' => 'PaymentExpress PxPay', 'provider' => 'PaymentExpress_PxPay'],
['name' => 'PaymentExpress PxPost', 'provider' => 'PaymentExpress_PxPost'],
['name' => 'PayPal Express', 'provider' => 'PayPal_Express', 'is_offsite' => true, 'sort_order' => 3],
['name' => 'PayPal Pro', 'provider' => 'PayPal_Pro'],
['name' => 'Pin', 'provider' => 'Pin'],
['name' => 'SagePay Direct', 'provider' => 'SagePay_Direct'],
['name' => 'SagePay Server', 'provider' => 'SagePay_Server'],
['name' => 'SecurePay DirectPost', 'provider' => 'SecurePay_DirectPost'],
['name' => 'Stripe', 'provider' => 'Stripe', 'sort_order' => 1],
['name' => 'TargetPay Direct eBanking', 'provider' => 'TargetPay_Directebanking'],
['name' => 'TargetPay Ideal', 'provider' => 'TargetPay_Ideal'],
['name' => 'TargetPay Mr Cash', 'provider' => 'TargetPay_Mrcash'],
['name' => 'TwoCheckout', 'provider' => 'TwoCheckout', 'is_offsite' => true],
['name' => 'WorldPay', 'provider' => 'WorldPay'],
2015-06-03 19:55:48 +02:00
['name' => 'BeanStream', 'provider' => 'BeanStream', 'payment_library_id' => 2],
['name' => 'Psigate', 'provider' => 'Psigate', 'payment_library_id' => 2],
2016-06-09 09:56:22 +02:00
['name' => 'moolah', 'provider' => 'AuthorizeNet_AIM'],
2016-10-06 15:43:11 +02:00
['name' => 'Alipay', 'provider' => 'Alipay_Express'],
2016-06-09 09:56:22 +02:00
['name' => 'Buckaroo', 'provider' => 'Buckaroo_CreditCard'],
['name' => 'Coinbase', 'provider' => 'Coinbase'],
['name' => 'DataCash', 'provider' => 'DataCash'],
2016-03-01 09:23:58 +01:00
['name' => 'Neteller', 'provider' => 'Neteller', 'payment_library_id' => 2],
2016-06-09 09:56:22 +02:00
['name' => 'Pacnet', 'provider' => 'Pacnet'],
['name' => 'PaymentSense', 'provider' => 'PaymentSense'],
['name' => 'Realex', 'provider' => 'Realex_Remote'],
['name' => 'Sisow', 'provider' => 'Sisow'],
['name' => 'Skrill', 'provider' => 'Skrill'],
2016-10-06 15:48:42 +02:00
['name' => 'BitPay', 'provider' => 'BitPay', 'is_offsite' => true, 'sort_order' => 6],
['name' => 'Dwolla', 'provider' => 'Dwolla', 'is_offsite' => true, 'sort_order' => 5],
2016-06-09 09:56:22 +02:00
['name' => 'AGMS', 'provider' => 'Agms'],
['name' => 'Barclays', 'provider' => 'BarclaysEpdq\Essential'],
['name' => 'Cardgate', 'provider' => 'Cardgate'],
['name' => 'Checkout.com', 'provider' => 'CheckoutCom'],
['name' => 'Creditcall', 'provider' => 'Creditcall'],
['name' => 'Cybersource', 'provider' => 'Cybersource'],
['name' => 'ecoPayz', 'provider' => 'Ecopayz'],
['name' => 'Fasapay', 'provider' => 'Fasapay'],
['name' => 'Komoju', 'provider' => 'Komoju'],
['name' => 'Multicards', 'provider' => 'Multicards'],
['name' => 'Pagar.Me', 'provider' => 'Pagarme'],
['name' => 'Paysafecard', 'provider' => 'Paysafecard'],
['name' => 'Paytrace', 'provider' => 'Paytrace_CreditCard'],
['name' => 'Secure Trading', 'provider' => 'SecureTrading'],
['name' => 'SecPay', 'provider' => 'SecPay'],
['name' => 'WeChat Express', 'provider' => 'WeChat_Express'],
2016-06-21 18:10:22 +02:00
['name' => 'WePay', 'provider' => 'WePay', 'is_offsite' => false],
2016-09-26 11:33:30 +02:00
['name' => 'Braintree', 'provider' => 'Braintree', 'sort_order' => 2],
2016-10-06 15:48:42 +02:00
['name' => 'Custom', 'provider' => 'Custom', 'is_offsite' => true, 'sort_order' => 8],
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) {
2016-09-26 11:33:30 +02:00
$record->fill($gateway);
2015-09-20 23:05:02 +02:00
$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
}