Whoops, looks like something went wrong. When upgrading from 2.5.2.2

Same deal, you’ll need to keep commenting out matching lines until it completes.

I believe the script failed to create a foreign causing it to partially complete, it’s now conflicting when re-running.

ok…

So I commented out one more line. From routing_number to currency_id in the up function in the two locations.

The new error I get when running the update manually.

SQLSTATE[42000]: Syntax error or access violation: 1072 Key column ‘currency_id’ doesn’t exist in table (SQL: alter table payment_methods add constraint payment_methods_currency_id_foreign foreign key (currency_id) references currencies (id))

cyberone

It looks like the currency_id further up the file wasn’t created.

If you took a backup before updating I’d suggest starting the upgrade over with our new release, otherwise you can try uncommenting the currency_id line.

ok …

That last comment out of currency_id seemed to do the trick.

It completed the manual update and I am in !!!

Thanks for your help and perseverance Hillel. I really do appreciate it…

Is there anything I will need to do for future updates ? or should all be good… ?

Cyberone

I’d suggest double checking the /payments page list loads correctly as well.

Our latest release should fix this problem.

Yes…

All works a treat…

Thank you very much Hillel…

You are a Super Mensch !!

Thanks for your efforts.

Cyberone

:slight_smile:

Hello

Sorry to be the bearer of bad news, but my customers are informing me that my stripe payment gateway is not working.

I went to Online Payments and tried to click on my stripe gateway or add a gateway and I get the following error:

Whoops, looks like something went wrong.

