-
Notifications
You must be signed in to change notification settings - Fork 9.4k
can't finish the authorize.net payment and it always on loading #4813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @woei66. Please attach magento and apache logs, also do you have any js errors in your browser? Do you use Authorize.net for production application? |
any solution for the problem .. ? |
I'm having this same problem as well. There is a javascript error in the console:
|
I did a workaround. I enabled SSL for all pages and it works. |
but, I didn't find the root cause |
I have SSL on all pages as well, but still having the same problem. |
@mverstraete, please, specify configuration of Magento (version, version of php, etc) and attach debug and exception logs. |
Magento version 2.0.7
transact.dll:4 Uncaught SecurityError: Blocked a frame with origin "https://secure.authorize.net" from accessing a frame with origin "https://www.storesdomainhere.com". Protocols, domains, and ports must match.(anonymous function) @ transact.dll:4
Nothing appears in the system or exception logs. This is the only thing that appears in the debug log: [2016-06-21 14:18:30] main.DEBUG: cache_invalidate: {"method":"POST","url":"https://www.storesdomainhere.com/authorizenet/directpost_payment/place/","invalidateInfo":{"tags":["catalog_category_2","catalog_category"],"mode":"matchingAnyTag"},"is_exception":false} [] |
Also the response of transaction.dll looks like this: <html>
<head>
<script>
var require = window.top.require;
require(
[
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/action/place-order'
],
function(quote, placeOrderAction) {
placeOrderAction({"method": quote.paymentMethod().method}, true);
}
);
</script>
</head>
<body></body>
</html> |
@mverstraete, this is https://www.storesdomainhere.com public domain or your localhost, I can't open this URL. Also, do you use authorize.net sandbox credentials or production? |
No, the real domain is https://www.customizedgolfballs.com This is the production site, using production authorize.net credentials. |
Could you attach response from Authorize.net iframe? |
After updating to Magento 2.1, this is no longer happening. Its also possible the relay response URL was http instead of https in the authorize.net account settings. I'm not sure which one of the two fixed it. Now the payment is going through, but I'm still stuck on the loading screen. Now its flashing an error that says "No such entity with cartId = 52". The integer value is different every time... still trying to figure it out. |
The "No such entity with cartId" happens when an api call is made to /rest/default/V1/guest-carts/050...2fc/payment-information. A 404 is returned and the error displays briefly behind the loading screen. The response from the API call contains a stack trace:
It happens because its calling QuoteRepository->getActive('56'). The quote exists, but its not active so it throws a NoSuchEntityException which returns a 404 Not Found. Is the quote supposed to be active at that point? |
Yes, the repository tries to get an active quote. Per one time only one quote can be active for customer. |
I deleted all of the quotes out of the database. I place an item in my cart and go to checkout. When I get to the checkout page, I see my quote in the database and it is active. Once I click "Place Order", the quote turns to inactive and I get the "No such entity with cartId" error mentioned above. It stays on the loading screen forever. Customers are unable to complete checkout. |
Could you attach response from Authorize.net and your request log? |
The transaction goes though to authorize.net just fine, payment is processed and everything. Its as if the quote is being marked as inactive prematurely in the checkout process. I did see in the DirectPost class on the authorizenet module at the end of the processOrder method, the quote is marked as inactive. It seems like after this happens, the API call is made to /rest/default/V1/guest-carts/050...2fc/payment-information, which throws the error. Heres whats in the debug log:
|
Actually an Authorize.net return response with error:
Looks like this is a problem. The Authorize.net response codes docs . |
Thats not the problem. That was because I had the production API url instead of the sandbox API url. I changed it, and the API call succeeds, and it still has the same problem. Its related to the quote being marked as inactive during the authorize.net payment process. Here is the debug log after changing the API url to the sandbox url.
|
Could you change payment action to |
@joni-jones , changing the payment action to Authorize Only works! I'm taken to the Success Page without any errors! |
@joni-jones , After the customer checks out with Authorize Only, if I try to capture the payment from the Invoice tab of the order, it gives an error that says: We can't save the invoice right now. Then if I try to capture it again it gives an error that says Gateway error: This transaction has already been captured. Also, the items never get removed from the Mini-Cart. If I press the delete icon to remove them, it gives a popup that says: We can't find the quote item. |
For now |
@mverstraete , Hi I am facing the same problem I read all conversation and tried everything but still on payment spin is showing did you find any solution. Help much appreciated. :) |
@mverstraete , Added base_grand_total but did not solve my problem still screen is spinning. |
I was having the same issue, what i did to solve the problem was /home/XXXXXX/public_html/shop/vendor/magento/module-authorizenet/Model/Directpost.php and commented out the $this->checkTransId(); after that my indefinite spinning wheel stopped and my transaction went through |
[honey] MC-18402: Cart promotions :: Implement new schema changes
Uh oh!
There was an error while loading. Please reload this page.
Steps to reproduce
Expected result
Actual result
I enabled the debug optiona and I got below debug information
'request' =>
array (
'x_version' => '3.1',
'x_delim_data' => 'FALSE',
'x_relay_response' => 'TRUE',
'x_test_request' => 'TRUE',
'x_login' => '****',
'x_method' => 'CC',
'x_relay_url' => 'http://xx.xx.xxx.x/authorizenet/directpost_payment/response',
'x_type' => 'AUTH_ONLY',
'x_fp_sequence' => '6',
'x_invoice_num' => '2000000003',
'x_amount' => 56,
'x_currency_code' => 'USD',
'x_tax' => '0.00',
'x_freight' => '5.00',
'x_first_name' => 'xxx',
'x_last_name' => 'xxx',
'x_company' => '',
'x_address' => 'xxx',
'x_city' => 'xxx',
'x_state' => '',
'x_zip' => 'xxxx',
'x_country' => '',
'x_phone' => 'xxxx',
'x_fax' => '',
'x_cust_id' => '',
'x_customer_ip' => '127.0.0.1',
'x_customer_tax_id' => '',
'x_email' => '[email protected]',
'x_email_customer' => '1',
'x_merchant_email' => '[email protected]',
'x_ship_to_first_name' => 'xxxx',
'x_ship_to_last_name' => 'xxx',
'x_ship_to_company' => '',
'x_ship_to_address' => 'xxxx',
'x_ship_to_city' => 'xxx',
'x_ship_to_state' => '',
'x_ship_to_zip' => 'xxx',
'x_ship_to_country' => '',
'x_po_num' => '',
'x_fp_timestamp' => 1464781638,
'x_fp_hash' => '61c8aa734cea7e7ad8705ad0d9fbc7ed',
),
Below is my authorize.net setting

The text was updated successfully, but these errors were encountered: