开发者

PayPal Orders Cancelling Automatically In Magento

开发者 https://www.devze.com 2023-02-01 15:12 出处:网络
I have this weird issue in Magento when someone places an order using PayPal Express Checkout. Every so often an order will come in and then the order gets canceled a few seconds later. The comment th

I have this weird issue in Magento when someone places an order using PayPal Express Checkout. Every so often an order will come in and then the order gets canceled a few seconds later. The comment that is left is as follows:

Canceled order online. Amount: $59.23. Transaction ID: "XXXXXXXXXXXXXXXXX-void".

(ID blanked out just in case)

Now our customers are swearing they did not cancel their orders and when we ask PayPal 开发者_如何学Cthey say it is a problem on our side.

Has anyone heard of this issue and do you know of a fix? I am running Magento Enterprise 1.8.


I've run into a similar issue. I tracked it down to those users who checked out with PayPal Express and do not have a PayPal account. The issue and the fix appear here:

http://www.magentocommerce.com/bug-tracking/issue/?issue=9894

The face that all users do not encounter the error may be related to the with/without a PayPal account status.


Integrating Magento with PayPal Express (not PayPal standard) the users can buy our store's products.

However, there are two different situations: 1) If the customer has got a Paypal account, he will be able to finish the buy process without issues. 2) However, if the customer hasn't got a Paypal account, or if he doesn't want to use it, and prefers to buy the products using his credit card without use the PayPal credentials, then the process will finish with the following error:

"This payment cannot be processed using your paypal account at this time".

The problem is the seller will receive the money, but the customer will think just the opposite.

This issue has been discused and confirmed with PayPal support team.

The real issue is during the buy process, the "DoExpressCheckoutPayment" PayPal's function is called. However, when the buy process finish with this error, a parameter called "successpageredirectrequested" is set to "true". This flag indicates whether you need to redirect the customer to back to PayPal after completing the transaction. However, this is an obsolete PayPal's behavior, and should't be used.

As Magento is using this parameter's function, when he tries to redirect again to PayPal (that's what "successpageredirectrequested" set to true is doing) PayPal will return this error.

We can fix it making a little change in Magento's source code, at app/code/core/Mage/Paypal/Controller/Express/Abstract.php

Just changing the function "public function placeOrderAction()". Look for the following code inside this function:

// redirect if PayPal specified some URL (for example, to Giropay bank)
$url = $this->_checkout->getRedirectUrl();
if ($url) {
$this->getResponse()->setRedirect($url);
return;
}
$this->_initToken(false); // no need in token anymore
$this->_redirect(?checkout/onepage/success?);
return;
}

We just need to comment the "if", just like this:

//if ($url) {
//$this->getResponse()->setRedirect($url);
// return;
//}

That's enough to fix the issue. However, this is not a current fix, and this should be reviewed by Magento's programmers just to fix it in the Magento's new versions.

0

精彩评论

暂无评论...
验证码 换一张
取 消