You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by BJ Freeman <bj...@free-man.net> on 2007/12/16 16:42:16 UTC

Re: svn commit: r604632 - in /ofbiz/trunk/applications/accounting: config/payment.properties src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java

how about
#payment.paypal.notify=http://[yourserver]/ecommerce/control/payPalNotify
payment.paypal.notify=
and include
#payment.paypal.image=http://[yourserver]/images/[your logo].jpg
payment.paypal.image=


mrisaliti@apache.org sent the following on 12/16/2007 7:04 AM:
> Author: mrisaliti
> Date: Sun Dec 16 07:04:49 2007
> New Revision: 604632
> 
> URL: http://svn.apache.org/viewvc?rev=604632&view=rev
> Log:
> As suggested in dev mailing list I have left empty the notify urls from PayPal to OFBiz and return an error in case they are not configurated correctly.
> 
> Modified:
>     ofbiz/trunk/applications/accounting/config/payment.properties
>     ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
> 
> Modified: ofbiz/trunk/applications/accounting/config/payment.properties
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/payment.properties?rev=604632&r1=604631&r2=604632&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/accounting/config/payment.properties (original)
> +++ ofbiz/trunk/applications/accounting/config/payment.properties Sun Dec 16 07:04:49 2007
> @@ -242,13 +242,13 @@
>  payment.paypal.business=vote@ofbiz.org
>  
>  # PayPal Notify URL
> -payment.paypal.notify=http://demo.hotwaxmedia.com/ecommerce/control/payPalNotify
> +payment.paypal.notify=
>  
>  # PayPal Return URL
> -payment.paypal.return=http://demo.hotwaxmedia.com/ecommerce/control/orderhistory
> +payment.paypal.return=
>  
>  # PayPal Return On Cancel URL
> -payment.paypal.cancelReturn=http://demo.hotwaxmedia.com/ecommerce/control/payPalCancel/main
> +payment.paypal.cancelReturn=
>  
>  # Image To Use On PayPal
>  payment.paypal.image=http://demo.hotwaxmedia.com/images/ofbiz_logo.jpg
> 
> Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=604632&r1=604631&r2=604632&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original)
> +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Sun Dec 16 07:04:49 2007
> @@ -128,7 +128,13 @@
>          
>          // get the paypal account
>          String payPalAccount = UtilProperties.getPropertyValue(configString, "payment.paypal.business");
> -                
> +        
> +        if (UtilValidate.isEmpty(notifyUrl) || UtilValidate.isEmpty(returnUrl) || UtilValidate.isEmpty(cancelReturnUrl)) {
> +            Debug.logError("Payment properties is not configured properly, some notify URL from PayPal is not correctly defined!", module);
> +            request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage(resource, "payPalEvents.problemsGettingMerchantConfiguration", locale));
> +            return "error";
> +        }
> +        
>          // create the redirect string
>          Map <String, Object> parameters = new LinkedHashMap <String, Object>();
>          parameters.put("cmd", "_xclick");
> 
> 
> 
> 
>