2014-03-21 13:16:37 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class PaymentLibrariesSeeder extends Seeder
|
|
|
|
{
|
|
|
|
|
|
|
|
public function run()
|
|
|
|
{
|
2014-04-13 07:28:16 +02:00
|
|
|
Eloquent::unguard();
|
|
|
|
|
2014-03-21 13:16:37 +01:00
|
|
|
$gateways = [
|
2014-03-26 01:59:33 +01:00
|
|
|
array('name'=>'BeanStream', 'provider'=>'BeanStream', 'payment_library_id' => 2),
|
2014-04-10 19:39:23 +02:00
|
|
|
array('name'=>'Psigate', 'provider'=>'Psigate', 'payment_library_id' => 2)
|
2014-03-21 13:16:37 +01:00
|
|
|
];
|
2014-03-26 01:59:33 +01:00
|
|
|
|
2014-10-05 15:07:04 +02:00
|
|
|
foreach ($gateways as $gateway)
|
|
|
|
{
|
|
|
|
Gateway::create($gateway);
|
|
|
|
}
|
|
|
|
|
2014-10-05 23:00:42 +02:00
|
|
|
// check that moolah exists
|
|
|
|
if (!DB::table('gateways')->where('name', '=', 'moolah')->get()) {
|
|
|
|
DB::table('gateways')->update(['recommended' => 0]);
|
2014-10-20 18:14:59 +02:00
|
|
|
Gateway::create(array(
|
2014-10-05 23:00:42 +02:00
|
|
|
'name' => 'moolah',
|
|
|
|
'provider' => 'AuthorizeNet_AIM',
|
|
|
|
'sort_order' => 1,
|
|
|
|
'recommended' => 1,
|
|
|
|
'site_url' => 'https://invoiceninja.mymoolah.com/',
|
|
|
|
'payment_library_id' => 1
|
2014-10-20 18:14:59 +02:00
|
|
|
));
|
2014-10-05 23:00:42 +02:00
|
|
|
}
|
2014-10-05 15:07:04 +02:00
|
|
|
|
|
|
|
/*
|
2014-03-26 01:59:33 +01:00
|
|
|
$updateProviders = array(
|
|
|
|
0 => 'AuthorizeNet_AIM',
|
2014-04-23 14:47:44 +02:00
|
|
|
//1 => 'BeanStream',
|
|
|
|
//2 => 'iTransact',
|
|
|
|
//3 => 'FirstData_Connect',
|
2014-03-26 01:59:33 +01:00
|
|
|
4 => 'PayPal_Pro',
|
|
|
|
5 => 'TwoCheckout'
|
|
|
|
);
|
2014-03-21 13:16:37 +01:00
|
|
|
|
2014-03-26 01:59:33 +01:00
|
|
|
Gateway::whereIn('provider', $updateProviders)->update(array('recommended' => 1));
|
|
|
|
|
2014-04-23 14:47:44 +02:00
|
|
|
Gateway::where('provider', '=', 'AuthorizeNet_AIM')->update(array('sort_order' => 5, 'site_url' => 'http://reseller.authorize.net/application/?id=5560364'));
|
|
|
|
//Gateway::where('provider', '=', 'BeanStream')->update(array('sort_order' => 10, 'site_url' => 'http://www.beanstream.com/'));
|
|
|
|
//Gateway::where('provider', '=', 'FirstData_Connect')->update(array('sort_order' => 20, 'site_url' => 'https://www.firstdata.com/'));
|
2014-03-26 01:59:33 +01:00
|
|
|
Gateway::where('provider', '=', 'PayPal_Pro')->update(array('sort_order' => 25, 'site_url' => 'https://www.paypal.com/'));
|
2014-04-23 14:47:44 +02:00
|
|
|
Gateway::where('provider', '=', 'TwoCheckout')->update(array('sort_order' => 30, 'site_url' => 'https://www.2checkout.com/referral?r=2c37ac2298'));
|
2014-10-05 15:07:04 +02:00
|
|
|
*/
|
|
|
|
|
2014-03-21 13:16:37 +01:00
|
|
|
}
|
2014-10-20 18:14:59 +02:00
|
|
|
}
|