Some handling issues with Pay.nl plugin

  • Posts: 136
  • Thank you received: 8
  • Hikashop Business
1 year 7 months ago #351036

-- HikaShop version -- : 4.7.2
-- Joomla version -- : 4.2.9
-- PHP version -- : 8.0

Hi,

I have 2 issues with the Pay.nl payment plugin / api
1= sometimes customers go to payment and instead of paying they go backwards and make a new order. After some time Pay.nl automatically cancels the left order. Cancellation is good, but somehow the customer gets a notification mail. Pay says this mail to customer setting is not inside the api. Can we set hikashop so that when Pay.nl plugin changes status from "created" to "cancelled" it will not mail the customer?

2= When I refund a customer, Pay.nl had refund status notifications. The issue is: hikashop does not recognize these and uses cancelled and notifies customer again. since there are 3 refund statuses, hikashop cancelles the order 3 times.

(refund:add)
TRUE| message: transaction cancelled, orderId:1168, hikashop_order_status:shipped, api_current_state: CANCEL, status_canceled: cancelled, status_pending: created, status_success: confirmed

(refund:send)
TRUE| message: transaction cancelled, orderId:1168, hikashop_order_status:refunded, api_current_state: CANCEL, status_canceled: cancelled, status_pending: created, status_success: confirmed

(refund:recieved)
TRUE| message: transaction cancelled, orderId:1168, hikashop_order_status:cancelled, api_current_state: CANCEL, status_canceled: cancelled, status_pending: created, status_success: confirmed

Again, can we make hikashop recognize 1 of these as "refunded" and ignore the rest, or recognize all of these?
Also, it would be best if the customer get maximum of 1 mail about the refund.

Please let me know, kind regards.
(Message to Nicolas: Myparcel did not yet respond but i came to the same conclusion as your mail, myparcel did not have this address id in backend. Thanks.)

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
1 year 7 months ago #351043

Hello,

We aren't sure that this plugin have been developed by the HikaShop team, where did you get this plugin?
If you get this plugin on our website can you provide the url link to this plugin please?

Sorry for this return but if we don't develop this plugin our help will be more limited as we don't know well plugin process.
Awaiting your return to progress on your subject.

Regards

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

  • Posts: 136
  • Thank you received: 8
  • Hikashop Business
1 year 7 months ago #351051

Philip the plugin is not "yours", but there are some basic handlers that are probably important for the future and that are working similar on every plugin as they (Pay.nl) have told me what the plugin does and doesn't.
And the automatic mailing (customer notification) is not in the plugin/api, it only gives the status change command and not the + notify customer, that part is (according to them) hikashop.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 7 months ago #351065

Hi,

While the emails are sent by HikaShop, it's the plugin which triggers the email sending in its code.
I suppose the payment plugin must use the "modifyOrder" method in its code to change the status of the order. When calling the method, the third parameter allows the plugin to tell HikaShop if it should send the "order status notification" email or not.
So, as Philippe, I also expect the issue to be in the plugin.
But without being able to look at the code of the plugin, I can't say much more.

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

  • Posts: 136
  • Thank you received: 8
  • Hikashop Business
1 year 7 months ago #351072

Thanks Nicolas,

The teamleader + the developer told me it was not in the plugin. Now i can tell them exactly which part does it.
I will wait before telling them if you are willing to check in the plugin soon:
github.com/paynl/hikashop-plugin/blob/master/paynl.php

It's strange 2 people in charge of the plugin don't know how hikashop handles the commands so it would be good if i know exactly what to tell them in their own coding language.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 7 months ago #351073

Hi,

As I said in my previous message:

I suppose the payment plugin must use the "modifyOrder" method in its code to change the status of the order. When calling the method, the third parameter allows the plugin to tell HikaShop if it should send the "order status notification" email or not.

