From: "BJ Freeman" <[EMAIL PROTECTED]>
[...]
This is not only for paypal but any property (method) that send data
erroneously to somewhere and not make the user aware it is happening

Yes, but IIRC there are currently only code for dealing with paypal. See 
UtilValidate.isEmpty at the end of this message
(PayPalEvents.java[129+...]

Jacques

Jacopo Cappellato sent the following on 12/20/2007 9:31 PM:
Premise: I don't know much about PayPalEvents.java and I didn't really
reviewed BJ Freeman's patch.

That said, I have a question: I've noticed that the change to the
PayPalEvents.java slightly modify the logic of the event... are we sure
that it is something we need? What is it supposed to fix/improve
exactly? I cannot understand this (due to my limited knowledge of PayPal
events) simply reading the comments in Jira and the svn log.

Thanks,

Jacopo


[EMAIL PROTECTED] wrote:
Author: jleroux
Date: Thu Dec 20 13:21:47 2007
New Revision: 606031

URL: http://svn.apache.org/viewvc?rev=606031&view=rev
Log:
Done by hand from an unusable patch of BJ Freeman "Authorize.NET
Payment Gateway Implementation"
(https://issues.apache.org/jira/browse/OFBIZ-274) - OFBIZ-274

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=606031&r1=606030&r2=606031&view=diff

==============================================================================

--- ofbiz/trunk/applications/accounting/config/payment.properties
(original)
+++ ofbiz/trunk/applications/accounting/config/payment.properties Thu
Dec 20 13:21:47 2007
@@ -240,33 +240,39 @@

 # PayPal E-Mail address
 [EMAIL PROTECTED]
[EMAIL PROTECTED]
+payment.paypal.business=

 # PayPal Notify URL
-payment.paypal.notify=http://[yourServerName]/ecommerce/control/payPalNotify

+#payment.paypal.notify=http://[yourServerName]/ecommerce/control/payPalNotify

+payment.paypal.notify=

 # PayPal Return URL
-payment.paypal.return=http://[yourServerName]/ecommerce/control/orderhistory

+#payment.paypal.return=http://[yourServerName]/ecommerce/control/orderhistory

+payment.paypal.return=

 # PayPal Return On Cancel URL
-payment.paypal.cancelReturn=http://[yourServerName]/ecommerce/control/payPalCancel/main

+#payment.paypal.cancelReturn=http://[yourServerName]/ecommerce/control/payPalCancel/main

+payment.paypal.cancelReturn=

 # Image To Use On PayPal
 #payment.paypal.image=http://[yourServerName]/images/ofbiz_logo.jpg
-payment.paypal.image=http://[yourServerName]/images/[your_logo].jpg
+payment.paypal.image=

 # Thank-You / Confirm Order Template (rendered via Freemarker)
-payment.paypal.confirmTemplate=/order/emailconfirmation.ftl
+#payment.paypal.confirmTemplate=/order/emailconfirmation.ftl
+payment.paypal.confirmTemplate=

 # 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
+#payment.paypal.redirect=https://www.sandbox.paypal.com/us/cgi-bin/webscr

+payment.paypal.redirect=

 # 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
+#payment.paypal.confirm=https://www.sandbox.paypal.com/us/cgi-bin/webscr
+payment.paypal.confirm=

 ############################################
 # PCCharge Configuration

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=606031&r1=606030&r2=606031&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
Thu Dec 20 13:21:47 2007
@@ -129,7 +129,12 @@
         // get the paypal account
         String payPalAccount =
UtilProperties.getPropertyValue(configString, "payment.paypal.business");
         -        if (UtilValidate.isEmpty(notifyUrl) ||
UtilValidate.isEmpty(returnUrl) ||
UtilValidate.isEmpty(cancelReturnUrl)) {
+        if (UtilValidate.isEmpty(redirectUrl) +            ||
UtilValidate.isEmpty(notifyUrl) +            ||
UtilValidate.isEmpty(returnUrl) +            ||
UtilValidate.isEmpty(cancelReturnUrl) +            ||
UtilValidate.isEmpty(imageUrl)
+            || UtilValidate.isEmpty(payPalAccount) ) {
             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";








Reply via email to