Block doesn't work correctly

Permalink Browser Info Environment
This block does not currently work. Following countless discussions with eWay Australia's integration team, I have been left with a block that can't connect with the eWay system.

I have received 2 other emails from other Concrete5 users who have followed the same process with eWay with no luck.

After early contact with the developer we did not get any further.

If you are the developer, I apologise for leaving negative feedback and will happily edit this post if integration becomes possible in the future.

Until this is resolved, buyers please beware, this block is not currently working with eWay's current setup.

Richard.

Type: Discussion
Status: New
mobius2000
View Replies: View Best Answer
mesuva replied on at Permalink Reply
mesuva
Hi Richard,

I've downloaded and installed this plugin (had to modify it to get it to install to 5.5.1).

As you've experienced, I had trouble getting it to work, but this morning I found a solution. I checked out the example code from eway and noticed there was a particular line of code they used that wasn't in the plugin.

In /packages/core_commerce_eway/libraries/EwayPaymentLive.php
I added in at line 60:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);


(it just put it before the other lines that look similar, should be obvious).

From this, I was able to get test transactions to complete as expected.
mobius2000 replied on at Permalink Reply
mobius2000
Hi Mesuva,

Thank you very much for the assistance... I made the changes you recommended but I still get the "not a valid eWay customer ID" error.

Just out of curiosity, what eWay settings to you have in the eCommerce payments side?

I currently have:
E-Way API Login ID: 1202****
E-Way API: XML API
Gateway Mode: Real Time with CVN
Live Transactions: Enabled

Any help would be greatly appreciated.

Richard.
mesuva replied on at Permalink Reply 1 Attachment
mesuva
As I said, I've only tested this with test transactions so far.

See attached screenshot for my settings. It's just the testing login id supplied by eway, as per:http://www.eway.com.au/Developer/Testing/...

I get valid response codes (based on the number of cents in the transaction) with both 'Real Time' and 'Real Time with CVN'. For testing you have to use the test credit card number supplied.

If I purposely change the login id to something else (not the test id), it will return that 'not a valid eWay customer ID' error.

So if I were you, I'd test to see if I could get test transactions to happen. Then if you still get the not a valid eWay customer ID error, I'd be checking the number itself with eway.
spencerfeng replied on at Permalink Reply
spencerfeng
Hi mesuva,

Where can I see the response code? After the transaction finishes, I do not see the code.

Thanks
Spencer
mesuva replied on at Permalink Reply
mesuva
You won't see the direct response codes unless you echo them out.

But what you should see are different error messages or it successfully processing the transaction. In testing mode, if you use different cent values in the transaction, you'll force it to return different error codes.
spencerfeng replied on at Permalink Reply
spencerfeng
Hi mesuva,

Thank you very much. My configuration now works with the test api id.

I really appreciate your help.

Cheers
Spencer
spencerfeng replied on at Permalink Reply
spencerfeng
Hi Mesuva,

I am trying to install eWay add-on on Concrete5 5.5.1, but I got the following error message during the installation:

Catchable fatal error: Object of class CoreCommerceEwayPackage could not be converted to string in /home/public_html/dev-winter design/concrete/libraries/3rdparty/adodb/adodb.inc.php on line 978

Do you what modifications I have to make to make it work in 5.5.1.

Thank you very much.
Spencer
mesuva replied on at Permalink Reply
mesuva
I changed in /packages/core_commerce_eway/controller.php

CoreCommercePaymentMethod::add('eway', 'E-Way Payment Gateway', false, $pkg);

to
CoreCommercePaymentMethod::add('eway', 'E-Way Payment Gateway', false, NULL, $pkg);


At least, I'm pretty sure that's what I did.

Besides this install problem, it appears to work correctly with 5.5.x and the lastest version of ecommerce (with the other fixes above applied).
spencerfeng replied on at Permalink Reply
spencerfeng
Hi Mesuva,

Thank you very much. It works :)

I really appreciate your help!

Spencer
polinet replied on at Permalink Reply
polinet
Hi,

I have had this block work in test mode from day one but have only now discovered that it does not work in LIVE mode (neither shared nor XML). If anyone here gets it to work in LIVE mode please do share your updates with the community.

PS I have applied the changes noted here with no effect.
mesuva replied on at Permalink Reply
mesuva
I wasn't able to get the test mode to work properly until I applied the changes I suggested above.

When you put it in live mode and try and put through a transaction, what error do you get?
polinet replied on at Permalink Best Answer Reply
polinet
After a day of painful debugging (php not being my personal programming language of choice) I finally managed to get the module to work (to the disgrace of the original developer who obviously never bothered to test his product with a live transaction).

The change required to get it to work in live move (it will still work in test mode) is in file /packages/core_commerce_eway/models/core_commerce/payment/methods/eway/controller.php

line 47
change
$pkg->config('PAYMENT_METHOD_EWAY_TEST') );

to
$pkg->config('PAYMENT_METHOD_EWAY_LIVE') );


There is NO such entry in the db called PAYMENT_METHOD_EWAY_TEST, it is called PAYMENT_METHOD_EWAY_LIVE!

Because of this bug you will find that the test mode works (test mode is default) but live mode does not. After applying the fix the config variable of test/live mode is correctly applied from the database.
mesuva replied on at Permalink Reply
mesuva
Amazing stuff, well done! This was something I would have had to debug myself in the next week and you've saved me a lot of trouble/pain.

GIVE THIS DUDE SOME KARMA! I also owe you a beer or three.

---------

It's amazing, since this plugin would NEVER have worked in a live scenario in the first place without that change, it was broken from the get-go.

It has been a bit disappointing that the original developer hasn't helped or responded to queries, but has still collected money for this (not much, but it's the principle). I'm happy to pay for something like this, even with the bugs, if the developer helps out in some way. I guess we don't know the story though, they could be sick/deceased, broke, etc, who knows...

My real concern with something like this and the marketplace is that I can't really rewrite this plugin myself as there is pretty much only one way to write it. The developer has simply used the code supplied by eway and wrapped in with concrete5 plugin code... (don't get me wrong, still a ton of custom work), so it's almost impossible to release a _working_ plugin in the marketplace without stepping on someone's toes licensing wise.

So to the original developer - since it appears you are not supporting this plugin anymore, I would kindly ask that you either:
- Apply the fixes listed above and update the plugin in the marketplace. Once I've finished testing, I could even send you a zip to do this.
or
- Change the licence for it and put it somewhere like github. Then we can have access to a complete version with all the above bug fixes applied, and someone can simply add it to the marketplace as a free item.

Concrete5 team, can you assist in some way here?
julia replied on at Permalink Reply
julia
mesuva - I emailed the developer about this and gave you some karma for your effort here.
julia replied on at Permalink Reply
julia
Gold Star badge for you polinet. Thanks a bunch!
mesuva replied on at Permalink Reply
mesuva
Further to this, I found that although with this change it does find the correct value from the config, it evaluates this setting as text, so 'false' still ends up being true. For me at least it meant it was then stuck in live mode and putting it back to testing mode had no affect.

In the same controller.php file I had to change lines 45-47 to:

$eway = new $eWayClass( $pkg->config('PAYMENT_METHOD_EWAY_API_LOGIN'),
                        $pkg->config('PAYMENT_METHOD_EWAY_MODE'),
                        $pkg->config('PAYMENT_METHOD_EWAY_LIVE') == 'true');


Then it actually creates the $eway object with a proper boolean and puts it into testing or live mode.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.