- Posts: 147
- Thank you received: 8
Payment plugin doesn't send along email with customer address details
I use Pay.nl plugin and they offer to have In3 (ideal) payin3.eu/nl/shopping-met-in3/
When i use this an error comes up so the pay.nl service team found out it's because hikashop's customer email is not send along with all other data.
Can i set this in the configuration somehow or does this plugin need another fork?
Regards.
Please Log in or Create an account to join the conversation.
Well, if the plugin pay.nl developed doesn't send the email address of the user to pay.nl, it means that there is a problem in the code of the plugin. And so normally, it should be up to pay.nl to fix this.
Now, the code of the plugin for pay.nl can be look at directly on github:
github.com/paynl/hikashop-plugin/blob/master/paynl.php
There, you can see that the email address of the user is provided with this line of code:
However, $order->customer->email refers to the email address of the Joomla user account of the current user. If the current user doesn't have a user account, that variable will be null.
That code should be changed to:
Please Log in or Create an account to join the conversation.
I changed that line of code and enabled the payment method and tried both guest and logged in user, the error is this:
Pay_Api_Exception: PAY-107 - Error in creating transaction in /home/u126019p310787/domains/norahlux.red/public_html/plugins/hikashoppayment/paynl/paynl/Api.php:107 Stack trace: #0 /home/u126019p310787/domains/norahlux.red/public_html/plugins/hikashoppayment/paynl/paynl/Api.php(96): Pay_Api->validateResult() #1 /home/u126019p310787/domains/norahlux.red/public_html/plugins/hikashoppayment/paynl/paynl.php(175): Pay_Api->doRequest() #2 /home/u126019p310787/domains/norahlux.red/public_html/administrator/components/com_hikashop/classes/order.php(969): plgHikashoppaymentPaynl->onAfterOrderConfirm() #3 /home/u126019p310787/domains/norahlux.red/public_html/components/com_hikashop/controllers/checkout.php(699): hikashopOrderClass->createFromCart() #4 /home/u126019p310787/domains/norahlux.red/public_html/libraries/src/MVC/Controller/BaseController.php(693): checkoutController->confirm() #5 /home/u126019p310787/domains/norahlux.red/public_html/administrator/components/com_hikashop/helpers/helper.php(2575): Joomla\CMS\MVC\Controller\BaseController->execute() #6 /home/u126019p310787/domains/norahlux.red/public_html/components/com_hikashop/hikashop.php(88): hikashopController->execute() #7 /home/u126019p310787/domains/norahlux.red/public_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('/home/u126019p3...') #8 /home/u126019p310787/domains/norahlux.red/public_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() #9 /home/u126019p310787/domains/norahlux.red/public_html/libraries/src/Component/ComponentHelper.php(361): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() #10 /home/u126019p310787/domains/norahlux.red/public_html/libraries/src/Application/SiteApplication.php(208): Joomla\CMS\Component\ComponentHelper::renderComponent() #11 /home/u126019p310787/domains/norahlux.red/public_html/libraries/src/Application/SiteApplication.php(249): Joomla\CMS\Application\SiteApplication->dispatch() #12 /home/u126019p310787/domains/norahlux.red/public_html/libraries/src/Application/CMSApplication.php(293): Joomla\CMS\Application\SiteApplication->doExecute() #13 /home/u126019p310787/domains/norahlux.red/public_html/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute() #14 /home/u126019p310787/domains/norahlux.red/public_html/index.php(32): require_once('/home/u126019p3...') #15 {main}
Please Log in or Create an account to join the conversation.
What is the problem you already had before ?
The error message is generic. It basically says that the plugin sent the information of the order to pay.nl and pay.nl refused.
You would have to ask pay.nl's tech support what is the problem with that payment request.
You could try with this code instead:
Please Log in or Create an account to join the conversation.
I changed to your latest suggestion and this works.
What does happen though is that it takes about 4x as long before anything happens after completing the order.
I await a conclusion as it could be my server or pay.nl server is temporarily slow.
But yes, this works. Thanks
(* if you wish Dutch people to keep using Hikashop you might want to make this change and the http:// to https:// change in a new fork, because pay.nl no longer supports hikashop since almost 2 years now)
Please Log in or Create an account to join the conversation.
I've made the changes on a fork of the their github.
I've also changed the URL to point at our fork rather than their github.
That way, new users will be able to find our modified version directly.
Thanks for your feedback.
Please Log in or Create an account to join the conversation.
"I see that the whole process takes about 7 seconds. Of this I see in the logging almost 6 seconds only https://n******x.red/checkout/checkout/confirm active. I expect that there is some time to be gained in this. We can't do much about this."
He also said there is a new API not yet in use, but it also probably won't help the speed since it does not solve the above issue:
developer.pay.nl/reference/api_create_order
Can you check from my cart what in the world is the 6 second holdup before the Pay gateway opens? It seems the rest of my site and hikashop is pretty fast(ish). Thanks
*update, Pay says they see they open up the iDeal page after 1 second, yet as we know, my site only after around 7 seconds.
Please Log in or Create an account to join the conversation.
Then, it's probably the emails being sent.
Email servers can be notoriously slow to send emails, especially if you have attachments on them.
Try to temporarily disable the "order admin notification" and the "order creation notification" emails via the System>Emails menu and try an order.
If it is fast, then it would confirm that it comes from the email sending.
Please Log in or Create an account to join the conversation.
I created a support ticket at the hosting provider for this. (as i assume it's server level and not joomla?)
Please Log in or Create an account to join the conversation.
It's indeed not a problem with Joomla / HikaShop.
Now, maybe it is possible to speed things up by changing things in HikaShop / Joomla.
For example, if you have "embed images" and / or "embed attachments" settings activated in the Emails section of the HikaShop configuration, then each time HikaShop sends an email with images / attachments, it has to transfer the data of these images / attachments to the email server via Joomla. And based on how the hosting is configured and how you configured the emails settings of the Joomla configuration, this transfer of data could take a lot of time. Not embedding the images / attachments by turning off these settings could thus help speed things up.
Also, your hosting might propose several ways to send emails: SMTP, sendmail, phpmail. That can be configured in the Joomla configuration. Based on which sending method is used, speed can vary a lot.
Please Log in or Create an account to join the conversation.
What is the next thing to try? Can you place a test order and see?
As Pay does not support the plugin, i did this thing i saw once with checking network. Here is a screenshot
Please Log in or Create an account to join the conversation.
I checked the payment log file which has mostly ip's with "no zone found for the coutry code ..."
And purchases show like this:
<pre>BluePsyduck\Ga4MeasurementProtocol\Request\Payload Object
(
[clientId] => 80993421.1729508772
[userId] =>
[timestampMicros] =>
[userProperties] => Array
(
)
[nonPersonalizedAds] =>
[events] => Array
(
[0] => BluePsyduck\Ga4MeasurementProtocol\Request\Event\PurchaseEvent Object
(
[currency] => EUR
[transactionId] => E2Z6Y43
[value] => 40.46
[affiliation] =>
[coupon] => GLOW
[shipping] => 0
[tax] => 6.86
[items] => Array
(
[0] => BluePsyduck\Ga4MeasurementProtocol\Request\Event\Item Object
(
[itemId] => 8720892420725_wit
[itemName] => Night Glow Rood Licht Nachtlampje : Wit
[affiliation] =>
[coupon] =>
[currency] => EUR
[creativeName] =>
[creativeSlot] =>
[discount] =>
[index] => 0
[itemBrand] =>
[itemCategory] => "Accesoires"
[itemCategory2] => "Tafel modellen"
[itemCategory3] => "Alles"
[itemCategory4] =>
[itemCategory5] =>
[itemListId] =>
[itemListName] =>
[itemVariant] =>
[locationId] =>
[price] => 44.95
[promotionId] =>
[promotionName] =>
[quantity] => 1
)
)
[session_id] => 1729508771
[engagement_time_msec] => 1
)
)
)
</pre>
Nothing else pops out that might show an error or delay
Please Log in or Create an account to join the conversation.
Sorry for this feedback, but since we did not develop the plugin, we are not in the best position to help you.
To go further with the idea, you should find this help only with the support of the developer.
Regards
Please Log in or Create an account to join the conversation.
On your screenshot of the network, I can see that the confirm page, which then redirects to the payment gateway is sent in 1.84 seconds. In these 1.84 seconds, HikaShop transforms the cart into an order, saves the data of the order in the database, triggers the plugins for the order creation, sends the emails (if any), the payment plugin generates the redirection data, and Joomla and the template display the rest of the page. So there is a lot going on and 1.84 seconds seems normal to me for all this.
Then, there is a request for a javascript file of Ideal which takes 2.52 seconds just for that one javascript file. I don't think there is anything you or us can do for this. This is purely something to do with the payment gateway and you should report this to the payment gateway if you want to do something about it.
Please Log in or Create an account to join the conversation.