Author: jaz
Date: Thu May 17 12:20:56 2007
New Revision: 539085
URL:
http://svn.apache.org/viewvc?view=rev&rev=539085Log:
updated fin account processor services; refunds and re-auths now working properly
Modified:
ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
Modified: ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml?view=diff&rev=539085&r1=539084&r2=539085==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Thu May 17 12:20:56 2007
@@ -217,7 +217,7 @@
location="org.ofbiz.accounting.finaccount.FinAccountPaymentServices" invoke="finAccountRefund" auth="true">
<description>Return funds back to a financial account.</description>
<implements service="paymentRefundInterface"/>
- <attribute name="finAccountId" type="String" mode="IN" optional="false"/>
+ <attribute name="finAccountId" type="String" mode="IN" optional="true"/>
</service>
<!-- Gift Certificate -->
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java?view=diff&rev=539085&r1=539084&r2=539085==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java Thu May 17 12:20:56 2007
@@ -69,6 +69,9 @@
return ServiceUtil.returnError(e.getMessage());
}
}
+ if (finAccountId == null && paymentPref != null) {
+ finAccountId = paymentPref.getString("finAccountId");
+ }
// obtain the order information
OrderReadHelper orh = new OrderReadHelper(delegator, orderId);
@@ -412,6 +415,13 @@
partyId = billToParty.getString("partyId");
}
}
+ if (finAccountId == null) {
+ finAccountId = orderPaymentPreference.getString("finAccountId");
+ }
+ }
+
+ if (finAccountId == null) {
+ return ServiceUtil.returnError("No finAccountId found");
}
// call the deposit service