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-03-25 20:56:31 +01:00
|
|
|
|
2015-03-16 22:45:25 +01:00
|
|
|
class PaymentLibrariesSeeder extends Seeder
|
|
|
|
{
|
|
|
|
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
Eloquent::unguard();
|
|
|
|
|
|
|
|
$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],
|
|
|
|
['name' => 'Neteller', 'provider' => 'Neteller', 'payment_library_id' => 1],
|
|
|
|
['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],
|
2015-04-15 18:35:41 +02:00
|
|
|
['name' => 'Skrill', 'provider' => 'Skrill', 'payment_library_id' => 1],
|
|
|
|
['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-03-16 22:45:25 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
foreach ($gateways as $gateway)
|
|
|
|
{
|
|
|
|
if (!DB::table('gateways')->where('name', '=', $gateway['name'])->get())
|
|
|
|
{
|
|
|
|
Gateway::create($gateway);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-10 10:45:03 +02:00
|
|
|
$paymentTerms = [
|
|
|
|
['num_days' => -1, 'name' => 'Net 0']
|
|
|
|
];
|
|
|
|
|
|
|
|
foreach ($paymentTerms as $paymentTerm)
|
|
|
|
{
|
|
|
|
if (!DB::table('payment_terms')->where('name', '=', $paymentTerm['name'])->get())
|
|
|
|
{
|
|
|
|
PaymentTerm::create($paymentTerm);
|
|
|
|
}
|
|
|
|
}
|
2015-03-16 22:45:25 +01:00
|
|
|
}
|
|
|
|
}
|