Bitpay plugin - request for customizable ReturnURL

  • Posts: 68
  • Thank you received: 6
10 years 5 months ago #159065

-- HikaShop version -- : 2.3.1
-- Joomla version -- : 3.3

Thanks for the Bitpay plugin which was rather easy to configure.

Tips for the ones struggling with the configuration and test:
- After creating your account on Bitpay, you need to create an API key. (Dashboard -> My Account -> API Access Keys)
- It appears that the API key you get needs an hour or two to be active. So the plugin in Hikashop may appear to not work at all. Just be patient.
- As you have time you can download the PDF explaining the API from Bitpay. (API -> API Documentation)
- On page 6 you will have the description of the invoice states which you can then map to your order statuses in Bitpay plugin configuration
- Once all is configured and your API key is active you will see in your test transaction that it works similarly to Paypal. You quit your HIkashop site to go on Bitpay site. You pay with your prefered Bitcoin wallet. Then the Bitpay page updates automatically and proposes a link to go back to your Hikashop site.

Now onto my request:
- the return page after Bitpay is something like http://www,mysite.com/index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=xxx&Itemid=xxx&sessionid=xxx
- could we have an updated version of the plugin where the return URL is configurable? Similar to what we have in the Paypal plugin
- ideally I would like a specific page http://www,mysite.com/thank-you.html where I have full control of the content

Thanks.
Max

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 5 months ago #159121

Hi,

Good idea and easy to add actually.
Add the code:

<tr>
	<td class="key">
		<label for="data[payment][payment_params][return_url]"><?php
			echo JText::_('RETURN_URL');
		?></label>
	</td>
	<td>
		<input type="text" name="data[payment][payment_params][return_url]" value="<?php echo $this->escape(@$this->element->payment_params->return_url); ?>" />
	</td>
</tr>
at the end of the file plugins/hikashoppayment/hikabitcoin/hikabitcoin_configuration.php and it should work.

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

  • Posts: 68
  • Thank you received: 6
10 years 5 months ago #159250

So the plugin configuration now has indeed the return URL field. But my test transaction returned me to the usual http://www,mysite.com/index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=xxx&Itemid=xxx&sessionid=xxx

In fact it seems Bitpay server notifications do not work. I have the exact same issues as described here www.hikashop.com/forum/2-general-talk-ab...html?start=80#144184

My version of Hikashop is 2.3.1 downloaded yesterday.
Does it include the latest version of hikabitcoin plugin or do I need to install what you sent here www.hikashop.com/forum/2-general-talk-ab...html?start=80#144284 ??

I would like to try to put in my Bitpay account (Dashboard > In-Person Payment Tools> Customize My Mobile Checkout) the Server IPN URL to see if it works better.
Can you let me know what is the Server IPN URL on Hikashop?

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

  • Posts: 68
  • Thank you received: 6
10 years 5 months ago #159295

Maybe this is can help figuring why the payments notifications from Bitpay do not work.

support.bitpay.com/hc/en-us/articles/202...itPay-when-using-PHP

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

  • Posts: 12953
  • Thank you received: 1778
10 years 5 months ago #159602

Hello,
After being redirected to the page :
http://www,mysite.com/index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=xxx&Itemid=xxx&sessionid=xxx

Does your Order status change to "confirmed" ?

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

  • Posts: 68
  • Thank you received: 6
10 years 5 months ago #159627

Mohamed, the order status never changes on Hikahop side. It stays "created".

On BitPay side, I receive all the email notifications showing the payment changing status.
But I also receive email notification from Hikashop which are all the same: "A bitcoin notification was refused because it could not be verified by the bitcoin server"

So it means that BitPay is indeed calling Hikashop each time the payment changes status but on Hikashop side something is wrong.

Maybe a hint: in HIkashop email notification saying the "bitcoin notifucation was refused" it also says "You can access the order details directly by clicking on the link below after logging in your back end: "
www.mywebsite.com/administrator/index.ph...&task=edit&order_id=

See how there is no value at order_id=
Maybe some parameters got lots from Hikashop to BitPay so the return BitPay to Hikashop fails.

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

  • Posts: 68
  • Thank you received: 6
10 years 5 months ago #161236

Mohamed,
I just tried again with a fresh Hikashop 2.3.1 downloaded today.
Same problem. Order status never changes.
May I know if this has been put in the bug list?

Additionally here is a screenshot of my plugin configuration,

Attachments:
Last edit: 10 years 5 months ago by cbadmin. Reason: Added screenshot

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

  • Posts: 68
  • Thank you received: 6
10 years 4 months ago #162156

Extract from the BitPay API documentation:

In the event that IPNs are not being received or processed as expected, please check the following:
● Verify that your "notificationURL" for the invoice is "https://" (not "http://")
● Verify that your callback handler at the "notificationURL" is properly receiving POSTs. You can verify this by POSTing your own messages to the server from a tool like Chrome Postman.
● Verify that the POST data received is properly parsed and that the logic toward updating order status on your server is as expected.
● Verify that your server is not blocking POSTs from servers it may not recognize.

This means that your Hikashop site must be accessible through HTTPS in order to receive Bitpay notifications.

Our test server does not have HTTPS so I was received the emails "A bitcoin notification was refused because it could not be verified by the bitcoin server"
On the live server which has HTTPS we do not receive the error message by email anymore. That is a progress.

BUT, the order statuses still do not update according to the Bitpay notifications.
Order status still stay on 'created' and never change. Check screenshot of my configuration in previous message.

Did anyone manage to have the Bitpay notifications work? Help!

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 4 months ago #163224

Hi,

Change the line:
$id = $orderid = $response;

to:
$id = $orderid = $response;

in the file plugins/hikashoppayment/hikabitcoin/hikabitcoin.php and that should solve the problem. It will be included in next release of HikaShop that will be out in the next few days.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum