1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-15 23:52:33 +01:00
invoiceninja/app/database/seeds/PaymentLibrariesSeeder.php
Hillel Coren f28e536325 Bug fixes
2014-04-23 15:47:44 +03:00

37 lines
1.3 KiB
PHP

<?php
class PaymentLibrariesSeeder extends Seeder
{
public function run()
{
Eloquent::unguard();
$gateways = [
array('name'=>'BeanStream', 'provider'=>'BeanStream', 'payment_library_id' => 2),
array('name'=>'Psigate', 'provider'=>'Psigate', 'payment_library_id' => 2)
];
$updateProviders = array(
0 => 'AuthorizeNet_AIM',
//1 => 'BeanStream',
//2 => 'iTransact',
//3 => 'FirstData_Connect',
4 => 'PayPal_Pro',
5 => 'TwoCheckout'
);
foreach ($gateways as $gateway)
{
Gateway::create($gateway);
}
Gateway::whereIn('provider', $updateProviders)->update(array('recommended' => 1));
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/'));
Gateway::where('provider', '=', 'PayPal_Pro')->update(array('sort_order' => 25, 'site_url' => 'https://www.paypal.com/'));
Gateway::where('provider', '=', 'TwoCheckout')->update(array('sort_order' => 30, 'site_url' => 'https://www.2checkout.com/referral?r=2c37ac2298'));
}
}