Author: ashish
Date: Mon May 9 04:19:22 2011
New Revision: 1100881
URL:
http://svn.apache.org/viewvc?rev=1100881&view=revLog:
Applied fix from trunk r1100880.
Bug fix. Inside Authorize.net user interface any transaction that are specific to Refund are not showing Order & Customer specific information. So its difficult to understand the association of that refund specific transaction to the order(& its customer).
Modified:
ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
Modified: ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?rev=1100881&r1=1100880&r2=1100881&view=diff==============================================================================
--- ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original)
+++ ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Mon May 9 04:19:22 2011
@@ -163,7 +163,9 @@ public class AIMPaymentServices {
Properties props = buildAIMProperties(context, delegator);
buildMerchantInfo(context, props, request);
buildGatewayResponeConfig(context, props, request);
+ buildCustomerBillingInfo(context, props, request);
buildEmailSettings(context, props, request);
+ buildInvoiceInfo(context, props, request);
props.put("transType", "CREDIT");
props.put("cardtype", (String)creditCard.get("cardType"));
buildRefundTransaction(context, props, request);
@@ -475,6 +477,12 @@ public class AIMPaymentServices {
private static void buildInvoiceInfo(Map<String, Object> params, Properties props, Map<String, Object> AIMRequest) {
String description = UtilFormatOut.checkNull(props.getProperty("transDescription"));
String orderId = UtilFormatOut.checkNull((String)params.get("orderId"));
+ if (UtilValidate.isEmpty(orderId)) {
+ GenericValue orderPaymentPreference = (GenericValue) params.get("orderPaymentPreference");
+ if (UtilValidate.isNotEmpty(orderPaymentPreference)) {
+ orderId = (String) orderPaymentPreference.get("orderId");
+ }
+ }
AIMRequest.put("x_Invoice_Num", "Order " + orderId);
AIMRequest.put("x_Description", description);
}