Author: ashish
Date: Mon May 9 04:15:50 2011
New Revision: 1100880
URL:
http://svn.apache.org/viewvc?rev=1100880&view=revLog:
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/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?rev=1100880&r1=1100879&r2=1100880&view=diff==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Mon May 9 04:15:50 2011
@@ -173,7 +173,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", creditCard.get("cardType"));
buildRefundTransaction(context, props, request);
@@ -546,6 +548,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);
}