Magento 1.9.1 and Paypal error 10413
I was testing my online store and got this error when I used paypal to checkout:
PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details).
I have searched here but they relate to version 1.7 or 1.8. Is there a solution for 1.9.1?
magento-1.9 paypal
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I was testing my online store and got this error when I used paypal to checkout:
PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details).
I have searched here but they relate to version 1.7 or 1.8. Is there a solution for 1.9.1?
magento-1.9 paypal
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Is your store run in india, Make sure your products price as the dollar, because of Paypal support only dollar price and your default currency should be a dollar.
– Gem
Apr 13 '18 at 11:10
add a comment |
I was testing my online store and got this error when I used paypal to checkout:
PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details).
I have searched here but they relate to version 1.7 or 1.8. Is there a solution for 1.9.1?
magento-1.9 paypal
I was testing my online store and got this error when I used paypal to checkout:
PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details).
I have searched here but they relate to version 1.7 or 1.8. Is there a solution for 1.9.1?
magento-1.9 paypal
magento-1.9 paypal
edited Jan 3 '16 at 16:40
Amit Bera♦
57.2k1374170
57.2k1374170
asked Apr 25 '15 at 14:11
tdw
62
62
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Is your store run in india, Make sure your products price as the dollar, because of Paypal support only dollar price and your default currency should be a dollar.
– Gem
Apr 13 '18 at 11:10
add a comment |
Is your store run in india, Make sure your products price as the dollar, because of Paypal support only dollar price and your default currency should be a dollar.
– Gem
Apr 13 '18 at 11:10
Is your store run in india, Make sure your products price as the dollar, because of Paypal support only dollar price and your default currency should be a dollar.
– Gem
Apr 13 '18 at 11:10
Is your store run in india, Make sure your products price as the dollar, because of Paypal support only dollar price and your default currency should be a dollar.
– Gem
Apr 13 '18 at 11:10
add a comment |
3 Answers
3
active
oldest
votes
In my experience this happens occasionally due to decimal rounding differences when multiple cart items are passed to Paypal. To avoid the error completely I disable the Transfer Cart Line items option.
add a comment |
You can try our fix:
https://github.com/magento-hackathon/PaypalRoundBugfix
Afaik the problem with
setting transfer cart line items to No
is, that PayPal doesn't then insure your stuff against the customer, so if you are a fraud, the customer doesn'T get their money back from paypal - AFAIK.
Is Paypal accept INR as a base currency, if not how can I use Paypal if my base currency INR?
– Gem
Jul 28 '17 at 9:12
add a comment |
The issue you faced is related to Magento bug due to which the logic of actions of TAX calculation is performed in the wrong order.
To resolve the problem, you just need to navigate to file:
app/code/core/Mage/Sales/Model/Config/Ordered.php
find _getSortedCollectorCodes() function and replace with below code
protected function _getSortedCollectorCodes()
{
if (Mage::app()->useCache('config')) {
$cachedData = Mage::app()->loadCache($this->_collectorsCacheKey);
if ($cachedData) {
return unserialize($cachedData);
}
}
$configArray = $this->_modelsConfig;
// invoke simple sorting if the first element contains the "sort_order" key
reset($configArray);
$element = current($configArray);
if (isset($element['sort_order']) && false) {
uasort($configArray, array($this, '_compareSortOrder'));
$sortedCollectors = array_keys($configArray);
} else {
$sortedCollectors = array_keys($configArray);
foreach ($configArray as $code => &$data) {
foreach ($data['before'] as $positionCode) {
if (!isset($configArray[$positionCode])) {
continue;
}
if (!in_array($code, $configArray[$positionCode]['after'], true)) {
// Also add additional after condition for related total,
// to keep it always after total with before value specified
$configArray[$positionCode]['after'] = $code;
}
$currentPosition = array_search($code, $sortedCollectors, true);
$desiredPosition = array_search($positionCode, $sortedCollectors, true);
if ($currentPosition > $desiredPosition) {
// Only if current position is not corresponding to before condition
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
array_splice($sortedCollectors, $desiredPosition, 0, $code); // Add at new position
}
}
}
// Sort out totals with after position specified
foreach ($configArray as $code => &$data) {
$maxAfter = null;
$currentPosition = array_search($code, $sortedCollectors, true);
foreach ($data['after'] as $positionCode) {
$maxAfter = max($maxAfter, array_search($positionCode, $sortedCollectors, true));
}
if ($maxAfter !== null && $maxAfter > $currentPosition) {
// Moves only if it is in front of after total
array_splice($sortedCollectors, $maxAfter + 1, 0, $code); // Add at new position
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
}
}
}
if (Mage::app()->useCache('config')) {
Mage::app()->saveCache(serialize($sortedCollectors), $this->_collectorsCacheKey, array(
Mage_Core_Model_Config::CACHE_TAG
)
);
}
return $sortedCollectors;
}
Note : Please override core file. Do not change core file. Clear cache
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f64790%2fmagento-1-9-1-and-paypal-error-10413%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
In my experience this happens occasionally due to decimal rounding differences when multiple cart items are passed to Paypal. To avoid the error completely I disable the Transfer Cart Line items option.
add a comment |
In my experience this happens occasionally due to decimal rounding differences when multiple cart items are passed to Paypal. To avoid the error completely I disable the Transfer Cart Line items option.
add a comment |
In my experience this happens occasionally due to decimal rounding differences when multiple cart items are passed to Paypal. To avoid the error completely I disable the Transfer Cart Line items option.
In my experience this happens occasionally due to decimal rounding differences when multiple cart items are passed to Paypal. To avoid the error completely I disable the Transfer Cart Line items option.
answered Apr 25 '15 at 14:21
paj
2,60521026
2,60521026
add a comment |
add a comment |
You can try our fix:
https://github.com/magento-hackathon/PaypalRoundBugfix
Afaik the problem with
setting transfer cart line items to No
is, that PayPal doesn't then insure your stuff against the customer, so if you are a fraud, the customer doesn'T get their money back from paypal - AFAIK.
Is Paypal accept INR as a base currency, if not how can I use Paypal if my base currency INR?
– Gem
Jul 28 '17 at 9:12
add a comment |
You can try our fix:
https://github.com/magento-hackathon/PaypalRoundBugfix
Afaik the problem with
setting transfer cart line items to No
is, that PayPal doesn't then insure your stuff against the customer, so if you are a fraud, the customer doesn'T get their money back from paypal - AFAIK.
Is Paypal accept INR as a base currency, if not how can I use Paypal if my base currency INR?
– Gem
Jul 28 '17 at 9:12
add a comment |
You can try our fix:
https://github.com/magento-hackathon/PaypalRoundBugfix
Afaik the problem with
setting transfer cart line items to No
is, that PayPal doesn't then insure your stuff against the customer, so if you are a fraud, the customer doesn'T get their money back from paypal - AFAIK.
You can try our fix:
https://github.com/magento-hackathon/PaypalRoundBugfix
Afaik the problem with
setting transfer cart line items to No
is, that PayPal doesn't then insure your stuff against the customer, so if you are a fraud, the customer doesn'T get their money back from paypal - AFAIK.
answered Jan 3 '16 at 16:29
Gul Web Network
1,205911
1,205911
Is Paypal accept INR as a base currency, if not how can I use Paypal if my base currency INR?
– Gem
Jul 28 '17 at 9:12
add a comment |
Is Paypal accept INR as a base currency, if not how can I use Paypal if my base currency INR?
– Gem
Jul 28 '17 at 9:12
Is Paypal accept INR as a base currency, if not how can I use Paypal if my base currency INR?
– Gem
Jul 28 '17 at 9:12
Is Paypal accept INR as a base currency, if not how can I use Paypal if my base currency INR?
– Gem
Jul 28 '17 at 9:12
add a comment |
The issue you faced is related to Magento bug due to which the logic of actions of TAX calculation is performed in the wrong order.
To resolve the problem, you just need to navigate to file:
app/code/core/Mage/Sales/Model/Config/Ordered.php
find _getSortedCollectorCodes() function and replace with below code
protected function _getSortedCollectorCodes()
{
if (Mage::app()->useCache('config')) {
$cachedData = Mage::app()->loadCache($this->_collectorsCacheKey);
if ($cachedData) {
return unserialize($cachedData);
}
}
$configArray = $this->_modelsConfig;
// invoke simple sorting if the first element contains the "sort_order" key
reset($configArray);
$element = current($configArray);
if (isset($element['sort_order']) && false) {
uasort($configArray, array($this, '_compareSortOrder'));
$sortedCollectors = array_keys($configArray);
} else {
$sortedCollectors = array_keys($configArray);
foreach ($configArray as $code => &$data) {
foreach ($data['before'] as $positionCode) {
if (!isset($configArray[$positionCode])) {
continue;
}
if (!in_array($code, $configArray[$positionCode]['after'], true)) {
// Also add additional after condition for related total,
// to keep it always after total with before value specified
$configArray[$positionCode]['after'] = $code;
}
$currentPosition = array_search($code, $sortedCollectors, true);
$desiredPosition = array_search($positionCode, $sortedCollectors, true);
if ($currentPosition > $desiredPosition) {
// Only if current position is not corresponding to before condition
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
array_splice($sortedCollectors, $desiredPosition, 0, $code); // Add at new position
}
}
}
// Sort out totals with after position specified
foreach ($configArray as $code => &$data) {
$maxAfter = null;
$currentPosition = array_search($code, $sortedCollectors, true);
foreach ($data['after'] as $positionCode) {
$maxAfter = max($maxAfter, array_search($positionCode, $sortedCollectors, true));
}
if ($maxAfter !== null && $maxAfter > $currentPosition) {
// Moves only if it is in front of after total
array_splice($sortedCollectors, $maxAfter + 1, 0, $code); // Add at new position
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
}
}
}
if (Mage::app()->useCache('config')) {
Mage::app()->saveCache(serialize($sortedCollectors), $this->_collectorsCacheKey, array(
Mage_Core_Model_Config::CACHE_TAG
)
);
}
return $sortedCollectors;
}
Note : Please override core file. Do not change core file. Clear cache
add a comment |
The issue you faced is related to Magento bug due to which the logic of actions of TAX calculation is performed in the wrong order.
To resolve the problem, you just need to navigate to file:
app/code/core/Mage/Sales/Model/Config/Ordered.php
find _getSortedCollectorCodes() function and replace with below code
protected function _getSortedCollectorCodes()
{
if (Mage::app()->useCache('config')) {
$cachedData = Mage::app()->loadCache($this->_collectorsCacheKey);
if ($cachedData) {
return unserialize($cachedData);
}
}
$configArray = $this->_modelsConfig;
// invoke simple sorting if the first element contains the "sort_order" key
reset($configArray);
$element = current($configArray);
if (isset($element['sort_order']) && false) {
uasort($configArray, array($this, '_compareSortOrder'));
$sortedCollectors = array_keys($configArray);
} else {
$sortedCollectors = array_keys($configArray);
foreach ($configArray as $code => &$data) {
foreach ($data['before'] as $positionCode) {
if (!isset($configArray[$positionCode])) {
continue;
}
if (!in_array($code, $configArray[$positionCode]['after'], true)) {
// Also add additional after condition for related total,
// to keep it always after total with before value specified
$configArray[$positionCode]['after'] = $code;
}
$currentPosition = array_search($code, $sortedCollectors, true);
$desiredPosition = array_search($positionCode, $sortedCollectors, true);
if ($currentPosition > $desiredPosition) {
// Only if current position is not corresponding to before condition
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
array_splice($sortedCollectors, $desiredPosition, 0, $code); // Add at new position
}
}
}
// Sort out totals with after position specified
foreach ($configArray as $code => &$data) {
$maxAfter = null;
$currentPosition = array_search($code, $sortedCollectors, true);
foreach ($data['after'] as $positionCode) {
$maxAfter = max($maxAfter, array_search($positionCode, $sortedCollectors, true));
}
if ($maxAfter !== null && $maxAfter > $currentPosition) {
// Moves only if it is in front of after total
array_splice($sortedCollectors, $maxAfter + 1, 0, $code); // Add at new position
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
}
}
}
if (Mage::app()->useCache('config')) {
Mage::app()->saveCache(serialize($sortedCollectors), $this->_collectorsCacheKey, array(
Mage_Core_Model_Config::CACHE_TAG
)
);
}
return $sortedCollectors;
}
Note : Please override core file. Do not change core file. Clear cache
add a comment |
The issue you faced is related to Magento bug due to which the logic of actions of TAX calculation is performed in the wrong order.
To resolve the problem, you just need to navigate to file:
app/code/core/Mage/Sales/Model/Config/Ordered.php
find _getSortedCollectorCodes() function and replace with below code
protected function _getSortedCollectorCodes()
{
if (Mage::app()->useCache('config')) {
$cachedData = Mage::app()->loadCache($this->_collectorsCacheKey);
if ($cachedData) {
return unserialize($cachedData);
}
}
$configArray = $this->_modelsConfig;
// invoke simple sorting if the first element contains the "sort_order" key
reset($configArray);
$element = current($configArray);
if (isset($element['sort_order']) && false) {
uasort($configArray, array($this, '_compareSortOrder'));
$sortedCollectors = array_keys($configArray);
} else {
$sortedCollectors = array_keys($configArray);
foreach ($configArray as $code => &$data) {
foreach ($data['before'] as $positionCode) {
if (!isset($configArray[$positionCode])) {
continue;
}
if (!in_array($code, $configArray[$positionCode]['after'], true)) {
// Also add additional after condition for related total,
// to keep it always after total with before value specified
$configArray[$positionCode]['after'] = $code;
}
$currentPosition = array_search($code, $sortedCollectors, true);
$desiredPosition = array_search($positionCode, $sortedCollectors, true);
if ($currentPosition > $desiredPosition) {
// Only if current position is not corresponding to before condition
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
array_splice($sortedCollectors, $desiredPosition, 0, $code); // Add at new position
}
}
}
// Sort out totals with after position specified
foreach ($configArray as $code => &$data) {
$maxAfter = null;
$currentPosition = array_search($code, $sortedCollectors, true);
foreach ($data['after'] as $positionCode) {
$maxAfter = max($maxAfter, array_search($positionCode, $sortedCollectors, true));
}
if ($maxAfter !== null && $maxAfter > $currentPosition) {
// Moves only if it is in front of after total
array_splice($sortedCollectors, $maxAfter + 1, 0, $code); // Add at new position
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
}
}
}
if (Mage::app()->useCache('config')) {
Mage::app()->saveCache(serialize($sortedCollectors), $this->_collectorsCacheKey, array(
Mage_Core_Model_Config::CACHE_TAG
)
);
}
return $sortedCollectors;
}
Note : Please override core file. Do not change core file. Clear cache
The issue you faced is related to Magento bug due to which the logic of actions of TAX calculation is performed in the wrong order.
To resolve the problem, you just need to navigate to file:
app/code/core/Mage/Sales/Model/Config/Ordered.php
find _getSortedCollectorCodes() function and replace with below code
protected function _getSortedCollectorCodes()
{
if (Mage::app()->useCache('config')) {
$cachedData = Mage::app()->loadCache($this->_collectorsCacheKey);
if ($cachedData) {
return unserialize($cachedData);
}
}
$configArray = $this->_modelsConfig;
// invoke simple sorting if the first element contains the "sort_order" key
reset($configArray);
$element = current($configArray);
if (isset($element['sort_order']) && false) {
uasort($configArray, array($this, '_compareSortOrder'));
$sortedCollectors = array_keys($configArray);
} else {
$sortedCollectors = array_keys($configArray);
foreach ($configArray as $code => &$data) {
foreach ($data['before'] as $positionCode) {
if (!isset($configArray[$positionCode])) {
continue;
}
if (!in_array($code, $configArray[$positionCode]['after'], true)) {
// Also add additional after condition for related total,
// to keep it always after total with before value specified
$configArray[$positionCode]['after'] = $code;
}
$currentPosition = array_search($code, $sortedCollectors, true);
$desiredPosition = array_search($positionCode, $sortedCollectors, true);
if ($currentPosition > $desiredPosition) {
// Only if current position is not corresponding to before condition
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
array_splice($sortedCollectors, $desiredPosition, 0, $code); // Add at new position
}
}
}
// Sort out totals with after position specified
foreach ($configArray as $code => &$data) {
$maxAfter = null;
$currentPosition = array_search($code, $sortedCollectors, true);
foreach ($data['after'] as $positionCode) {
$maxAfter = max($maxAfter, array_search($positionCode, $sortedCollectors, true));
}
if ($maxAfter !== null && $maxAfter > $currentPosition) {
// Moves only if it is in front of after total
array_splice($sortedCollectors, $maxAfter + 1, 0, $code); // Add at new position
array_splice($sortedCollectors, $currentPosition, 1); // Removes existent
}
}
}
if (Mage::app()->useCache('config')) {
Mage::app()->saveCache(serialize($sortedCollectors), $this->_collectorsCacheKey, array(
Mage_Core_Model_Config::CACHE_TAG
)
);
}
return $sortedCollectors;
}
Note : Please override core file. Do not change core file. Clear cache
answered Apr 13 '18 at 10:17
Mukesh Prajapati
1,140415
1,140415
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f64790%2fmagento-1-9-1-and-paypal-error-10413%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is your store run in india, Make sure your products price as the dollar, because of Paypal support only dollar price and your default currency should be a dollar.
– Gem
Apr 13 '18 at 11:10