Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller_Google_Checkout not populating Model_Vendo_Order_Google model #4

Open
powerspike opened this issue Jul 6, 2011 · 3 comments

Comments

@powerspike
Copy link

An error is thrown on line 60 ($order_data->update_google_id($google_id);) of the handle action of Controller_Google_Checkout.

The error is

ERROR: Database_Exception [ 1048 ]: Column 'order_id' cannot be null [ INSERT INTOorder_googles(id,order_id,google_order_id) VALUES ('', NULL, '<google_order_id here>') ] ~ MODPATH/database/classes/kohana/database/mysql.php [ 179 ]

And appears to be caused by the value for order_id not having previously been populated.

@zombor
Copy link
Member

zombor commented Jul 6, 2011

Is there an existing order row in the order_googles table? What should happen is there should be an existing row there with an existing order_id, then the callback updates that row with the google_order_id. The get_ancilary_model() method loads a order_google model with the order_id value. Perhaps that should bomb if the model isn't loaded.

@powerspike
Copy link
Author

No, a row isn't created in the order_googles table until save() is called by update_google_id().

Where in the first instance should the row on the order_googles table be created?

I'd've thought in the process action of controller_checkout (possibly within the try block starting on line 148), or in the process action of Vendo_Payment_Offsite_Google_Checkout.

@zombor
Copy link
Member

zombor commented Jul 7, 2011

Right, it should make it when the user initially completes their order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants