Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
I agree with this. If a configuration is missing that is vital for operation but easy to miss (like these callbacks) and error is better than the data getting sent where it shouldn't be sent... -David On Dec 15, 2007, at 5:08 PM, BJ Freeman wrote: my thinking is it is better to error because it has not been configured properly. when the config file is read, the configuration can be check for [] and throw an error. Jacques Le Roux sent the following on 12/15/2007 3:45 PM: Yes I asked myself the same question. I gived up thinking that after all so far it's the official demo server... Jacques De : BJ Freeman [EMAIL PROTECTED] is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/ payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/ config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff = = = = = = = = = = = === --- ofbiz/branches/release4.0/applications/accounting/config/ payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/ payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/ org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff = = = = = = = = = = = === --- ofbiz/branches/release4.0/applications/accounting/src/org/ ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl = UtilProperties.getPropertyValue(configString, payment.paypal.redirect); + +if (confirmUrl == null || redirectUrl == null) { Debug.logError(Payment properties is not configured properly, no confirm URL defined!, module); request.setAttribute(_ERROR_MESSAGE_, PayPal has not been configured, please contact customer service.); return error; @@ -201,7 +205,7 @@ try { String str = UtilHttp.urlEncodeArgs(parametersMap); -URL u = new URL(http://www.paypal.com/cgi-bin/ webscr); +
Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
I guess that the suggestion is to leave it empty, and return an error message to the user, to warn about the need to complete the configuration. Jacopo [EMAIL PROTECTED] wrote: So which url I have to use ? http://www.ofbiz.org:8080/ecommerce also if it's a broken link and there are any demo OFBiz available on this url ? Thanks Marco - I agree with this. If a configuration is missing that is vital for operation but easy to miss (like these callbacks) and error is better than the data getting sent where it shouldn't be sent... -David On Dec 15, 2007, at 5:08 PM, BJ Freeman wrote: my thinking is it is better to error because it has not been configured properly. when the config file is read, the configuration can be check for [] and throw an error. Jacques Le Roux sent the following on 12/15/2007 3:45 PM: Yes I asked myself the same question. I gived up thinking that after all so far it's the official demo server... Jacques De : BJ Freeman [EMAIL PROTECTED] is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/config/payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl = UtilProperties.getPropertyValue(configString, payment.paypal.redirect); + +if (confirmUrl == null || redirectUrl == null) { Debug.logError(Payment properties is not configured properly, no confirm URL defined!, module); request.setAttribute(_ERROR_MESSAGE_, PayPal has not
Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
http://[host]/ecommerce/control/payPalNotify this way they have the correct URL once they put the server domain name in. [EMAIL PROTECTED] sent the following on 12/16/2007 4:00 AM: So which url I have to use ? http://www.ofbiz.org:8080/ecommerce also if it's a broken link and there are any demo OFBiz available on this url ? Thanks Marco - I agree with this. If a configuration is missing that is vital for operation but easy to miss (like these callbacks) and error is better than the data getting sent where it shouldn't be sent... -David On Dec 15, 2007, at 5:08 PM, BJ Freeman wrote: my thinking is it is better to error because it has not been configured properly. when the config file is read, the configuration can be check for [] and throw an error. Jacques Le Roux sent the following on 12/15/2007 3:45 PM: Yes I asked myself the same question. I gived up thinking that after all so far it's the official demo server... Jacques De : BJ Freeman [EMAIL PROTECTED] is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/config/payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl = UtilProperties.getPropertyValue(configString, payment.paypal.redirect); + +if (confirmUrl == null || redirectUrl == null) { Debug.logError(Payment
Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
Yes I think so, or maybe better nothing (http://www.ofbiz.org:8080/ecommerce commented out and explained). This answer only from comments below, I did not look into details. Jacques De : [EMAIL PROTECTED] So which url I have to use ? http://www.ofbiz.org:8080/ecommerce also if it's a broken link and there are any demo OFBiz available on this url ? Thanks Marco - I agree with this. If a configuration is missing that is vital for operation but easy to miss (like these callbacks) and error is better than the data getting sent where it shouldn't be sent... -David On Dec 15, 2007, at 5:08 PM, BJ Freeman wrote: my thinking is it is better to error because it has not been configured properly. when the config file is read, the configuration can be check for [] and throw an error. Jacques Le Roux sent the following on 12/15/2007 3:45 PM: Yes I asked myself the same question. I gived up thinking that after all so far it's the official demo server... Jacques De : BJ Freeman [EMAIL PROTECTED] is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/config/payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl = UtilProperties.getPropertyValue(configString, payment.paypal.redirect); + +if (confirmUrl == null || redirectUrl == null) { Debug.logError(Payment properties
Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
Yes ! Jacques De : BJ Freeman [EMAIL PROTECTED] http://[host]/ecommerce/control/payPalNotify this way they have the correct URL once they put the server domain name in. [EMAIL PROTECTED] sent the following on 12/16/2007 4:00 AM: So which url I have to use ? http://www.ofbiz.org:8080/ecommerce also if it's a broken link and there are any demo OFBiz available on this url ? Thanks Marco - I agree with this. If a configuration is missing that is vital for operation but easy to miss (like these callbacks) and error is better than the data getting sent where it shouldn't be sent... -David On Dec 15, 2007, at 5:08 PM, BJ Freeman wrote: my thinking is it is better to error because it has not been configured properly. when the config file is read, the configuration can be check for [] and throw an error. Jacques Le Roux sent the following on 12/15/2007 3:45 PM: Yes I asked myself the same question. I gived up thinking that after all so far it's the official demo server... Jacques De : BJ Freeman [EMAIL PROTECTED] is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/config/payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl =
Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/config/payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl = UtilProperties.getPropertyValue(configString, payment.paypal.redirect); + +if (confirmUrl == null || redirectUrl == null) { Debug.logError(Payment properties is not configured properly, no confirm URL defined!, module); request.setAttribute(_ERROR_MESSAGE_, PayPal has not been configured, please contact customer service.); return error; @@ -201,7 +205,7 @@ try { String str = UtilHttp.urlEncodeArgs(parametersMap); -URL u = new URL(http://www.paypal.com/cgi-bin/webscr;); +URL u = new URL(redirectUrl); URLConnection uc = u.openConnection(); uc.setDoOutput(true); uc.setRequestProperty(Content-Type, application/x-www-form-urlencoded); @@ -279,7 +283,7 @@ String paymentStatus = request.getParameter(payment_status); // attempt to start a transaction -boolean okay = false; +boolean okay = true; boolean beganTransaction = false; try { beganTransaction = TransactionUtil.begin(); @@ -424,6 +428,8 @@
Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
or put in payment.paypal.notify=http://[your domain]/ecommerce/control/payPalNotify BJ Freeman sent the following on 12/15/2007 2:49 PM: is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/config/payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl = UtilProperties.getPropertyValue(configString, payment.paypal.redirect); + +if (confirmUrl == null || redirectUrl == null) { Debug.logError(Payment properties is not configured properly, no confirm URL defined!, module); request.setAttribute(_ERROR_MESSAGE_, PayPal has not been configured, please contact customer service.); return error; @@ -201,7 +205,7 @@ try { String str = UtilHttp.urlEncodeArgs(parametersMap); -URL u = new URL(http://www.paypal.com/cgi-bin/webscr;); +URL u = new URL(redirectUrl); URLConnection uc = u.openConnection(); uc.setDoOutput(true); uc.setRequestProperty(Content-Type, application/x-www-form-urlencoded); @@ -279,7 +283,7 @@ String paymentStatus = request.getParameter(payment_status); // attempt to start a transaction -boolean okay = false; +boolean okay = true;
Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
I agree, but like our java mail container and others they should be configured by the person that is installing. having stuff return to hotwax may cause confusion to those doing their first install. They would get errors from paypal when it could not find the correct url. [EMAIL PROTECTED] sent the following on 12/15/2007 3:06 PM: Yes, BJ is not possible that PayPal forward their notification/return/cancel to localhost but they need a public site address url and in the past was possible also an ip address but I have tested same day ago and it was not more possible. So I decide that the default can be the demo site of OFBiz hosted by HotWaxMedia. You can change it and commit it's not a big problem but remember also that it can be overridden from the buyer PayPal configuration. In any case if you want to test the patch you can do it on www.ofbiz.it connecting using your buyer paypal user. I have configured the paypal merchant on the server. Thanks Marco -- is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/config/payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl = UtilProperties.getPropertyValue(configString, payment.paypal.redirect); + +if (confirmUrl == null || redirectUrl == null) { Debug.logError(Payment
Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
Yes I asked myself the same question. I gived up thinking that after all so far it's the official demo server... Jacques De : BJ Freeman [EMAIL PROTECTED] is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/config/payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl = UtilProperties.getPropertyValue(configString, payment.paypal.redirect); + +if (confirmUrl == null || redirectUrl == null) { Debug.logError(Payment properties is not configured properly, no confirm URL defined!, module); request.setAttribute(_ERROR_MESSAGE_, PayPal has not been configured, please contact customer service.); return error; @@ -201,7 +205,7 @@ try { String str = UtilHttp.urlEncodeArgs(parametersMap); -URL u = new URL(http://www.paypal.com/cgi-bin/webscr;); +URL u = new URL(redirectUrl); URLConnection uc = u.openConnection(); uc.setDoOutput(true); uc.setRequestProperty(Content-Type, application/x-www-form-urlencoded); @@ -279,7 +283,7 @@ String paymentStatus = request.getParameter(payment_status); // attempt to start a transaction -
Re: svn commit: r604311 - in /ofbiz/branches/release4.0/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
my thinking is it is better to error because it has not been configured properly. when the config file is read, the configuration can be check for [] and throw an error. Jacques Le Roux sent the following on 12/15/2007 3:45 PM: Yes I asked myself the same question. I gived up thinking that after all so far it's the official demo server... Jacques De : BJ Freeman [EMAIL PROTECTED] is this correct to use the demo for a return address. should it not be just localhost till the person configures it? Should not the gateways be in a sandbox configurations? [EMAIL PROTECTED] sent the following on 12/14/2007 1:57 PM: Author: mrisaliti Date: Fri Dec 14 13:57:29 2007 New Revision: 604311 URL: http://svn.apache.org/viewvc?rev=604311view=rev Log: Applied fix from trunk for revision: 604030 Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/branches/release4.0/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/payment.properties?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/config/payment.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/payment.properties Fri Dec 14 13:57:29 2007 @@ -239,25 +239,29 @@ [EMAIL PROTECTED] # PayPal Notify URL -payment.paypal.notify=http://www.ofbiz.org:8080/ecommerce/control/payPalNotify +payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify # PayPal Return URL -payment.paypal.return=http://www.ofbiz.org:8080/ecommerce/control/orderhistory +payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory # PayPal Return On Cancel URL -payment.paypal.cancelReturn=http://www.ofbiz.org:8080/ecommerce/control/payPalCancel/main +payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main # Image To Use On PayPal -payment.paypal.image=http://www.ofbiz:org:8080/images/ofb_logo.gif +payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg # Thank-You / Confirm Order Template (rendered via Freemarker) payment.paypal.confirmTemplate=/order/emailconfirmation.ftl -# PayPal Redirect URL -payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr - -# PayPal Confirm URL (JSSE must be configured to use SSL) -payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Production PayPal Redirect URL +#payment.paypal.redirect=https://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Redirect URL +payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr + +# Production PayPal Confirm URL (JSSE must be configured to use SSL) +#payment.paypal.confirm=http://www.paypal.com/cgi-bin/webscr +# Sandbox PayPal Confirm URL (JSSE must be configured to use SSL) +payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr # PCCharge Configuration Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604311r1=604310r2=604311view=diff == --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Fri Dec 14 13:57:29 2007 @@ -186,7 +186,11 @@ // get the confirm URL String confirmUrl = UtilProperties.getPropertyValue(configString, payment.paypal.confirm); -if (confirmUrl == null) { + +// get the redirect URL +String redirectUrl = UtilProperties.getPropertyValue(configString, payment.paypal.redirect); + +if (confirmUrl == null || redirectUrl == null) { Debug.logError(Payment properties is not configured properly, no confirm URL defined!, module); request.setAttribute(_ERROR_MESSAGE_, PayPal has not been configured, please contact customer service.); return error; @@ -201,7 +205,7 @@ try { String str = UtilHttp.urlEncodeArgs(parametersMap); -URL u = new URL(http://www.paypal.com/cgi-bin/webscr;); +URL u = new URL(redirectUrl); URLConnection uc = u.openConnection(); uc.setDoOutput(true); uc.setRequestProperty(Content-Type, application/x-www-form-urlencoded); @@ -279,7 +283,7