- Redirected check out and iframe checkout share the same order creation logic.
- The order will be created during saveOrder call to backend.
- The difference between the two will be injection of client-side javascript during payment type selection.
- if BitPay/Bitcoin, client-side JS will be inserted into page to swap the out the next step after order save is complete
- in all cases, Magento will create the invoice and pass the client a redirect_url
- the iframe invoice will receive the redirect url and build an iframe with the src being the bitpay url.
- the redirected check out will not have any new client side JS, so the next step will be to redirect from Magento.
- For merchants using an iframe BitPay invoice (set "Redirect Checkout"
to "No")
- Before this change:
- When a user confirms the payment method, the BitPay invoice will
be displayed and the Magento order will not yet be created.
- The Magento order is only created if the user pays the invoice,
leaves the checkout browser window open, and BitPay is able to see
the user's transaction and send the IPN successfully to the Magento
server.
- The problem is when the customer sends a bitcoin transaction, but
their transaction isn't relayed because the fee is too low or the
network is under high load.
- Under this condition, the customer has paid, yet they have no
order with the merchant. The merchant has a hard time serving
their customer under these conditions.
After this change:
- When the user confirms their payment method, the BitPay invoice
will NOT be displayed until the user clicks "Place Order".
- This will guarantee that an order is created BEFORE the customer
is able to pay the BitPay invoice.
- This will allow the merchant to self-serve their customer by being
able to find their customer in their dashboard and issue a refund
or apply the transaction.
- If shopping cart user's currency is not the same as the Magento configured base currency and the type of BitPay invoice is a redirected checkout (non iFrame), then the $amount (invoice amount) passed to Bitcoin.php authorize() will be in the base currency and not the user's currency. A BitPay invoice is then created based on the user's currency and the amount, which is wrong.
- The Bitcoin.php authorize function now recomputes the amount in the event that the amount is not correct.
- Updated the README and GUIDE to show latest Magento version checked.