Need some help with a payment plugin.
I now get the following return_url (notify_url)
But it now makes two orders, first one with all the data and status Created.
And secondly it makes a totally blank order with Status Cancelled.
I would expect it to make a Cancelled order since the gateway refuse my order at the moment. An issue I haven't got solved with the provider yet (status=E).
It looks like it runs through the first part of the notification function and creates an order (As if Status=A) and then continue to the other part (the one I added if Status is not A)
And the resulting page is a totally blank page.
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
That means that I have to set up my server and host configured to work with that.
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
Thus, the system creates a new one instead of updating the existing one.
Please Log in or Create an account to join the conversation.
But this only has the status "Created" not "Cancelled" as I want. (Since the payment is rejected)
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
BTW, did you see my PM?
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
I just saw it and answered you.
Please Log in or Create an account to join the conversation.
I've sent you an email.
I found another problem with the outgoing call to the payment gateway.
The notify_url is used as response_url but it acts a little strange.
This is used, I have to urlencode the ampersands.
The part "notify%26notif_payment" is somehow changed so in the MD5 hash it has become "notify¬if_payment" this results in that the call is rejected.
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
If I send notify¬if_payment it will break the URL in to parameters and the URL gets broken.
Is there any solution to this?
Thanks
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
Or maybe that would be the solution ?
Please Log in or Create an account to join the conversation.
The gateway uses & as a separator for the fields in the URL so if I send the request with plain ampersands the gateway breaks up the return and cancel URL's after the first ampersand. That is the reason for URLencode the ampersand to %26.
Apparently the gateway reads the %26not as this character: ¬
I will test with a SEF-url and see how that works.
Thanks
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
I needed to URL encode the other characters like the ? you did point out :blush: :blush:
When doing that for the = ? and & I got through to the gateway. Yipee :woohoo: :woohoo:
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
After the payment gateway returns to Hikashop I get redirected to after_end.php.
I have modified after_end.php so that it shows different messages depending on payment success or not.
BUT I would like to end up on my plugins _end.php page. The after_end.php might be needed of other things and it is nicer to have everything in one package for others who might want to use this plugin.
I tried to change the redirect_url to point to my plugin instead but that doesn't work properly.
What is needed to redirect it correctly?
Thanks
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The line of code I submitted in my last post is in the onPaymentNotification function where I check if the payment is OK at the gateway or not depending on the return_url I get from them.
So depending on the outcome of the payment I want to end up at the plugins after page with a message telling the customer that the payment succeded or not.
Are you saying the the processing here is meant to end up on different pages? Like if it is not a good payment I should end up on the plugins after page and if it is OK I would end up on the normal after_end.php
As I have set it up of the payment is OK the order is saved with a status of Confirmed. If the payment don't get thru the order is saved but with status Created, and then the customer will get a message to contact the store for instructions on how to pay.
Thanks
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The payment plugin works in Firefox on my Mac but when using Safari or Chrome I get the following error when trying to go to the payment gateway.
Notice: Trying to get property of non-object in /mydomain/components/com_hikashop/controllers/checkout.php on line 1284
Notice: Trying to get property of non-object in /mydomain/components/com_hikashop/views/checkout/view.html.php on line 439
Notice: Trying to get property of non-object in /mydomain/components/com_hikashop/views/checkout/view.html.php on line 439
Notice: Trying to get property of non-object in /mydomain/components/com_hikashop/views/checkout/tmpl/payment.php on line 12
Notice: Trying to get property of non-object in /mydomain/components/com_hikashop/views/checkout/tmpl/payment.php on line 12
The order is created.
Jan
Edit this problem also happens in Firefox.
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
If I have this code in the _configuration.php
I get this error when trying to go in to the settings of the payment plugin:
Order status
Notice: Undefined index: category in /mydomain/plugins/hikashoppayment/auriga/auriga_configuration.php on line 96
Fatal error: Call to a member function display() on a non-object in /mydomain/plugins/hikashoppayment/auriga/auriga_configuration.php on line 96
Line 96 being this code from above:
<?php echo $this->data->display("data[payment][payment_params][order_status]",@$this->element->payment_params->order_status); ?>
In the pluginfile I have this in the onPaymentConfiguration function:
Apparently I have missed something, but what? The order_status setting code is copied from the banktransfer plugin.
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.
In any case, you can directly initialize it in the _configuration.php file like below before using the display function :
$this->data = hikashop::get('type.categorysub');
$this->data->type = 'status';
Please Log in or Create an account to join the conversation.
That solved the problem on the _configuration page.
Still there is the problem in the checkout that ends up with errors before going to the gateway.
Any clues??
BTW Nicolas did you get my email?
Jan
Jan Suhr
www.colorconsult.se www.jansuhr.se
Please Log in or Create an account to join the conversation.