[ 
https://issues.apache.org/jira/browse/OFBIZ-3895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902326#action_12902326
 ] 

Liang Zhang commented on OFBIZ-3895:
------------------------------------

Great thanks to BJ Freeman.

This java file in r949465 is an event controller which calls services in 
account to process Express PayPal payments. They are not 2 Express Paypal 
checkouts. 

I added those codes to handle the error according to your advice. Yes, it 
works. And it's a cleaner way to handle errors I think.

            if (errorMessages.containsKey("10001")) {
                // Token has expired, get a new one
                cart.setAttribute("payPalCheckoutToken", null);
                return PayPalServices.setExpressCheckout(dctx, context);
            }

But unfortunately the 'Internal Error 10001' can be caused by not only the 
token, also other unclear stuffs. 
The service may come into an endless loop if it does not work after removed the 
attribute "payPalCheckoutToken" and called the service again.

> Cannot be redirected to PayPal
> ------------------------------
>
>                 Key: OFBIZ-3895
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3895
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 10.04, SVN trunk
>            Reporter: Liang Zhang
>         Attachments: PayPalRedirecting.patch
>
>
> It gets an 'internal error 10001' from Paypal in service 
> 'payPalSetExpressCheckout' if you have already run this service be  been 
> redirected.
> Comment these three lines out will move away this error.
> if (UtilValidate.isNotEmpty(token)) {
>             encoder.add("TOKEN", token);
>         }
> There is also another issue. The customer can update his/her shopping cart 
> then submits order successfully after he/she confirmed the payment and was 
> redirected back to ecommerce site. That means the customer can place an order 
> of the value which is higher than the total amount he/she confirmed in 
> Paypal. A check shall be added to avoid this issue because that would loose 
> money.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to