Closed justinfielder closed 9 years ago
Same here, just wait and the order will be created. I presume is created at the paiment confirmation. It's not correct. It need to be created before, and validated at the paiment creation.
Sorry about that guys, we worked on PrestaShop today and are trying to get it updated and stable. If you watch the project you guys should see some commits within the next week or so.
Thaks Joshua, will do.
I did try just hacking the order_id on the end but then the validate controller (which you seem to have borrowed from the pay-by-bank-transfer) barfed so I gave up!
Look forward to getting your update as this is the only thing stopping me moving from Shopify.
If it helps the hack of the order_id to be the cart_id seems to work in that the order is confirmed once you confirm the bitpay payment with the outgoing email "approved according to your merchant preferences", but that's incredibly confusing for the customer as they are left with the order still in their cart for 2-10 minutes after they think they have paid.
I've set the speed on my BitPay account and in PrestaShop to High and it now seems to work pretty much as expected, so perhaps you either need to somehow have a 'your order is being confirmed by the bitcoin network' type interim screen, or force it to be processed at 'high' speed and not show the return link until you get it confirmed? After all if it's a physical shipped product then the merchant can ensure that they have the BTCs confirmed before shipping post the order being confirmed to the customer?
Hi Joshua,
I have it running nicely now.
I just changed this part in bitpay.php (root)
$options['redirectURL'] = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').PS_BASE_URI.'index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$this->id.'&id_order='.$cart->id;
and set the transaction speed to high on both the plugin options and on my account. It now confirms perfectly as inp.php gets called before the user clicks to return to the store.
J
Hi Justin,
I don't believe that the id_order parameter is required. We've dropped it from our current work and made some changes that allow the cart to work without setting transaction speed to high. We're still running into some issues with ipn.php getting called after the order is in the database but it is picking up medium speed confirmations. I can push the code to a branch on my fork of the repo if you want to have a look at it.
To be honest I'm not sure if it was needed either as it suddenly sprung into life after a few changes, and I haven't had the time to unwind them. A fork would be great and I'll have a look and let you know how it works, although for me high speed confirms are quite acceptable.
Hey @justinfielder, thank you for your assistance with this. It's invaluable when merchants that are as technically savvy like you help us pinpoint issues with our plugins. Feel free to contact us here on GitHub or me directly if you would like to escalate any problems: rich@bitpay.com. Once again, I'm very excited to read the progress you guys are making with this plugin! Definitely fork it and hack away - PR's are always welcome!
hey @justinfielder, I've pushed the WIP code to this branch: https://github.com/philosodad/prestashop-plugin/tree/experiment_branch. On my test server, this handles everything up to updating the invoice on completion of payment.
@justinfielder I've made some major improvements to the code in the experiment branch. It should do everything you need it to do, although some admin functions (updating the bitpay status of an order) are not quite there yet.
@justinfielder There were a few issues with the config.php file on that branch that should now be fixed.
Hi Guys,
Sorry for the delay in testing this (something called Christmas got in the way) but just to let you know it works fine.
I've 'hacked' in a '15% discount for paying in BTC' by a simple change in bitpay.php $options['price'] = $total * 0.85;
and the reciprocal in ipn.php $myprice = (float) $decoded['price']; error_log("returnprice = ".$myprice); //log for debugging purposes $myprice = $myprice / 0.85; error_log("returnprice upscaled = ".$myprice); //log for debugging purposes $decoded['price'] = $myprice;
It's not perfect because for small values you sometimes get rounding errors which means that the return doesn't match exactly, so the final thing I've done is changed the payment_error order status in PrestaShop to be "Payment awaiting full verification" which means that the customer thinks that it is just awaiting verification in the blockchain and our order agents can check it's just that an then flip it to Payment Accepted.
It would be nice if you are in a coding mood to add in an option for the discount and enable the API to sort it out so that the discount is done entirely within BitPay and therefore the correct price is always returned, but we can live with it.
Once we are live with the new shop I'll let you know where it is.
Much coolness and thanks for all the fixes.
J
@philosodad or anyone else: I'm not a developer and neither do I understand github. It would be great if you could still help me. As far as I understand this conversation I'm having the same problem as mentioned above.
I've downloaded the zip file which is offered here and installed the plugin on a test environment (risk setting=medium). Then I've created an order. After clicking on "check out" I see the page with the payment instructions and QR code but in the backend I don't see that an order was created. Of course also no email is sent out. After 15 min. the payment instructions page shows "this order has expired".
I would have expected the same behaviour as with payment via bank wire: after clicking on "check out" an order is created, payment instructions are displayed + sent to the client via email. Did I make some mistake while installing? Or is it somehow possible to change this behaviour?
You actually have to pay the invoice at the QR code stage.....!
Create a test product for something small value wise, get your favourite wallet with some BTC in it, pay it and once you do BitPay will complete the transaction.
If you set BitPay to not settle the BTC into fiat then your Bitcoins will come back to you minus BitPay's fees.
J
Sent whilst mobile
On 28 Jan 2015, at 09:09, java-guy notifications@github.com wrote:
@philosodad or anyone else: I'm not a developer and neither do I understand github. It would be great if you could still help me. As far as I understand this conversation I'm having the same problem as mentioned above.
I've downloaded the zip file which is offered here and installed the plugin on a test environment (risk setting=medium). Then I've created an order. After clicking on "check out" I see the page with the payment instructions and QR code but in the backend I don't see that an order was created. Of course also no email is sent out. After 15 min. the payment instructions page shows "this order has expired".
I would have expected the same behaviour as with payment via bank wire: after clicking on "check out" an order is created, payment instructions are displayed + sent to the client via email. Did I make some mistake while installing? Or is it somehow possible to change this behaviour?
— Reply to this email directly or view it on GitHub.
Quick note: we don't charge any fees, so you should get the Bitcoins back minus the Bitcoin networks transaction fees, which your wallet should show you.
I guessed he didn't understand bitcoin as he didn't know how to pay an invoice so complicating different types of transaction fees felt too much :)
On 28 Jan 2015, at 15:43, J. Paul Daigle notifications@github.com wrote:
Quick note: we don't charge any fees, so you should get the Bitcoins back minus the Bitcoin networks transaction fees, which your wallet should show you.
— Reply to this email directly or view it on GitHub.
@justinfielder @java-guy If you are still having this issue, feel free to reopen this thread. Otherwise since there hasn't been any traffic on this for a month I'm assuming everything is copacetic.
@ionux Well, since there's no way to make a test payment and since I don't (and don't want to) own an own btc wallet I went live with the plugin untested. I'm now going to wait until someone either succeeds in making a purchase or complains. Neither happened so far...
There is a way to make a test payment, and you can create a test wallet using test bitcoin. That's one of our steps in testing each plugin. Making a test payment does require modifying one of the files, if you are interested in doing so I can explain what to do.
@philosodad I installed the plugin bitpay-prestashop-1.5.0.zip in PrestaShop 1.6.0.14, PHP version 5.4.38. Payment goes through bitpay and was accepted but the store does not place any orders. Plugin is not compatible with the version of PrestaShop 1.6.0.14?
@grejjn what security/speed level are you set at? High speed is broken, only medium and slow will work.
@philosodad I know that high speed is not working. I set the plugin and the user's account BitPay transaction rate to "medium". Bitcoin Payment is accepted but the store does not place any orders. In the history of customer orders and PrestaShop admin panel is not listed orders. I also wrote for BitPay support and wait for answer.
As far as I know, the bitpay plugin works with PrestaShop 1.6. I will have a look at this later this week and see if I can find anything. In them meantime it would be helpful to have as much information about your setup and any error logs you might have.
I do not have at the store "https" and certainly this is the cause of the error. How to Install an SSL Certificate to write if it works. Thanks for your interest in the problem;)
You can create and install a self-signed certificate to test with but that's really outside the scope of what we help with here though, sorry. There are many good tutorials for setting up a secure webserver out there if you search for the topic. Probably better than I could explain anyway! :)
Installed the latest plugin on a clean 1.6.0.9 PrestaShop and all I get after the invoice has been paid when it returns to the store is "You have not placed any orders".
The return link is http://mystore.###########.com/shoplive/index.php?controller=order-confirmation&id_cart=1&id_module=70&id_order=
Which would tend to suggest you aren't getting the order ID correct?