Author: ashish
Date: Mon Sep 21 11:40:44 2009
New Revision: 817211
URL:
http://svn.apache.org/viewvc?rev=817211&view=revLog:
Passing productStoreId in context map so it will search database for eBay configuration settings first & then from property file if not found.
Modified:
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java?rev=817211&r1=817210&r2=817211&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java (original)
+++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java Mon Sep 21 11:40:44 2009
@@ -126,13 +126,13 @@
return result;
}
- public static Map setEbayOrderToComplete(DispatchContext dctx, Map context) {
+ public static Map<String, Object> setEbayOrderToComplete(DispatchContext dctx, Map<String, Object> context) {
GenericDelegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String orderId = (String) context.get("orderId");
String externalId = (String) context.get("externalId");
String transactionId = (String) context.get("transactionId");
- Map result = FastMap.newInstance();
+ Map<String, Object> result = FastMap.newInstance();
try {
if (orderId == null && externalId == null) {
Debug.logError("orderId or externalId must be filled", module);
@@ -157,9 +157,14 @@
// get externalId and transactionId from OrderHeader
externalId = (String)orderHeader.get("externalId");
transactionId = (String)orderHeader.get("transactionId");
+ String productStoreId = (String) orderHeader.get("productStoreId");
+ if (UtilValidate.isNotEmpty(productStoreId)) {
+ context.put("productStoreId", productStoreId);
+ }
}
Map<String, Object> eBayConfigResult = EbayHelper.buildEbayConfig(context, delegator);
+
StringBuffer completeSaleXml = new StringBuffer();
if (!ServiceUtil.isFailure(buildCompleteSaleRequest(delegator, locale, externalId, transactionId, context, completeSaleXml, eBayConfigResult.get("token").toString()))) {