|
Modified: ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?rev=1039651&r1=1039650&r2=1039651&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original) +++ ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Sat Nov 27 10:59:21 2010 @@ -306,7 +306,7 @@ public class AIMPaymentServices { } // card present has a different layout from standard AIM; this determines how to parse the response - int apiType = props.get("cpMarketType") == null ? AuthorizeResponse.AIM_RESPONSE : AuthorizeResponse.CP_RESPONSE; + int apiType = UtilValidate.isEmpty(props.get("cpMarketType")) ? AuthorizeResponse.AIM_RESPONSE : AuthorizeResponse.CP_RESPONSE; try { HttpClient httpClient = new HttpClient(url, request); @@ -529,7 +529,7 @@ public class AIMPaymentServices { String expDate = UtilFormatOut.checkNull(cc.getString("expireDate")); String cardSecurityCode = (String) params.get("cardSecurityCode"); AIMRequest.put("x_Amount", amount); - AIMRequest.put("x_Currency_Code", currency); + AIMRequest.put("x_Currency_Code", currency); AIMRequest.put("x_Method", props.getProperty("method")); AIMRequest.put("x_Type", props.getProperty("transType")); AIMRequest.put("x_Card_Num", number); Modified: ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java?rev=1039651&r1=1039650&r2=1039651&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java (original) +++ ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java Sat Nov 27 10:59:21 2010 @@ -6,6 +6,7 @@ import javolution.util.FastMap; public class AIMRespPositions extends AuthorizeResponse.RespPositions { + // AIM v3.1 response positions private static Map<String, Integer> positions = FastMap.newInstance(); static { positions.put(AuthorizeResponse.RESPONSE_CODE, 1); @@ -29,6 +30,6 @@ public class AIMRespPositions extends Au @Override public String getApprovalString() { - return "APPROVED"; + return "1"; } } Modified: ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java?rev=1039651&r1=1039650&r2=1039651&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java (original) +++ ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java Sat Nov 27 10:59:21 2010 @@ -20,13 +20,12 @@ package org.ofbiz.accounting.thirdparty.authorizedotnet; import java.math.BigDecimal; -import java.util.*; import org.ofbiz.base.util.UtilValidate; public class AuthorizeResponse { - private List<String> response = new ArrayList<String>(); + private String[] response; private RespPositions pos; private String rawResp; @@ -54,12 +53,13 @@ public class AuthorizeResponse { private static final CPRespPositions cpPos = new CPRespPositions(); public AuthorizeResponse(String resp, int responseType) { - this(resp, "|", responseType); + this(resp, "\\|", responseType); } public AuthorizeResponse(String resp, String delim, int responseType) { this.rawResp = resp; - this.response = splitResp(resp, delim); + this.response = resp.split(delim); + if (responseType == CP_RESPONSE) { pos = cpPos; } else { @@ -120,35 +120,14 @@ public class AuthorizeResponse { } private String getResponseField(int position) { - if (response.size() < position) { + if (response.length < position) { return null; } else { - return response.get(position); + // positions always start at 1; arrays start at 0 + return response[position-1]; } } - - private List<String> splitResp(String r, String delim) { - int s1=0, s2=-1; - List<String> out = new ArrayList<String>(40); - out.add("empty"); - while (true) { - s2 = r.indexOf(delim, s1); - if (s2 != -1) { - out.add(r.substring(s1, s2)); - } else { - //the end part of the string (string not pattern terminated) - String _ = r.substring(s1); - if (_ != null && !_.equals("")) { - out.add(_); - } - break; - } - s1 = s2; - s1 += delim.length(); - } - return out; - } - + @Override public String toString() { return response.toString(); Modified: ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java?rev=1039651&r1=1039650&r2=1039651&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java (original) +++ ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java Sat Nov 27 10:59:21 2010 @@ -6,6 +6,7 @@ import javolution.util.FastMap; public class CPRespPositions extends AuthorizeResponse.RespPositions { + // Card-Present v1.0 response positions private static Map<String, Integer> positions = FastMap.newInstance(); static { positions.put(AuthorizeResponse.RESPONSE_CODE, 2); Modified: ofbiz/branches/jquery/applications/commonext/config/SetupUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/commonext/config/SetupUiLabels.xml?rev=1039651&r1=1039650&r2=1039651&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/commonext/config/SetupUiLabels.xml (original) +++ ofbiz/branches/jquery/applications/commonext/config/SetupUiLabels.xml Sat Nov 27 10:59:21 2010 @@ -22,6 +22,7 @@ <property key="SetupCompanyName"> <value xml:lang="en">OFBiz: Setup Application </value> <value xml:lang="it">OFBiz: componente di configurazione</value> + <value xml:lang="zh_TW">OFBiz: è¨ç½®æç¨ç¨å¼</value> </property> <property key="SetupCompanySubtitle"> <!--value xml:lang="ar">جزء Ù Ù Ø¹Ø§Ø¦ÙØ© Ø£ÙÙØ¨Ùز ÙÙØ¨Ø±Ù Ø¬ÙØ§Øª Ø§ÙØØ±Ø©</value--> @@ -46,75 +47,93 @@ <!--value xml:lang="zh">弿ºè½¯ä»¶OFBizçç»æé¨å</valuevalue xml:lang="zh">弿ºè½¯ä»¶OFBizçç»æé¨å</value--> <value xml:lang="zh">弿ºè½¯ä»¶OFBizå®¶æçä¸é¨å</value> <value xml:lang="zh_CN">OFBizçä¸é¨å</value> + <value xml:lang="zh_TW">éæ¾æºç¢¼è»é«OFBizå®¶æä¸ä»½å</value> </property> <property key="SetupApp"> <value xml:lang="en">Setup Application</value> <value xml:lang="it">Applicazione di configurazione</value> + <value xml:lang="zh_TW">è¨ç½®æç¨ç¨å¼</value> </property> <property key="SetupNewComponent"> <value xml:lang="en">Setup New Component</value> <value xml:lang="it">Configura nuovo componente</value> + <value xml:lang="zh_TW">è¨ç½®æ°çå ä»¶</value> </property> <property key="SetupOrganization"> <value xml:lang="en">Organization</value> <value xml:lang="it">Organizzazione</value> + <value xml:lang="zh_TW">çµç¹</value> </property> <property key="SetupProductStore"> <value xml:lang="en">Product Store</value> <value xml:lang="it">Negozio prodotti</value> + <value xml:lang="zh_TW">ç¢åååº</value> </property> <property key="SetupWebSite"> <value xml:lang="en">Web Site</value> <value xml:lang="it">Sito web</value> + <value xml:lang="zh_TW">ç¶²ç«</value> </property> <property key="SetupFacility"> <value xml:lang="en">Facility</value> <value xml:lang="it">Stabilimento</value> + <value xml:lang="zh_TW">å ´æ</value> </property> <property key="SetupOrganizationPartyId"> <value xml:lang="en">Organization Party Id</value> <value xml:lang="it">Soggetto organizzazione</value> + <value xml:lang="zh_TW">çµç¹æå¡ID</value> </property> <property key="SetupOrganizationName"> <value xml:lang="en">Organization name</value> <value xml:lang="it">Nome organizzazione</value> + <value xml:lang="zh_TW">çµç¹å稱</value> </property> <property key="SetupOrganizationInformation"> <value xml:lang="en">Organization Information</value> <value xml:lang="it">Informazioni organizzazione</value> + <value xml:lang="zh_TW">çµç¹è³è¨</value> </property> <property key="SetupEditOrganizationInformation"> <value xml:lang="en">Edit Organization Information</value> <value xml:lang="it">Aggiorna informazioni organizzazione</value> + <value xml:lang="zh_TW">編輯çµç¹è³è¨</value> </property> <property key="SetupProductStoreName"> <value xml:lang="en">Product Store name</value> <value xml:lang="it">Nome negozio prodotti</value> + <value xml:lang="zh_TW">ç¢åååºå稱</value> </property> <property key="SetupResults"> <value xml:lang="en">Results</value> <value xml:lang="it">Risultati</value> + <value xml:lang="zh_TW">çµæ</value> </property> <property key="SetupFirstCustomer"> <value xml:lang="en">First Customer</value> <value xml:lang="it">Primo cliente</value> + <value xml:lang="zh_TW">第ä¸ä½å®¢æ¶</value> </property> <property key="SetupFirstProduct"> <value xml:lang="en">First Product</value> <value xml:lang="it">Primo prodotto</value> + <value xml:lang="zh_TW">第ä¸é ç¢å</value> </property> <property key="SetupFacilityDescription"> <value xml:lang="en">Description</value> <value xml:lang="it">Descrizione stabilimento</value> + <value xml:lang="zh_TW">說æ</value> </property> <property key="SetupEditProductStore"> <value xml:lang="en">Edit Product Store</value> <value xml:lang="it">Aggiorna negozio prodotti</value> <value xml:lang="nl">Wijzigen winkel</value> + <value xml:lang="zh_TW">編輯ç¢åååº</value> </property> <property key="SetupCreateNewOrganization"> <value xml:lang="en">Create New Organization</value> <value xml:lang="it">Creare nuova organizzazione</value> + <value xml:lang="zh_TW">å»ºç«æ°ççµç¹</value> </property> <property key="SetupTheFirstCustomerOf"> <value xml:lang="en">The First Customer of</value> @@ -123,29 +142,36 @@ <property key="SetupProductCatalog"> <value xml:lang="en">Product Catalog</value> <value xml:lang="it">Catalogo prodotti</value> + <value xml:lang="zh_TW">ç¢åç®é</value> </property> <property key="SetupPageError"> <value xml:lang="en">You do not have sufficient data to access this page.</value> <value xml:lang="it">Tu non hai sufficienti diritti per accedere a questa pagina.</value> + <value xml:lang="zh_TW">æ¨æ²æé²å ¥æ¤é é¢çæ¬éã</value> </property> <property key="PageTitleProductInfomation"> <value xml:lang="en">Product Infomation</value> <value xml:lang="it">Informazione prodotti</value> + <value xml:lang="zh_TW">ç¢åè³è¨</value> </property> <property key="PageTitleEditProductCategory"> <value xml:lang="en">Edit Product Category</value> <value xml:lang="it">Aggiorna categoria prodotti</value> + <value xml:lang="zh_TW">編輯ç¢ååé¡</value> </property> <property key="SetupSetToComplete"> <value xml:lang="en">Set to complete</value> <value xml:lang="it">Imposta a completato</value> + <value xml:lang="zh_TW">宿è¨å®</value> </property> <property key="SetupInitialSetup"> <value xml:lang="en">Initial Setup</value> <value xml:lang="it">Configurazione iniziale</value> + <value xml:lang="zh_TW">åå§è¨ç½®</value> </property> <property key="SetupEventMessage"> <value xml:lang="en">Setup only works if there are no organizations defined yet</value> <value xml:lang="it">Configura solo i lavori se non c'è ancora nessuna organizzazione definita</value> + <value xml:lang="zh_TW">åªæç¶æ²æç¸éçµç¹ææè½è¨ç½®</value> </property> </resource> |
| Free forum by Nabble | Edit this page |
