Moneris eSelect Plugin not working?

  • Posts: 47
  • Thank you received: 0
10 years 1 month ago #149918

I think I may have found an issue:

When I went to create a new payment method, take a look at the attached screenshot. Notice how on the moneris eselect payment method that USD is disabled? I can't seem to enable that and am not sure where I make that change. Both CAD and USD currencies are enabled in the currency menu, so not sure where else this needs to be changed.


Attachments:
Last edit: 10 years 1 month ago by ben_whitney.

Please Log in or Create an account to join the conversation.

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
10 years 1 month ago #149978

Hi,

Yes, the eSelect plugin is not available for the USD currency. That's because the eSelect payment gateway doesn't support that currency and thus it is blocked by the plugin so that it doesn't generate an error when going to the payment gateway.
You can unblock that by editing the file plugins/hikashoppayment/eselect/eselect.php and changing the line:
var $accepted_currencies = array( 'CAD' );

but if the payment gateway doesn't support the USD, it won't help as it will just display the same amount but in USD instead of displaying it in CAD which is not what you want.

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 1 month ago #150033

Finally some progress!

I actually have two separate merchant accounts with moneris: one for USD and another for CAD currencies.

So if I change the line from:
var $accepted_currencies = array( 'CAD' );
to
var $accepted_currencies = array( 'USD' );

It will force the plugin to work in USD (assuming of course the merchant account is setup for USD).

Ideally it would be nice if I could get both currencies working with their respective merchant account, but if it keeps it simpler I'll have my US and international customers pay in USD and have my Canadian customers call in so I can process their cards manually in CAD currency over the phone.

If I add the line:

var $accepted_currencies = array( 'CAD' );
var $accepted_currencies = array( 'USD' );

Will the plugin work with both currencies? Or should I stick to the method described above?

Last edit: 10 years 1 month ago by ben_whitney.

Please Log in or Create an account to join the conversation.

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
10 years 1 month ago #150055

The use that line instead:
var $accepted_currencies = array( 'CAD','USD' );
That way the plugin will work for both. But you will have to create two payment methods out of this plugin and restrict each one to the currency you want with the currency restriction option that you can see when yo create them.

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 3 weeks ago #151595

OK.

Starting to get somewhere... I'm now able to get through the checkout process, but get hung up at the end. Clicking on the "Finish" button, appears to go no-where.

I'm sure that my StoreID and API are set correctly. Moneris also issues an hpkey too, so I'm not sure if that needs to be used for my API or if it's the actual API key that I use instead.

Also, what do my return and cancel URL's need to be set to?

Thanks,

Ben

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 3 weeks ago #151747

Forgot to mention, when I turned on the debug system, I was able to see the following error:

Notice: Undefined variable: xmlString in /home/brokenp3/public_html/badassjeeps.com/plugins/hikashoppayment/eselect/eselect_lib.php on line 702

I was using the production server in this test, but will set this up again using the demo server as the debug system will display the API key in plain text (not good!). Does that error give you any ideas?

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 3 weeks ago #151830

Hi,

The file "eselect_lib" comes from the eSelect development lib.

The error is not really an error, it is a simple warning.
The lib is not quite well coded and the variable $xmlString is "used" before be initialized correctly.
But PHP understand that the variable does not exist and create it before to add some text into it.
That's why it is just an warning because it does not impact the rest of the process, but in development production, it is interesting for the developers to know that a variable is not well initialized because it can introduced a non wanted bug (like you put some content in the wrong spelled variable).

Would it be possible to have more details about the page and the content into ?
You said that you see the API key in plain text, but the fact is that this API key is never displayed but send to the server using cURL.
Do you have cURL right activated in your server ?
Does the API key displayed because your cURL display something in your website ?

We will require more details and more information to understand the source of the problem and help you to fix it.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 3 weeks ago #151894

The API key is viewable only when I enable the Debug system within Joomla (3.2.x). I am also fairly certain that I have CURL enabled on that server, but I will double check this with my host. I think what I will do for testing purposes is setup a demo server with moneris so that I don't have to use my production API. I'll get that done this afternoon.

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 2 weeks ago #152299

Hi,

