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 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. |
[ https://issues.apache.org/jira/browse/OFBIZ-3895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Liang Zhang updated OFBIZ-3895: ------------------------------- Attachment: PayPalRedirecting.patch This patch fixes the issue of internal error 10001 > 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. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901767#action_12901767 ] BJ Freeman commented on OFBIZ-3895: ----------------------------------- there seems to be two paypal express checkouts. one by scott in accounting and one by asish in order. http://svn.apache.org/viewvc?view=revision&revision=949465 I brougth this up in the dev list to let them resolve this issue. you might want to look at the code in 949465. > 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. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901774#action_12901774 ] BJ Freeman commented on OFBIZ-3895: ----------------------------------- do a search in the file you are patching. you will see many references to payPalCheckoutToken specificially if (UtilValidate.isNotEmpty(errorMessages)) { if (errorMessages.containsKey("10411")) { // Token has expired, get a new one cart.setAttribute("payPalCheckoutToken", null); return PayPalServices.setExpressCheckout(dctx, context); } return ServiceUtil.returnError(UtilMisc.toList(errorMessages.values())); } this is how your 10001 error should be handled.by that I mean evaluate the error code and make a determination as to what to do. hope that helps. > 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. |
In reply to this post by Nicolas Malin (Jira)
[ 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. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902417#action_12902417 ] BJ Freeman commented on OFBIZ-3895: ----------------------------------- two things. I am not sure, since I don't know what the errorcode is, that what you do to resolve is correct. The code I gave was an example of how to handle the error. Paypal allows passing of data that is not used by paypal but returned to the calling code. It is important to understand what payPalCheckoutToken does in ofbiz. > 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. |
Free forum by Nabble | Edit this page |