Google Checkout Plugin Bug

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
a.m. wrote:
I'm trying to reproduce this issue but just can't do it. What Google API are you using (Google merchant center > settings > API version)? Could you also please send me your complete XML request from Google (Google merchant center > tools > Integration Console) so I can debug it?

BTW, have a look at the following topic https://www.nopcommerce.com/boards/t/11134/google-checkout-nop200.aspx


Hi Andrei,

So I now have the GC plugin log working. It wasn't before because of this

if (!_settingService.GetSettingByKey<bool>("googlecheckoutpaymentsettings.logfileenabled"))
return;

There is no such setting.

Now I have the log I can PM you the XML of an order that fails to be added to nop system.

I think the bug is to do with the region value. If the first 2 letters of an British region match those of a US state code we seem to get the error.

var billingStateProvince = _stateProvinceService.GetStateProvinceByAbbreviation(newOrderNotification.buyerbillingaddress.region.Trim());


What do you think?

Darren
13 years ago
Thanks for info. I'll have a look at it in the near time
13 years ago
wunpac wrote:
I think the bug is to do with the region value. If the first 2 letters of an British region match those of a US state code we seem to get the error.

No. I've just tested it with the sample file you provided. Everything works fine.
1. We do not get the first two letters of provided region. We pass the entire value
2. Right now order placement workflow does not validate whether state/province is in the chosen country. So it cannot be the reason of this issue.
13 years ago
a.m. wrote:
I think the bug is to do with the region value. If the first 2 letters of an British region match those of a US state code we seem to get the error.
No. I've just tested it with the sample file you provided. Everything works fine.
1. We do not get the first two letters of provided region. We pass the entire value
2. Right now order placement workflow does not validate whether state/province is in the chosen country. So it cannot be the reason of this issue.


How did you test with just the XML? Maybe I can debug better if I know how to do this.

Darren
13 years ago
Have a look at \Plugins\Nop.Plugin.Payments.GoogleCheckout\Controllers\PaymentGoogleCheckoutController.cs file, NotificationHandler method. If "googlecheckoutpaymentsettings.debugmodeenabled" setting is set to "true" and an appropriate query parameter is provide, then files from \Plugins\Nop.Plugin.Payments.GoogleCheckout\Samples\ directory will be used.

So I updated \Plugins\Nop.Plugin.Payments.GoogleCheckout\Samples\sample-neworder.txt file with your one and tested it.
13 years ago
a.m. wrote:
Have a look at \Plugins\Nop.Plugin.Payments.GoogleCheckout\Controllers\PaymentGoogleCheckoutController.cs file, NotificationHandler method. If "googlecheckoutpaymentsettings.debugmodeenabled" setting is set to "true" and an appropriate query parameter is provide, then files from \Plugins\Nop.Plugin.Payments.GoogleCheckout\Samples\ directory will be used.

So I updated \Plugins\Nop.Plugin.Payments.GoogleCheckout\Samples\sample-neworder.txt file with your one and tested it.


So do you still need GC to make a payment notification and have the development machine IP address as the returnURL?

Or is there a way to test that doesn't involve setting up my firewall to accept port 80 traffic?
13 years ago
wunpac wrote:
So do you still need GC to make a payment notification and have the development machine IP address as the returnURL?

Or is there a way to test that doesn't involve setting up my firewall to accept port 80 traffic?

No. See my post above. You do not need GC or any additional firewall configuration. All you need is the dev machine.

1. Copy your XML to \Plugins\Nop.Plugin.Payments.GoogleCheckout\Samples\sample-neworder.txt file
2. Ensure that googlecheckoutpaymentsettings.debugmodeenabled setting exists and is set to true
3. Set a breakpoint into \Plugins\Nop.Plugin.Payments.GoogleCheckout\Controllers\PaymentGoogleCheckoutController.cs file, NotificationHandler method
4. Open http://your_local_ip_address:dev_port/Plugins/PaymentGoogleCheckout/NotificationHandler?nopCommerceTestNewOrder1=1
5. Debug the NotificationHandler() method step by step
13 years ago
Thanks Andrei.

I've tested the XML and it works for me also. I asked the customer to retry the order on the live site using GC. The same error appears in the log

Nop.Core.NopException: Shipping address is not provided at Nop.Services.Orders.OrderProcessingService.PlaceOrder(ProcessPaymentRequest processPaymentRequest) in c:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.50Official\Libraries\Nop.Services\Orders\OrderProcessingService.cs:line 632

Any ideas?

Darren
13 years ago
a.m. wrote:

No. I've just tested it with the sample file you provided. Everything works fine.


Where you logged in when you tested this? We've managed to recreate error by

using a new guest customer (so shipping address ID is not already set in customer table)
having the billing and shipping address identicle

Under these condition the shipping address ID is not set in the customer table
13 years ago
wunpac wrote:
We've managed to recreate error by...

Thanks a lot, Darren. I've also been able to replicate the error. So now I know where the reason of this issue is. I'll try to fix it in the near time
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.