The problem is that, our plugin or the lib does not display the content of the XML sent to eSelect Moneris.
The plugin have a "debug" option to say that the plugin running in "test mode" and not in "production mode".
For the rest of that, I do not see any "echo" or code which will display the XML in the page.

Would it be possible to have the extra details about your configuration ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 2 weeks ago #152348

Jerome,

My server setup is below:

PHP Version 5.4.25
Web Server Apache
cURL support enabled
cURL Information 7.24.0

Joomla! Version Joomla! 3.2.3 Stable
HikaShop Business: 2.3.0

We also use a professional template from RocketTheme (template named Leviathan).

Do you need more information?

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 2 weeks ago #152354

Hi,

Well, I was more talking about your moneris/eselect configuration.
Are you using a test account ? Was is your payment plugin configuration ?
I made some investigations today and I saw that they changed the URL of their payment server like that, without any specific notification.

More than that, the eselect/moneris platform have now two different API for both countries (US and Canada).
The current plugin will just work for the Canada and you have to activate the debug in order to have the right host payment URL (the debug option is just to change the url).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 2 weeks ago #152496

Hi Jerome,

I've attached some Moneris' integration guy. This might help you guys help me solve this issue.

As it stands right now, I have two plugins enabled (1 for USD and 1 for CAD). I had made the change Nicolai recommended "var $accepted_currencies = array( 'CAD','USD' );" which should enable me to use both currencies.

I'll get back to you with the configuration information shortly.

Thanks,
Ben

File Attachment:

File Name: h4e1a188.pdf
File Size:1,351 KB

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 2 weeks ago #152499

Hi,

Thanks for the doc but it is not the API we use, totally not.

You put the CAD and the USD in the plugin ok but.. Which moneris are you using ? The Canadian one or the US one ?
Because, if you read my previous message, I am saying that the plugin is just compatible with the Canadian API, in some specific rules...

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 2 weeks ago #152610

I have two merchant accounts with Moneris, one for USD and one for CAD. Moneris issues a separate API for each, but I believe I connect to the same server to process the cards. I would like to be able to use both currencies if possible.

I grabbed this from the moneris developer portal.. The first two files attached are the US PHP API and developer guide and the second two files are the CAD PHP API and developer guide. I see what you mean now how they are different. Is it possible for you to implement a USD version of the plugin?

File Attachment:

File Name: h5682fe8.zip
File Size:52 KB


File Attachment:

File Name: h23741a2.pdf
File Size:1,132 KB


File Attachment:

File Name: hcfce3ed.zip
File Size:26 KB


File Attachment:

File Name: h0bcde21.pdf
File Size:402 KB

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 2 weeks ago #152618

Hi,

I will talk with Nicolas about the US version of the plugin.
Is the actual plugin working with an CAD account ? Or is there some issues ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 1 week ago #152797

Hi Jerome.

I can't get the plugin working with CAD currency. I'm in production mode, but the checkout process gets stuck at the last step. Clicking the Finish button several times doesn't appear to post the transaction.

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 1 week ago #152819

Hi,

So, once again.
You said you are in production mode but do you have the option "debug" activated ?
If not, please read my explanations:
www.hikashop.com/forum/payment-methods/8...-eselect.html#152419

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 1 week ago #152868

Hi Jerome,

Debug mode is turned off.

If I turn it on, does the plugin connect to the demo server assigned in the library file?

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 1 week ago #152884

Hi,

Well... No at all.
I said that eselect/moneris changed the servers url and the production url does not exist anymore. You have to use the debug mode to have the real working url which is now use in production too.
It is written in my post... it is written.

The url in the debug mode is now the url in production mode. I don't know if the same url works for both modes or if the debug mode need a new url too.


Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 47
  • Thank you received: 0
10 years 1 week ago #152993

Jerome,

I switched the plugin to use the debug mode and it still does not work. The plugin gets stuck at the Payment screen and clicking finish returns to the same page over and over no matter how many times the button is clicked.

:(

Jerome wrote: Hi,

Well... No at all.
I said that eselect/moneris changed the servers url and the production url does not exist anymore. You have to use the debug mode to have the real working url which is now use in production too.
It is written in my post... it is written.

The url in the debug mode is now the url in production mode. I don't know if the same url works for both modes or if the debug mode need a new url too.


Regards,

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum