svn commit: r1039651 [5/38] - in /ofbiz/branches/jquery: ./ applications/accounting/config/ applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/ applications/commonext/config/ applications/content/config/ applications/content/we...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1039651 [5/38] - in /ofbiz/branches/jquery: ./ applications/accounting/config/ applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/ applications/commonext/config/ applications/content/config/ applications/content/we...

jleroux@apache.org
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>