I checked the code on your link and it is as I was expecting it. The line:
$this->modifyOrder($order_id, $custom_state, true, $email);
in the code of the plugin is the one which is changing the status of the order to "cancelled". And the third parameter is set to "true" which means that the plugin wants HikaShop to send the notification email to the customer.
This should be set to null or false if you don't want the order status notification email to be sent when changing the order status.
Or it can also be set to an object like this:
$history = new stdClass();
$history->notified = 0;
$history->data = 'xxx';
$this->modifyOrder($order_id, $custom_state, $history, $email);
Doing it like that, the
$history->notified = 0;
will tell the system to not send the email to the customer but it will log a row in the order history (which can be useful to know what's going on).

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

  • Posts: 136
  • Thank you received: 8
  • Hikashop Business
1 year 7 months ago #351088

Thanks,

I have send this to the plugin manager

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

  • Posts: 136
  • Thank you received: 8
  • Hikashop Business
1 year 6 months ago #351263

Hi Nicolas,

Pay decided now that they stop supporting the plugin because there aren't enough clients.
They said i was free/able to maintain my own fork on github, as if i would have the skills??

What do you think is the best way forward?
Is there interest from hikashop to do that github option?
Should i hire a developer to make these simple changes?
Would i need to hire a developer to check the plugin after every hikashop update?

The next option would be Mollie payment gateway i think i seen a hikashop plugin, but maybe this will get in the same boat..

Please let me know what you think would be best.
I just invested in a new website + subscription so i wouldn't wanna have to make a woocommerce website or whatever :(

Kind regards, Nico

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 6 months ago #351294

Hi,

Well, Making a fork on github is sure is possible, and adding the patch is quite easy. Here, it's done:
github.com/HikaShop/payment-plugin-paynl
Note though that I haven't studied the documentation of pay.nl, nor the whole code in the plugin.
As a short term solution, it's nice. But long term, I would recommend switching to a payment gateway with a payment plugin which is actively maintained.

Regarding Mollie, the payment plugin is sold by SkySpider on our marketplace and it is actively maintained:
www.hikashop.com/marketplace/product/153...ie-by-skyspider.html
So, long term, it could be a nice solution. I also know there are many plugins for Ideal for HikaShop, and I believe it's also a Dutch payment gateway.

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

  • Posts: 136
  • Thank you received: 8
  • Hikashop Business
1 year 6 months ago #351297

Hi Nicolas,

Thanks for the patch and i will check my future options.

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

  • Posts: 136
  • Thank you received: 8
  • Hikashop Business
7 months 1 week ago #360233

Hi Nicolas,

Up till now the new fork always worked perfect.
Just now i got an email with this message:
"HTTP to HTTPS migration
We see that you still connect to our platform via the unsecure http protocol. We will stop supporting that solution soon.



We will forward any http attempts to the https forward after that date. Based on your server settings or technical integration with the PAY platform this solution might result in errors. We advise that you proactively change your integration into the https method.

Deadline is 30 April 2024

We recommend that you change your endpoint before this date.

We can't see if all your integrations use http or https. But if you receive this email at least 10 request in the latest 7 days are being send by the HTTP protocol. "

Is this solvable?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 months 1 week ago #360237

Hi,

I can see that you're using the pay.nl plugin at github.com/paynl/hikashop-plugin
This plugin has been developed by pay.nl themselves, and they stopped maintaining it one year ago. So I would recommend contacting them and see if something can be done to update the plugin.
Otherwise, I would recommend preparing to switch to another payment gateway in the future. Because in the long term, since the plugin is not maintained anymore, it will start breaking as you update your PHP, Joomla and HikaShop, and as pay.nl change their API.

If I look at github.com/paynl/hikashop-plugin/blob/master/paynl/Api.php I can see the line:

protected $_apiUrl = 'http://rest-api.pay.nl';
So you could try changing it to :
protected $_apiUrl = 'https://rest-api.pay.nl';
On your website, this should be in the file plugins/hikashoppayment/paynl/api/Api.php
Now, just switching from http to https in the URL might not be enough and doing this might break the code as you might also need to add the root CA certificate to your php.ini if it's not already the case:
stackoverflow.com/questions/36131857/ssl...ficate-with-php-curl
www.herongyang.com/PKI/HTTPS-PHP-Add-CA-...-for-PHP-Engine.html
But it might not be necessary if your server is already properly configured. If you're not familiar with server administration, you might need to ask your hosting support, or a specialist in that domain.

Last edit: 7 months 1 week ago by nicolas.

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

  • Posts: 136
  • Thank you received: 8
  • Hikashop Business
7 months 1 week ago #360241

Yes, you made a fork back when we first discussed it.
I would pay someone to make an updated version as long as it then is not a public fork because i'm not paying for other people (that seems to be the norm as i see what i already paid for plugins the last years).
If you want to update it for a reasonable price or if there is someone you could recommend that is familiar with such things, i love to learn.

When i'm up2date with my other projects, i will go find a payment gateway that does maintain it's hikashop api, but it's going to take a while.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 months 1 week ago #360242

Hi,

I would recommend contacting www.webit.bz/hikashop-c-38.html
They make many payment plugins for HikaShop and are quite active.
Their latest plugin ( www.webit.bz/hikashop-payabl.-online-payments-p-540.html ) was added last month.

We're a small team, so while we can work on payment plugins ourselves, we prefer to leave this to third party developers so that we can focus on improving HikaShop itself and make the most of our limited time.

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

Time to create page: 0.078 seconds
Powered by Kunena Forum