1/1
RuntimeException in GatewayFactory.php line 105:
Class ‘\Omnipay\Neteller\Gateway’ not found
in GatewayFactory.php line 105
at GatewayFactory->create(‘Neteller’)
at call_user_func_array(array(object(GatewayFactory), ‘create’), array(‘Neteller’)) in Omnipay.php line 103
at Omnipay::__callStatic(‘create’, array(‘Neteller’)) in Gateway.php line 177
at Omnipay::create(‘Neteller’) in Gateway.php line 177
at Gateway->getFields() in AccountGatewayController.php line 134
at AccountGatewayController->getViewModel() in AccountGatewayController.php line 96
at AccountGatewayController->create()
at call_user_func_array(array(object(AccountGatewayController), ‘create’), array()) in compiled.php line 9479
at Controller->callAction(‘create’, array()) in compiled.php line 9541
at ControllerDispatcher->call(object(AccountGatewayController), object(Route), ‘create’) in compiled.php line 9521
at ControllerDispatcher->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 10004
at Pipeline->then(object(Closure)) in compiled.php line 9522
at ControllerDispatcher->callWithinStack(object(AccountGatewayController), object(Route), object(Request), ‘create’) in compiled.php line 9509
at ControllerDispatcher->dispatch(object(Route), object(Request), ‘App\Http\Controllers\AccountGatewayController’, ‘create’) in compiled.php line 8579
at Route->runController(object(Request)) in compiled.php line 8566
at Route->run(object(Request)) in compiled.php line 8280
at Router->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request)) in PermissionsRequired.php line 52
at PermissionsRequired->handle(object(Request), object(Closure))
at call_user_func_array(array(object(PermissionsRequired), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Authenticate.php line 90
at Authenticate->handle(object(Request), object(Closure), ‘user’)
at call_user_func_array(array(object(Authenticate), ‘handle’), array(object(Request), object(Closure), ‘user’)) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 10004
at Pipeline->then(object(Closure)) in compiled.php line 8281
at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8272
at Router->dispatchToRoute(object(Request)) in compiled.php line 8262
at Router->dispatch(object(Request)) in compiled.php line 2419
at Kernel->Illuminate\Foundation\Http{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Debugbar.php line 49
at Debugbar->handle(object(Request), object(Closure))
at call_user_func_array(array(object(Debugbar), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in StartupCheck.php line 193
at StartupCheck->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartupCheck), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in QueryLogging.php line 28
at QueryLogging->handle(object(Request), object(Closure))
at call_user_func_array(array(object(QueryLogging), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in DuplicateSubmissionCheck.php line 41
at DuplicateSubmissionCheck->handle(object(Request), object(Closure))
at call_user_func_array(array(object(DuplicateSubmissionCheck), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 3225
at VerifyCsrfToken->handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 51
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 13517
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 12010
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 13256
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 13193
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in compiled.php line 3286
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), ‘handle’), array(object(Request), object(Closure))) in compiled.php line 10019
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 10004
at Pipeline->then(object(Closure)) in compiled.php line 2366
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2350
at Kernel->handle(object(Request)) in index.php line 52
Messages1TimelineExceptions1Views0RouteQueries7MailsSessionRequest229.07ms14.5MBGET gateways/create/{show_wepay?}

Thanks

Cyberone

You should be able to fix this by running the following SQL and then clearing the cache by adding ?clear_cache=true to the end of the URL.

update gateways set payment_library_id = 2 where id = 36;​

The Neteller gateway driver is no longer an active project, the migrations should have fixed this.

As usual Hillel…

YOUR THE MAN !!!

Thanks again for your help…

Cyberone

Hi Hillel.

I have customers reporting that they a getting different errors now when trying make a payment via the stripe gateway…

I am needing some more of your expertise …

Error enclosed below…

Stripe: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘last4’ in ‘field list’ (SQL: insert into payment_methods (user_id, account_id, public_id, contact_id, ip, account_gateway_token_id, source_reference, last4, expiration, payment_type_id, updated_at, created_at) values (1, 1, 1, 17, 144.138.36.171, 11, card_18r3jaJC5PVsrF8PJf4ZAIvz, 3016, 2017-11-01, 6, 2016-09-07 10:56:52, 2016-09-07 10:56:52))

Please send me the results of the following SQL queries:

describe payments;
describe payment_methods;

Generation Time: Sep 07, 2016 at 09:56 PM
Generated by: phpMyAdmin 4.0.10.14 / MySQL 5.6.31
SQL query: describe payments;
Rows: 28

Field Type Null Key Default Extra
id int(10) unsigned NO PRI NULL auto_increment
invoice_id int(10) unsigned NO MUL NULL
account_id int(10) unsigned NO MUL NULL
client_id int(10) unsigned NO MUL NULL
contact_id int(10) unsigned YES MUL NULL
invitation_id int(10) unsigned YES NULL
user_id int(10) unsigned YES MUL NULL
account_gateway_id int(10) unsigned YES MUL NULL
payment_type_id int(10) unsigned YES MUL NULL
created_at timestamp NO 0000-00-00 00:00:00
updated_at timestamp NO 0000-00-00 00:00:00
deleted_at timestamp YES NULL
is_deleted tinyint(1) NO 0
amount decimal(13,2) NO NULL
payment_date date YES NULL
transaction_reference varchar(255) YES NULL
payer_id varchar(255) YES NULL
public_id int(10) unsigned NO MUL NULL
refunded decimal(13,2) NO NULL
payment_status_id int(10) unsigned NO 4
routing_number int(10) unsigned YES NULL
last4 smallint(5) unsigned YES NULL
expiration date YES NULL
gateway_error text YES NULL
email varchar(255) YES NULL
payment_method_id int(10) unsigned YES NULL
bank_name varchar(255) YES NULL
ip varchar(255) YES NULL


Generation Time: Sep 07, 2016 at 09:58 PM
Generated by: phpMyAdmin 4.0.10.14 / MySQL 5.6.31
SQL query: describe payment_methods;
Rows: 14

Field Type Null Key Default Extra
id int(10) unsigned NO PRI NULL auto_increment
account_id int(10) unsigned NO MUL NULL
user_id int(10) unsigned NO MUL NULL
contact_id int(10) unsigned YES MUL NULL
account_gateway_token_id int(10) unsigned NO MUL NULL
payment_type_id int(10) unsigned NO MUL NULL
source_reference varchar(255) NO NULL
status varchar(255) YES NULL
created_at timestamp YES NULL
updated_at timestamp YES NULL
deleted_at timestamp YES NULL
public_id int(10) unsigned NO MUL NULL
bank_name varchar(255) YES NULL
ip varchar(255) YES NULL

thanks

Some fields are missing, probably due to the partially failed migration.

Run the following command from the root folder of the code

php artisan tinker

And then paste/run the following

Schema::table(‘payment_methods’, function($table) {
$table->unsignedInteger(‘routing_number’)->nullable();
$table->smallInteger(‘last4’)->unsigned()->nullable();
$table->date(‘expiration’)->nullable();
$table->string(‘email’)->nullable();
$table->unsignedInteger(‘currency_id’)->nullable();
});

Sorry about the delay…

When running the above I get the following error.

PHP error: Use of undefined constant ‘payment_methods’ - assumed ‘‘payment_methods’’ on line 1

Thanks

cyberone

I think the quotes are messed up from the forum, try with this:

Schema::table('payment_methods', function($table) {
$table->unsignedInteger('routing_number')->nullable();
$table->smallInteger('last4')->unsigned()->nullable();
$table->date('expiration')->nullable();
$table->string('email')->nullable();
$table->unsignedInteger('currency_id')->nullable();
});

Thank you very much Hillel…

That seemed to fix the problem…

Thanks again.

Cyberone