[jira] Updated: (OFBIZ-3895) Cannot be redirected to PayPal

2010-08-24 Thread Liang Zhang (JIRA)

 [ 
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.



Re: svn commit: r949465 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

2010-08-24 Thread BJ Freeman

I was checking out the jira OFBIZ-3895
and ran across this in orders.
there is also one done by Scott in accounting.
should these be merged and put in one place.

=
BJ Freeman  http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  
http://www.businessesnetwork.com/automation/viewforum.php?f=52
Specialtymarket.com  http://www.specialtymarket.com/
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


ash...@apache.org sent the following on 5/29/2010 8:25 PM:

Author: ashish
Date: Sun May 30 03:25:35 2010
New Revision: 949465

URL: http://svn.apache.org/viewvc?rev=949465view=rev
Log:
The paypal checkout should always redirect to sandbox while you are in production 
environment. Contribution from Divesh  Pranay - Thanks Guys.

Modified:
 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=949465r1=949464r2=949465view=diff
==
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 Sun May 30 03:25:35 2010
@@ -81,13 +81,37 @@ public class ExpressCheckoutEvents {
  }

  public static String expressCheckoutRedirect(HttpServletRequest request, 
HttpServletResponse response) {
+Delegator delegator = (Delegator) request.getAttribute(delegator);
  ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
  String token = (String) cart.getAttribute(payPalCheckoutToken);
+String paymentGatewayConfigId = null;
+GenericValue payPalGatewayConfig = null;
+String productStoreId = null;
  if (UtilValidate.isEmpty(token)) {
  Debug.logError(No ExpressCheckout token found in cart, you must do a 
successful setExpressCheckout before redirecting., module);
  return error;
  }
-StringBuilder redirectUrl = new 
StringBuilder(https://www.sandbox.paypal.com/cgi-bin/webscr;);
+if (cart != null) {
+productStoreId = cart.getProductStoreId();
+}
+if (productStoreId != null) {
+GenericValue payPalPaymentSetting = 
ProductStoreWorker.getProductStorePaymentSetting(delegator, productStoreId, 
EXT_PAYPAL, null, true);
+if (payPalPaymentSetting != null) {
+paymentGatewayConfigId = 
payPalPaymentSetting.getString(paymentGatewayConfigId);
+}
+}
+if (paymentGatewayConfigId != null) {
+try {
+payPalGatewayConfig = delegator.findOne(PaymentGatewayPayPal, true, 
paymentGatewayConfigId, paymentGatewayConfigId);
+} catch (GenericEntityException e) {
+Debug.logError(e, module);
+}
+}
+if (payPalGatewayConfig == null) {
+request.setAttribute(_EVENT_MESSAGE_, Couldn't retrieve a 
PaymentGatewayConfigPayPal record for Express Checkout, cannot continue.);
+return error;
+}
+StringBuilder redirectUrl = new 
StringBuilder(payPalGatewayConfig.getString(redirectUrl));
  redirectUrl.append(?cmd=_express-checkouttoken=);
  redirectUrl.append(token);
  try {







[jira] Commented: (OFBIZ-3895) Cannot be redirected to PayPal

2010-08-24 Thread BJ Freeman (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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=revisionrevision=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.



[jira] Commented: (OFBIZ-3894) Refactor Email handling

2010-08-24 Thread Bruno Busco (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12901773#action_12901773
 ] 

Bruno Busco commented on OFBIZ-3894:


I perfectly agree on having a content based email data model similar to the one 
that you suggest.
A set of screens in the content (?) component could allow the user to browse 
between the available email templates and define new ones.

 Refactor Email handling
 ---

 Key: OFBIZ-3894
 URL: https://issues.apache.org/jira/browse/OFBIZ-3894
 Project: OFBiz
  Issue Type: Improvement
  Components: ALL COMPONENTS
Affects Versions: SVN trunk
Reporter: BJ Freeman
Priority: Minor
 Fix For: SVN trunk

   Original Estimate: 1344h
  Remaining Estimate: 1344h

 with the addition of the Website for each component 
 1) create product store for Order entry, or use the B2C product store.
 2) move the email  widgets from ecommerce to order compontent.
 3) modify the seed data so that Order entry has it own emails from order 
 component.this would be to add emails to 
 note: as I go through the different items  this is turning out to be a bigger 
 project than I first anticipated.
 so consider this so far just ideas.
 Maybe break down in to small tasks as I have time to do something.

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



[jira] Commented: (OFBIZ-3895) Cannot be redirected to PayPal

2010-08-24 Thread BJ Freeman (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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.



[jira] Commented: (OFBIZ-3897) Wicket component

2010-08-24 Thread Jacques Le Roux (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12901778#action_12901778
 ] 

Jacques Le Roux commented on OFBIZ-3897:


For fun: impressive http://wicketstuff.org/wicket14/kitten-captcha/

 Wicket component
 

 Key: OFBIZ-3897
 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
 Project: OFBiz
  Issue Type: New Feature
  Components: framework
Affects Versions: SVN trunk
Reporter: james yong
Priority: Minor
 Fix For: SVN trunk

 Attachments: patch.txt


 This component allow developers to use Wicket framework

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



[jira] Updated: (OFBIZ-3247) State field is missing - Not in List or N/A

2010-08-24 Thread Jacques Le Roux (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux updated OFBIZ-3247:
---

Issue Type: Improvement  (was: Bug)

 State field is missing - Not in List or N/A
 ---

 Key: OFBIZ-3247
 URL: https://issues.apache.org/jira/browse/OFBIZ-3247
 Project: OFBiz
  Issue Type: Improvement
  Components: party
Affects Versions: SVN trunk
Reporter: Sam Hamilton
Priority: Trivial
 Attachments: OFBIZ-3247.patch


 When you are creating an employee on 
 https://demo.ofbiz.org/partymgr/control/NewEmployee there is no field in the 
 drop down box for Not Applicable, just in case you cant find the state you 
 wanted, I was trying to find an English counties at the time.

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



[jira] Created: (OFBIZ-3899) depreciation methood not found

2010-08-24 Thread Shereen Ashraf (JIRA)
depreciation methood not found
--

 Key: OFBIZ-3899
 URL: https://issues.apache.org/jira/browse/OFBIZ-3899
 Project: OFBiz
  Issue Type: Bug
  Components: accounting
Affects Versions: Release 09.04
 Environment: Linux
Reporter: Shereen Ashraf
 Fix For: Release Branch 09.04


I'm trying to create a fixed asset but I'm not able to view the deprectation 
report for my assets although I entered the dates and purchase and salvage 
value.
I receive a method that tells me that deprectaion method not found.
the depreciation report works with the demo fixed asset called : 
DEMO_PROD_EQUIPMT_1 and also DEMO_PROD_EQUIPMT_2
what's the reason behind this ?
how can I make  the depreciation reports work for all my assets

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



SVN error

2010-08-24 Thread Jacques Le Roux

Hi,

Am I alone to get this error (for almost 1 hour now)?

Error: OPTIONS of 'https://svn.apache.org/repos/asf/ofbiz/trunk': could not connect to   


Thanks

Jacques



Re: SVN error

2010-08-24 Thread Jacques Le Roux

Forgot to say that there anything at http://monitoring.apache.org/status/

From: Jacques Le Roux jacques.le.r...@les7arts.com

Hi,

Am I alone to get this error (for almost 1 hour now)?

Error: OPTIONS of 'https://svn.apache.org/repos/asf/ofbiz/trunk': could not connect to   


Thanks

Jacques




Re: SVN error

2010-08-24 Thread Jacques Le Roux

Actually it's erractic, sometimes, for a short period of time,  there is an 
error for helios.apache.org (SSH)
CRITICAL - Socket timeout after 10 seconds 


If someone confirms, I will alert infra team as it seems nobody worryies

Thanks

Jacques


From: Jacques Le Roux jacques.le.r...@les7arts.com

Forgot to say that there anything at http://monitoring.apache.org/status/

From: Jacques Le Roux jacques.le.r...@les7arts.com

Hi,

Am I alone to get this error (for almost 1 hour now)?

Error: OPTIONS of 'https://svn.apache.org/repos/asf/ofbiz/trunk': could not connect to   


Thanks

Jacques




[jira] Commented: (OFBIZ-3896) BIRT charts are not rendered

2010-08-24 Thread Jacques Le Roux (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12901823#action_12901823
 ] 

Jacques Le Roux commented on OFBIZ-3896:


Hi Erwan,

As this not been fixed at r988024?


 BIRT charts are not rendered
 

 Key: OFBIZ-3896
 URL: https://issues.apache.org/jira/browse/OFBIZ-3896
 Project: OFBiz
  Issue Type: Sub-task
  Components: framework
 Environment: Ubuntu 10.04
Reporter: Chatree Srichart
Assignee: Erwan de FERRIERES
 Attachments: birtExample.diff, 
 org.eclipse.birt.chart.reportitem_2.6.0.v20100604.jar


 I create this issue for get BIRT problem report. If anyone found problem 
 about BIRT component, please add comment here.
 Regards,
 Chatree Srichart

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



[jira] Commented: (OFBIZ-3896) BIRT charts are not rendered

2010-08-24 Thread Erwan de FERRIERES (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12901830#action_12901830
 ] 

Erwan de FERRIERES commented on OFBIZ-3896:
---

Hi Jacques,

no, I got this cryptic error : WARNING: unsupported image type:Unknown, and I'm 
no Birt expert, I don't know what to do...

Cheers,

 BIRT charts are not rendered
 

 Key: OFBIZ-3896
 URL: https://issues.apache.org/jira/browse/OFBIZ-3896
 Project: OFBiz
  Issue Type: Sub-task
  Components: framework
 Environment: Ubuntu 10.04
Reporter: Chatree Srichart
Assignee: Erwan de FERRIERES
 Attachments: birtExample.diff, 
 org.eclipse.birt.chart.reportitem_2.6.0.v20100604.jar


 I create this issue for get BIRT problem report. If anyone found problem 
 about BIRT component, please add comment here.
 Regards,
 Chatree Srichart

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



Re: SVN error

2010-08-24 Thread Matthieu Bollot
Le mardi 24 août 2010 à 13:19 +0200, Jacques Le Roux a écrit :
 Actually it's erractic, sometimes, for a short period of time,  there is an 
 error for helios.apache.org (SSH)
 CRITICAL - Socket timeout after 10 seconds 
 
 If someone confirms, I will alert infra team as it seems nobody worryies
 
 Thanks
 
 Jacques
hi, 
do you still have the problem ? it seems to work fine here.

-- 
Matthieu BOLLOT
www.nereide.biz



[jira] Resolved: (OFBIZ-3247) State field is missing - Not in List or N/A

2010-08-24 Thread Jacques Le Roux (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux resolved OFBIZ-3247.


 Assignee: Jacques Le Roux
Fix Version/s: SVN trunk
   Resolution: Fixed

Thanks Sam,

As Ankit explained, as we can't have and OR constraint in entity-constraint 
(but using IN or BETWEEN operators) and as we have already Geo 
abbreviation=_NA_ geoCode=_NA_ geoId=_NA_ geoName=Not Applicable/ in 
GeoData.xml and it would not make sense to have it for countries, states, 
provinces, etc. So I believe Ankit's solution would the best we can have in 
this case.

But I finally decided to use the new Dependent Dropdowns mechanim. It's 
commited at r988508 in trunk. As I don't consider this a bug, I don't 
backported anywhere.

Also note Sam that, even if the redirect should continue to work, the real ULR 
is now https://demo-trunk.ofbiz.apache.org:8443/partymgr/control/NewEmployee

 State field is missing - Not in List or N/A
 ---

 Key: OFBIZ-3247
 URL: https://issues.apache.org/jira/browse/OFBIZ-3247
 Project: OFBiz
  Issue Type: Improvement
  Components: party
Affects Versions: SVN trunk
Reporter: Sam Hamilton
Assignee: Jacques Le Roux
Priority: Trivial
 Fix For: SVN trunk

 Attachments: OFBIZ-3247.patch


 When you are creating an employee on 
 https://demo.ofbiz.org/partymgr/control/NewEmployee there is no field in the 
 drop down box for Not Applicable, just in case you cant find the state you 
 wanted, I was trying to find an English counties at the time.

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



Re: SVN error

2010-08-24 Thread Jacques Le Roux

Thanks Matthieu,

Yes it seems to work well now for SVN
But I as saw another same error at helios.apache.org, I sent a msg to the infra 
team

Jacques

From: Matthieu Bollot matthieu.bol...@nereide.biz

Le mardi 24 août 2010 à 13:19 +0200, Jacques Le Roux a écrit :

Actually it's erractic, sometimes, for a short period of time,  there is an 
error for helios.apache.org (SSH)
CRITICAL - Socket timeout after 10 seconds

If someone confirms, I will alert infra team as it seems nobody worryies

Thanks

Jacques

hi,
do you still have the problem ? it seems to work fine here.

--
Matthieu BOLLOT
www.nereide.biz






[jira] Commented: (OFBIZ-3247) State field is missing - Not in List or N/A

2010-08-24 Thread Sam Hamilton (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12901907#action_12901907
 ] 

Sam Hamilton commented on OFBIZ-3247:
-

Brilliant - many thanks to all! 

Sam

 State field is missing - Not in List or N/A
 ---

 Key: OFBIZ-3247
 URL: https://issues.apache.org/jira/browse/OFBIZ-3247
 Project: OFBiz
  Issue Type: Improvement
  Components: party
Affects Versions: SVN trunk
Reporter: Sam Hamilton
Assignee: Jacques Le Roux
Priority: Trivial
 Fix For: SVN trunk

 Attachments: OFBIZ-3247.patch


 When you are creating an employee on 
 https://demo.ofbiz.org/partymgr/control/NewEmployee there is no field in the 
 drop down box for Not Applicable, just in case you cant find the state you 
 wanted, I was trying to find an English counties at the time.

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



[jira] Closed: (OFBIZ-3247) State field is missing - Not in List or N/A

2010-08-24 Thread Sam Hamilton (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sam Hamilton closed OFBIZ-3247.
---


 State field is missing - Not in List or N/A
 ---

 Key: OFBIZ-3247
 URL: https://issues.apache.org/jira/browse/OFBIZ-3247
 Project: OFBiz
  Issue Type: Improvement
  Components: party
Affects Versions: SVN trunk
Reporter: Sam Hamilton
Assignee: Jacques Le Roux
Priority: Trivial
 Fix For: SVN trunk

 Attachments: OFBIZ-3247.patch


 When you are creating an employee on 
 https://demo.ofbiz.org/partymgr/control/NewEmployee there is no field in the 
 drop down box for Not Applicable, just in case you cant find the state you 
 wanted, I was trying to find an English counties at the time.

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



Re: svn commit: r949465 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

2010-08-24 Thread Scott Gray
There are two Express Checkout integrations, one for PayFlow Pro and another 
for the standard PayPal API.  However, both of them use ExpressCheckoutEvents 
so there is really nothing to be merged.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 24/08/2010, at 8:13 PM, BJ Freeman wrote:

 I was checking out the jira OFBIZ-3895
 and ran across this in orders.
 there is also one done by Scott in accounting.
 should these be merged and put in one place.
 
 =
 BJ Freeman  http://bjfreeman.elance.com
 Strategic Power Office with Supplier Automation  
 http://www.businessesnetwork.com/automation/viewforum.php?f=52
 Specialtymarket.com  http://www.specialtymarket.com/
 Systems Integrator-- Glad to Assist
 
 Chat  Y! messenger: bjfr33man
 
 
 ash...@apache.org sent the following on 5/29/2010 8:25 PM:
 Author: ashish
 Date: Sun May 30 03:25:35 2010
 New Revision: 949465
 
 URL: http://svn.apache.org/viewvc?rev=949465view=rev
 Log:
 The paypal checkout should always redirect to sandbox while you are in 
 production environment. Contribution from Divesh  Pranay - Thanks Guys.
 
 Modified:
 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 
 Modified: 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 URL: 
 http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=949465r1=949464r2=949465view=diff
 ==
 --- 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
  (original)
 +++ 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
  Sun May 30 03:25:35 2010
 @@ -81,13 +81,37 @@ public class ExpressCheckoutEvents {
  }
 
  public static String expressCheckoutRedirect(HttpServletRequest 
 request, HttpServletResponse response) {
 +Delegator delegator = (Delegator) request.getAttribute(delegator);
  ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
  String token = (String) cart.getAttribute(payPalCheckoutToken);
 +String paymentGatewayConfigId = null;
 +GenericValue payPalGatewayConfig = null;
 +String productStoreId = null;
  if (UtilValidate.isEmpty(token)) {
  Debug.logError(No ExpressCheckout token found in cart, you 
 must do a successful setExpressCheckout before redirecting., module);
  return error;
  }
 -StringBuilder redirectUrl = new 
 StringBuilder(https://www.sandbox.paypal.com/cgi-bin/webscr;);
 +if (cart != null) {
 +productStoreId = cart.getProductStoreId();
 +}
 +if (productStoreId != null) {
 +GenericValue payPalPaymentSetting = 
 ProductStoreWorker.getProductStorePaymentSetting(delegator, productStoreId, 
 EXT_PAYPAL, null, true);
 +if (payPalPaymentSetting != null) {
 +paymentGatewayConfigId = 
 payPalPaymentSetting.getString(paymentGatewayConfigId);
 +}
 +}
 +if (paymentGatewayConfigId != null) {
 +try {
 +payPalGatewayConfig = 
 delegator.findOne(PaymentGatewayPayPal, true, paymentGatewayConfigId, 
 paymentGatewayConfigId);
 +} catch (GenericEntityException e) {
 +Debug.logError(e, module);
 +}
 +}
 +if (payPalGatewayConfig == null) {
 +request.setAttribute(_EVENT_MESSAGE_, Couldn't retrieve a 
 PaymentGatewayConfigPayPal record for Express Checkout, cannot continue.);
 +return error;
 +}
 +StringBuilder redirectUrl = new 
 StringBuilder(payPalGatewayConfig.getString(redirectUrl));
  redirectUrl.append(?cmd=_express-checkouttoken=);
  redirectUrl.append(token);
  try {
 
 
 
 



smime.p7s
Description: S/MIME cryptographic signature


Re: svn commit: r949465 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

2010-08-24 Thread BJ Freeman
since they are named different would not seem consistent to have all of 
them in one place?


Scott Gray sent the following on 8/24/2010 3:27 PM:

There are two Express Checkout integrations, one for PayFlow Pro and another 
for the standard PayPal API.  However, both of them use ExpressCheckoutEvents 
so there is really nothing to be merged.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 24/08/2010, at 8:13 PM, BJ Freeman wrote:


I was checking out the jira OFBIZ-3895
and ran across this in orders.
there is also one done by Scott in accounting.
should these be merged and put in one place.

=
BJ Freemanhttp://bjfreeman.elance.com
Strategic Power Office with Supplier 
Automationhttp://www.businessesnetwork.com/automation/viewforum.php?f=52
Specialtymarket.comhttp://www.specialtymarket.com/
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


ash...@apache.org sent the following on 5/29/2010 8:25 PM:

Author: ashish
Date: Sun May 30 03:25:35 2010
New Revision: 949465

URL: http://svn.apache.org/viewvc?rev=949465view=rev
Log:
The paypal checkout should always redirect to sandbox while you are in production 
environment. Contribution from Divesh   Pranay - Thanks Guys.

Modified:
 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=949465r1=949464r2=949465view=diff
==
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 Sun May 30 03:25:35 2010
@@ -81,13 +81,37 @@ public class ExpressCheckoutEvents {
  }

  public static String expressCheckoutRedirect(HttpServletRequest request, 
HttpServletResponse response) {
+Delegator delegator = (Delegator) request.getAttribute(delegator);
  ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
  String token = (String) cart.getAttribute(payPalCheckoutToken);
+String paymentGatewayConfigId = null;
+GenericValue payPalGatewayConfig = null;
+String productStoreId = null;
  if (UtilValidate.isEmpty(token)) {
  Debug.logError(No ExpressCheckout token found in cart, you must do a 
successful setExpressCheckout before redirecting., module);
  return error;
  }
-StringBuilder redirectUrl = new 
StringBuilder(https://www.sandbox.paypal.com/cgi-bin/webscr;);
+if (cart != null) {
+productStoreId = cart.getProductStoreId();
+}
+if (productStoreId != null) {
+GenericValue payPalPaymentSetting = 
ProductStoreWorker.getProductStorePaymentSetting(delegator, productStoreId, 
EXT_PAYPAL, null, true);
+if (payPalPaymentSetting != null) {
+paymentGatewayConfigId = 
payPalPaymentSetting.getString(paymentGatewayConfigId);
+}
+}
+if (paymentGatewayConfigId != null) {
+try {
+payPalGatewayConfig = delegator.findOne(PaymentGatewayPayPal, true, 
paymentGatewayConfigId, paymentGatewayConfigId);
+} catch (GenericEntityException e) {
+Debug.logError(e, module);
+}
+}
+if (payPalGatewayConfig == null) {
+request.setAttribute(_EVENT_MESSAGE_, Couldn't retrieve a 
PaymentGatewayConfigPayPal record for Express Checkout, cannot continue.);
+return error;
+}
+StringBuilder redirectUrl = new 
StringBuilder(payPalGatewayConfig.getString(redirectUrl));
  redirectUrl.append(?cmd=_express-checkouttoken=);
  redirectUrl.append(token);
  try {









Re: svn commit: r949465 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

2010-08-24 Thread Scott Gray
I don't really know what you mean.
- The Payflow Pro Express Checkout payment processing stuff is in the original 
Payflow Processor, I don't see any reason to change that
- Everything else is in PayPalServices (if it is a service) or in 
ExpressCheckoutEvents (if it is an event method)

What is the issue exactly?

Regards
Scott

On 25/08/2010, at 12:03 PM, BJ Freeman wrote:

 since they are named different would not seem consistent to have all of them 
 in one place?
 
 Scott Gray sent the following on 8/24/2010 3:27 PM:
 There are two Express Checkout integrations, one for PayFlow Pro and another 
 for the standard PayPal API.  However, both of them use 
 ExpressCheckoutEvents so there is really nothing to be merged.
 
 Regards
 Scott
 
 HotWax Media
 http://www.hotwaxmedia.com
 
 On 24/08/2010, at 8:13 PM, BJ Freeman wrote:
 
 I was checking out the jira OFBIZ-3895
 and ran across this in orders.
 there is also one done by Scott in accounting.
 should these be merged and put in one place.
 
 =
 BJ Freemanhttp://bjfreeman.elance.com
 Strategic Power Office with Supplier 
 Automationhttp://www.businessesnetwork.com/automation/viewforum.php?f=52
 Specialtymarket.comhttp://www.specialtymarket.com/
 Systems Integrator-- Glad to Assist
 
 Chat  Y! messenger: bjfr33man
 
 
 ash...@apache.org sent the following on 5/29/2010 8:25 PM:
 Author: ashish
 Date: Sun May 30 03:25:35 2010
 New Revision: 949465
 
 URL: http://svn.apache.org/viewvc?rev=949465view=rev
 Log:
 The paypal checkout should always redirect to sandbox while you are in 
 production environment. Contribution from Divesh   Pranay - Thanks Guys.
 
 Modified:
 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 
 Modified: 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 URL: 
 http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=949465r1=949464r2=949465view=diff
 ==
 --- 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
  (original)
 +++ 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
  Sun May 30 03:25:35 2010
 @@ -81,13 +81,37 @@ public class ExpressCheckoutEvents {
  }
 
  public static String expressCheckoutRedirect(HttpServletRequest 
 request, HttpServletResponse response) {
 +Delegator delegator = (Delegator) 
 request.getAttribute(delegator);
  ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
  String token = (String) cart.getAttribute(payPalCheckoutToken);
 +String paymentGatewayConfigId = null;
 +GenericValue payPalGatewayConfig = null;
 +String productStoreId = null;
  if (UtilValidate.isEmpty(token)) {
  Debug.logError(No ExpressCheckout token found in cart, you 
 must do a successful setExpressCheckout before redirecting., module);
  return error;
  }
 -StringBuilder redirectUrl = new 
 StringBuilder(https://www.sandbox.paypal.com/cgi-bin/webscr;);
 +if (cart != null) {
 +productStoreId = cart.getProductStoreId();
 +}
 +if (productStoreId != null) {
 +GenericValue payPalPaymentSetting = 
 ProductStoreWorker.getProductStorePaymentSetting(delegator, 
 productStoreId, EXT_PAYPAL, null, true);
 +if (payPalPaymentSetting != null) {
 +paymentGatewayConfigId = 
 payPalPaymentSetting.getString(paymentGatewayConfigId);
 +}
 +}
 +if (paymentGatewayConfigId != null) {
 +try {
 +payPalGatewayConfig = 
 delegator.findOne(PaymentGatewayPayPal, true, paymentGatewayConfigId, 
 paymentGatewayConfigId);
 +} catch (GenericEntityException e) {
 +Debug.logError(e, module);
 +}
 +}
 +if (payPalGatewayConfig == null) {
 +request.setAttribute(_EVENT_MESSAGE_, Couldn't retrieve a 
 PaymentGatewayConfigPayPal record for Express Checkout, cannot continue.);
 +return error;
 +}
 +StringBuilder redirectUrl = new 
 StringBuilder(payPalGatewayConfig.getString(redirectUrl));
  redirectUrl.append(?cmd=_express-checkouttoken=);
  redirectUrl.append(token);
  try {
 
 
 
 
 



smime.p7s
Description: S/MIME cryptographic signature


Re: svn commit: r949465 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

2010-08-24 Thread BJ Freeman
Up until I found the file. om orders, I thought all gateway code was in 
accounting.
it is more if someone is looking for which gateway to use or to 
troubleshoot, without walking through the code.

it has more to-do with placing like code in the same place
from a functional point of view there is not difference.


=
BJ Freeman  http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  
http://www.businessesnetwork.com/automation/viewforum.php?f=52
Specialtymarket.com  http://www.specialtymarket.com/
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Scott Gray sent the following on 8/24/2010 5:32 PM:

I don't really know what you mean.
- The Payflow Pro Express Checkout payment processing stuff is in the original 
Payflow Processor, I don't see any reason to change that
- Everything else is in PayPalServices (if it is a service) or in 
ExpressCheckoutEvents (if it is an event method)

What is the issue exactly?

Regards
Scott

On 25/08/2010, at 12:03 PM, BJ Freeman wrote:


since they are named different would not seem consistent to have all of them in 
one place?

Scott Gray sent the following on 8/24/2010 3:27 PM:

There are two Express Checkout integrations, one for PayFlow Pro and another 
for the standard PayPal API.  However, both of them use ExpressCheckoutEvents 
so there is really nothing to be merged.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 24/08/2010, at 8:13 PM, BJ Freeman wrote:


I was checking out the jira OFBIZ-3895
and ran across this in orders.
there is also one done by Scott in accounting.
should these be merged and put in one place.

=
BJ Freemanhttp://bjfreeman.elance.com
Strategic Power Office with Supplier 
Automationhttp://www.businessesnetwork.com/automation/viewforum.php?f=52
Specialtymarket.comhttp://www.specialtymarket.com/
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


ash...@apache.org sent the following on 5/29/2010 8:25 PM:

Author: ashish
Date: Sun May 30 03:25:35 2010
New Revision: 949465

URL: http://svn.apache.org/viewvc?rev=949465view=rev
Log:
The paypal checkout should always redirect to sandbox while you are in production 
environment. Contribution from DiveshPranay - Thanks Guys.

Modified:
 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=949465r1=949464r2=949465view=diff
==
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 Sun May 30 03:25:35 2010
@@ -81,13 +81,37 @@ public class ExpressCheckoutEvents {
  }

  public static String expressCheckoutRedirect(HttpServletRequest request, 
HttpServletResponse response) {
+Delegator delegator = (Delegator) request.getAttribute(delegator);
  ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
  String token = (String) cart.getAttribute(payPalCheckoutToken);
+String paymentGatewayConfigId = null;
+GenericValue payPalGatewayConfig = null;
+String productStoreId = null;
  if (UtilValidate.isEmpty(token)) {
  Debug.logError(No ExpressCheckout token found in cart, you must do a 
successful setExpressCheckout before redirecting., module);
  return error;
  }
-StringBuilder redirectUrl = new 
StringBuilder(https://www.sandbox.paypal.com/cgi-bin/webscr;);
+if (cart != null) {
+productStoreId = cart.getProductStoreId();
+}
+if (productStoreId != null) {
+GenericValue payPalPaymentSetting = 
ProductStoreWorker.getProductStorePaymentSetting(delegator, productStoreId, 
EXT_PAYPAL, null, true);
+if (payPalPaymentSetting != null) {
+paymentGatewayConfigId = 
payPalPaymentSetting.getString(paymentGatewayConfigId);
+}
+}
+if (paymentGatewayConfigId != null) {
+try {
+payPalGatewayConfig = delegator.findOne(PaymentGatewayPayPal, true, 
paymentGatewayConfigId, paymentGatewayConfigId);
+} catch (GenericEntityException e) {
+Debug.logError(e, module);
+}
+}
+if (payPalGatewayConfig == null) {
+request.setAttribute(_EVENT_MESSAGE_, Couldn't retrieve a 
PaymentGatewayConfigPayPal record for Express Checkout, cannot continue.);
+return error;
+}
+StringBuilder redirectUrl = new 
StringBuilder(payPalGatewayConfig.getString(redirectUrl));
  

Re: svn commit: r949465 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

2010-08-24 Thread Scott Gray
All gateway code is in accounting, but keep in mind that Express Checkout 
involves more than just interacting with a gateway.  It also modifies the 
checkout process in a fairly major way and it makes no sense to include all of 
that in accounting, hence the events being in the order component.

Regards
Scott

On 25/08/2010, at 12:41 PM, BJ Freeman wrote:

 Up until I found the file. om orders, I thought all gateway code was in 
 accounting.
 it is more if someone is looking for which gateway to use or to troubleshoot, 
 without walking through the code.
 it has more to-do with placing like code in the same place
 from a functional point of view there is not difference.
 
 
 =
 BJ Freeman  http://bjfreeman.elance.com
 Strategic Power Office with Supplier Automation  
 http://www.businessesnetwork.com/automation/viewforum.php?f=52
 Specialtymarket.com  http://www.specialtymarket.com/
 Systems Integrator-- Glad to Assist
 
 Chat  Y! messenger: bjfr33man
 
 
 Scott Gray sent the following on 8/24/2010 5:32 PM:
 I don't really know what you mean.
 - The Payflow Pro Express Checkout payment processing stuff is in the 
 original Payflow Processor, I don't see any reason to change that
 - Everything else is in PayPalServices (if it is a service) or in 
 ExpressCheckoutEvents (if it is an event method)
 
 What is the issue exactly?
 
 Regards
 Scott
 
 On 25/08/2010, at 12:03 PM, BJ Freeman wrote:
 
 since they are named different would not seem consistent to have all of 
 them in one place?
 
 Scott Gray sent the following on 8/24/2010 3:27 PM:
 There are two Express Checkout integrations, one for PayFlow Pro and 
 another for the standard PayPal API.  However, both of them use 
 ExpressCheckoutEvents so there is really nothing to be merged.
 
 Regards
 Scott
 
 HotWax Media
 http://www.hotwaxmedia.com
 
 On 24/08/2010, at 8:13 PM, BJ Freeman wrote:
 
 I was checking out the jira OFBIZ-3895
 and ran across this in orders.
 there is also one done by Scott in accounting.
 should these be merged and put in one place.
 
 =
 BJ Freemanhttp://bjfreeman.elance.com
 Strategic Power Office with Supplier 
 Automationhttp://www.businessesnetwork.com/automation/viewforum.php?f=52
 Specialtymarket.comhttp://www.specialtymarket.com/
 Systems Integrator-- Glad to Assist
 
 Chat  Y! messenger: bjfr33man
 
 
 ash...@apache.org sent the following on 5/29/2010 8:25 PM:
 Author: ashish
 Date: Sun May 30 03:25:35 2010
 New Revision: 949465
 
 URL: http://svn.apache.org/viewvc?rev=949465view=rev
 Log:
 The paypal checkout should always redirect to sandbox while you are in 
 production environment. Contribution from DiveshPranay - Thanks 
 Guys.
 
 Modified:
 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 
 Modified: 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 URL: 
 http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=949465r1=949464r2=949465view=diff
 ==
 --- 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
  (original)
 +++ 
 ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
  Sun May 30 03:25:35 2010
 @@ -81,13 +81,37 @@ public class ExpressCheckoutEvents {
  }
 
  public static String expressCheckoutRedirect(HttpServletRequest 
 request, HttpServletResponse response) {
 +Delegator delegator = (Delegator) 
 request.getAttribute(delegator);
  ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
  String token = (String) 
 cart.getAttribute(payPalCheckoutToken);
 +String paymentGatewayConfigId = null;
 +GenericValue payPalGatewayConfig = null;
 +String productStoreId = null;
  if (UtilValidate.isEmpty(token)) {
  Debug.logError(No ExpressCheckout token found in cart, you 
 must do a successful setExpressCheckout before redirecting., module);
  return error;
  }
 -StringBuilder redirectUrl = new 
 StringBuilder(https://www.sandbox.paypal.com/cgi-bin/webscr;);
 +if (cart != null) {
 +productStoreId = cart.getProductStoreId();
 +}
 +if (productStoreId != null) {
 +GenericValue payPalPaymentSetting = 
 ProductStoreWorker.getProductStorePaymentSetting(delegator, 
 productStoreId, EXT_PAYPAL, null, true);
 +if (payPalPaymentSetting != null) {
 +paymentGatewayConfigId = 
 payPalPaymentSetting.getString(paymentGatewayConfigId);
 +}
 +}
 +if (paymentGatewayConfigId != null) {
 +try {
 +payPalGatewayConfig = 
 delegator.findOne(PaymentGatewayPayPal, true, 
 paymentGatewayConfigId, 

Re: svn commit: r949465 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

2010-08-24 Thread BJ Freeman

thanks for rationale behind the placement.

Scott Gray sent the following on 8/24/2010 6:07 PM:

All gateway code is in accounting, but keep in mind that Express Checkout 
involves more than just interacting with a gateway.  It also modifies the 
checkout process in a fairly major way and it makes no sense to include all of 
that in accounting, hence the events being in the order component.

Regards
Scott

On 25/08/2010, at 12:41 PM, BJ Freeman wrote:


Up until I found the file. om orders, I thought all gateway code was in 
accounting.
it is more if someone is looking for which gateway to use or to troubleshoot, 
without walking through the code.
it has more to-do with placing like code in the same place
from a functional point of view there is not difference.


=
BJ Freemanhttp://bjfreeman.elance.com
Strategic Power Office with Supplier 
Automationhttp://www.businessesnetwork.com/automation/viewforum.php?f=52
Specialtymarket.comhttp://www.specialtymarket.com/
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Scott Gray sent the following on 8/24/2010 5:32 PM:

I don't really know what you mean.
- The Payflow Pro Express Checkout payment processing stuff is in the original 
Payflow Processor, I don't see any reason to change that
- Everything else is in PayPalServices (if it is a service) or in 
ExpressCheckoutEvents (if it is an event method)

What is the issue exactly?

Regards
Scott

On 25/08/2010, at 12:03 PM, BJ Freeman wrote:


since they are named different would not seem consistent to have all of them in 
one place?

Scott Gray sent the following on 8/24/2010 3:27 PM:

There are two Express Checkout integrations, one for PayFlow Pro and another 
for the standard PayPal API.  However, both of them use ExpressCheckoutEvents 
so there is really nothing to be merged.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 24/08/2010, at 8:13 PM, BJ Freeman wrote:


I was checking out the jira OFBIZ-3895
and ran across this in orders.
there is also one done by Scott in accounting.
should these be merged and put in one place.

=
BJ Freemanhttp://bjfreeman.elance.com
Strategic Power Office with Supplier 
Automationhttp://www.businessesnetwork.com/automation/viewforum.php?f=52
Specialtymarket.comhttp://www.specialtymarket.com/
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


ash...@apache.org sent the following on 5/29/2010 8:25 PM:

Author: ashish
Date: Sun May 30 03:25:35 2010
New Revision: 949465

URL: http://svn.apache.org/viewvc?rev=949465view=rev
Log:
The paypal checkout should always redirect to sandbox while you are in production 
environment. Contribution from Divesh Pranay - Thanks Guys.

Modified:
 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=949465r1=949464r2=949465view=diff
==
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
 Sun May 30 03:25:35 2010
@@ -81,13 +81,37 @@ public class ExpressCheckoutEvents {
  }

  public static String expressCheckoutRedirect(HttpServletRequest request, 
HttpServletResponse response) {
+Delegator delegator = (Delegator) request.getAttribute(delegator);
  ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
  String token = (String) cart.getAttribute(payPalCheckoutToken);
+String paymentGatewayConfigId = null;
+GenericValue payPalGatewayConfig = null;
+String productStoreId = null;
  if (UtilValidate.isEmpty(token)) {
  Debug.logError(No ExpressCheckout token found in cart, you must do a 
successful setExpressCheckout before redirecting., module);
  return error;
  }
-StringBuilder redirectUrl = new 
StringBuilder(https://www.sandbox.paypal.com/cgi-bin/webscr;);
+if (cart != null) {
+productStoreId = cart.getProductStoreId();
+}
+if (productStoreId != null) {
+GenericValue payPalPaymentSetting = 
ProductStoreWorker.getProductStorePaymentSetting(delegator, productStoreId, 
EXT_PAYPAL, null, true);
+if (payPalPaymentSetting != null) {
+paymentGatewayConfigId = 
payPalPaymentSetting.getString(paymentGatewayConfigId);
+}
+}
+if (paymentGatewayConfigId != null) {
+try {
+payPalGatewayConfig = delegator.findOne(PaymentGatewayPayPal, true, 
paymentGatewayConfigId, paymentGatewayConfigId);
+} 

ExceptionInInitializerError:

2010-08-24 Thread 战争与和平
hi there

The following error occured when i  installed the 9.04 version of OFBiz in
Eclipse3.6, i don't know what resource was missing.
Exception in thread main java.lang.ExceptionInInitializerError
at org.ofbiz.base.util.Debug.clinit(Debug.java:86)
at
org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:51)
at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
at org.ofbiz.base.start.Start.init(Start.java:89)
at org.ofbiz.base.start.Start.main(Start.java:398)
Caused by: java.util.MissingResourceException: Can't find bundle for base
name cache, locale en
at java.util.ResourceBundle.throwMissingResourceException(Unknown
Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at
org.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:216)
at
org.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:212)
at org.ofbiz.base.util.cache.UtilCache.init(UtilCache.java:171)
at org.ofbiz.base.util.UtilProperties.clinit(UtilProperties.java:68)
... 5 more

Any help about this will be appreciated.

Regard.

Xu Jinyi