G2A Pay Module Not Working #3290

Closed
djeby opened this Issue Sep 1, 2015 · 23 comments

Projects

None yet

6 participants

@djeby
djeby commented Sep 1, 2015

Hi guys,
The G2A Pay Module is not working on VAT zones. Without the vat, it works, but if i setup VAT zones, the module does not work anymore. I get this message:

"Some order parameters are wrong"

What can be done?

c7db1426-50bd-11e5-9c35-0f955f168431

@danielkerr danielkerr closed this Sep 2, 2015
@djeby
djeby commented Sep 2, 2015

Why did you close the dispute?

@hotwer
hotwer commented Sep 2, 2015

You should talk with your third party maker of this module.

@djeby
djeby commented Sep 2, 2015

It isn't a third party i guess. It was in opencart directly.
On Sep 2, 2015 2:46 PM, "Bernardo Araujo" notifications@github.com wrote:

You should talk with your third party maker of this module.


Reply to this email directly or view it on GitHub
#3290 (comment).

@hotwer
hotwer commented Sep 2, 2015

Sorry, my bad... I should have checked first

@djeby
djeby commented Sep 2, 2015

No problem. :)

On Wed, Sep 2, 2015 at 3:06 PM, Bernardo Araujo notifications@github.com
wrote:

Sorry, my bad... I should have checked first


Reply to this email directly or view it on GitHub
#3290 (comment).

@danielkerr danielkerr reopened this Sep 2, 2015
@chris-wm
Contributor
chris-wm commented Sep 2, 2015

Hi djeby,
I built most of the G2A system for OpenCart, can you tell me your exact process to arrive at the issue? Are you using a default Opencart with the default VAT zones etc?
Regards

@djeby
djeby commented Sep 2, 2015

It is default opencart 2.0.3.1 with a template. I have made the vat zones
from a tutorial online that showed step by step how to make them.

The error appears when i am logged in and or a guest checksout from one of
the vat regions. G2A support told me it has something to do with the vat,
that is how i know it is the vat issue. I disabled the vat zones and it
works. But i really need to have vat zones on my site.
On Sep 2, 2015 6:33 PM, "chris-wm" notifications@github.com wrote:

Hi djeby,
I built most of the G2A system for OpenCart, can you tell me your exact
process to arrive at the issue? Are you using a default Opencart with the
default VAT zones etc?
Regards


Reply to this email directly or view it on GitHub
#3290 (comment).

@chris-wm
Contributor
chris-wm commented Sep 2, 2015

Do you have any third party modules installed apart from the theme? When you say VAT zones do you mean Geo zones that you have then set a tax rate to and set in G2A payment admin? Also what is your process to disabling the VAT Zone?
Regards

@djeby
djeby commented Sep 2, 2015

I do not have any 3rd party module besides the theme. Yes, geo zones then
set in g2a admin. I disable the geo zones for a specific type of users and
for that specific user class it worked. For the ones that had geo zones
active, it does not work.
On Sep 2, 2015 6:59 PM, "chris-wm" notifications@github.com wrote:

Do you have any third party modules installed apart from the theme? When
you say VAT zones do you mean Geo zones that you have then set a tax rate
to and set in G2A payment admin? Also what is your process to disabling the
VAT Zone?
Regards


Reply to this email directly or view it on GitHub
#3290 (comment).

@chris-wm
Contributor
chris-wm commented Sep 2, 2015

I am struggling to replicate the issue, did G2A provide anything more specific about what was causing the problem?
Regards

@djeby
djeby commented Sep 2, 2015

No, that is all they said. Do you need login details to my site? Maybe that
would be easier? Or create an account on gamerobo.com and try to pay with
g2a. That would replicate it.
On Sep 2, 2015 7:13 PM, "chris-wm" notifications@github.com wrote:

I am struggling to replicate the issue, did G2A provide anything more
specific about what was causing the problem?
Regards


Reply to this email directly or view it on GitHub
#3290 (comment).

@msterrek
msterrek commented Sep 2, 2015

Hi,

I got exactly the same problem.
Also when i go to products/details/taxesgroup (bad translated)
and choose none. then the g2a pay works again.
otherwise i get some order parameters are are wrong.

Kind regards,

@chris-wm
Contributor
chris-wm commented Sep 2, 2015

Hi msterrek,
can you tell me your process to arrive at the error, are you using the default zones or have you created your own?
Regards

@msterrek
msterrek commented Sep 2, 2015

Hi,

i made my own Geo zone for holland and belgium
because there were no geo zones when i installed opencart 2.0.3.1

Kind regards

@chris-wm
Contributor
chris-wm commented Sep 3, 2015

Hi djeby,
it would probably be helpful to be able to see how you've set up your geo zones, if you are OK with supplying your login details for me to look at your set-up can you contact info@welfordmedia.co.uk with subject FAO Chris,
regards

@msterrek
msterrek commented Sep 3, 2015

Hi,

@chris-wm If you got a fix or a update could you may post it here ?

Kind regards,

@chris-wm
Contributor
chris-wm commented Sep 3, 2015

Hi msterrek,
yes I would post any solution on here,
regards

@djeby
djeby commented Sep 4, 2015

@chris-wm I have sent you an email with the login details for the G2A Pay module fix.

@msterrek
msterrek commented Sep 9, 2015

Hi, is there any progress ?

@chris-wm
Contributor

@msterrek Hi, I have found a resolution for this problem. If you replace line 34 in file catalog\controller\payment\g2apay.php

code to replace
$item->amount = $order_data['totals'][$i]['value'];

code to replace with
$item->amount = number_format($order_data['totals'][$i]['value'], 2);

I have also submitted a pull request to the main repository with this resolution that should be merged shortly,
regards

@jamesallsup jamesallsup pushed a commit that closed this issue Sep 10, 2015
@chris-wm chris-wm Fixes #3290 Item amount was to three decimal places whereas order tot…
…al was to two decimal places, under certain conditions this meant items total was different to order total causing error on G2A
5671b13
@craigbaines

im still getting this issue, even after the update can anyone help me please?

my skype is craig_b3

@craigbaines

strange, i dont know if this is new/ updated by g2a or what but it seems like the required fields id, url and price for the products are missing in the call.

Iv'e edited:

    foreach ($ordered_products as $product) {


        $item = new stdClass();
        $item->sku = $product['product_id'];
        $item->name = $product['name'];
        $item->amount = $product['price'] * $product['quantity'];
        $item->qty = $product['quantity'];
        $items[] = $item;
    }

From the controller an changed it to:

    foreach ($ordered_products as $product) {


        $item = new stdClass();
        $item->sku = $product['product_id'];
        $item->name = $product['name'];
        $item->amount = $product['price'] * $product['quantity'];
        $item->price = number_format($product['price'], 2);
        $item->id = $product['model'];
        $item->url = "http://siteurl.co.uk/index.php?route=product/product&product_id=".$product['product_id'];
        $item->qty = $product['quantity'];
        $items[] = $item;
    }

Seemes to get rid of the error anyway, someone feel free to tell me if im wrong. Thanks

@chris-wm
Contributor

@craigbaines Hi, we actually received an email yesterday from G2A telling us that they wished to update their OpenCart gateway, it appears that they have updated their payment system so that the current OpenCart implementation is incompatible. They sent me a patch that looks similar to yours but with a few extra bits, I cannot vouch for it's quality but we will be releasing a bug fix version of OpenCart with the official release at some point soon. You can find the patch they sent me here https://drive.google.com/file/d/0B0thHgBjXmj_cUZSeGU1VU9JRHM/view?usp=sharing,
regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment