Cosmo_Community_AlipayPaymentGateway - Version 1.5.0

Version Notes

Add support for international payment credit cards.

Add updater for module.

Download this release

Release Info

Developer Magento Core Team
Extension Cosmo_Community_AlipayPaymentGateway
Version 1.5.0
Comparing to
See all releases


Code changes from version 1.4.1.0 to 1.5.0

Files changed (27) hide show
  1. app/code/community/CosmoCommerce/Alipay/Block/Error.php +1 -1
  2. app/code/community/CosmoCommerce/Alipay/Block/Form.php +1 -1
  3. app/code/community/CosmoCommerce/Alipay/Block/Redirect.php +1 -1
  4. app/code/community/CosmoCommerce/Alipay/Helper/Data.php +1 -1
  5. app/code/community/CosmoCommerce/Alipay/Model/Api/Debug.php +1 -1
  6. app/code/community/CosmoCommerce/Alipay/Model/Mysql4/Api/Debug.php +1 -2
  7. app/code/community/CosmoCommerce/Alipay/Model/Mysql4/Api/Debug/Collection.php +1 -1
  8. app/code/community/CosmoCommerce/Alipay/Model/Mysql4/Setup.php +1 -1
  9. app/code/community/CosmoCommerce/Alipay/Model/Payment.php +61 -28
  10. app/code/community/CosmoCommerce/Alipay/Model/Source/Language.php +3 -3
  11. app/code/community/CosmoCommerce/Alipay/Model/Source/Servicetype.php +5 -4
  12. app/code/community/CosmoCommerce/Alipay/Model/Source/Transport.php +1 -1
  13. app/code/community/CosmoCommerce/Alipay/controllers/PaymentController.php +6 -9
  14. app/code/community/CosmoCommerce/Alipay/etc/config.xml +5 -5
  15. app/code/community/CosmoCommerce/Alipay/etc/system.xml +31 -10
  16. app/code/community/CosmoCommerce/Alipay/sql/alipay_setup/mysql4-install-0.1.0.php +1 -3
  17. app/code/community/CosmoCommerce/Alipay/sql/alipay_setup/mysql4-install-0.9.2.php +1 -2
  18. app/{design/frontend/default/default/template/alipay/error.phtml → code/community/CosmoCommerce/Updates/Helper/Data.php} +8 -6
  19. app/code/community/CosmoCommerce/Updates/Model/Feed.php +96 -0
  20. app/code/community/CosmoCommerce/Updates/etc/adminhtml.xml +24 -0
  21. app/code/community/CosmoCommerce/Updates/etc/config.xml +94 -0
  22. app/code/community/CosmoCommerce/Updates/etc/system.xml +65 -0
  23. app/design/frontend/default/default/template/alipay/form.phtml +0 -57
  24. app/etc/modules/CosmoCommerce_Alipay.xml +1 -1
  25. app/etc/modules/CosmoCommerce_Updates.xml +9 -0
  26. app/locale/zh_CN/CosmoCommerce_Alipay.csv +0 -31
  27. package.xml +10 -8
app/code/community/CosmoCommerce/Alipay/Block/Error.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
app/code/community/CosmoCommerce/Alipay/Block/Form.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
app/code/community/CosmoCommerce/Alipay/Block/Redirect.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
app/code/community/CosmoCommerce/Alipay/Helper/Data.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
app/code/community/CosmoCommerce/Alipay/Model/Api/Debug.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
app/code/community/CosmoCommerce/Alipay/Model/Mysql4/Api/Debug.php CHANGED
@@ -14,13 +14,12 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
23
-
24
  class CosmoCommerce_Alipay_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract
25
  {
26
  protected function _construct()
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
 
23
  class CosmoCommerce_Alipay_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract
24
  {
25
  protected function _construct()
app/code/community/CosmoCommerce/Alipay/Model/Mysql4/Api/Debug/Collection.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
app/code/community/CosmoCommerce/Alipay/Model/Mysql4/Setup.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
app/code/community/CosmoCommerce/Alipay/Model/Payment.php CHANGED
@@ -12,19 +12,19 @@
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@magentocommerce.com so we can send you a copy immediately.
14
  *
15
- * @category CosmoCommerce
16
- * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
23
-
24
  class CosmoCommerce_Alipay_Model_Payment extends Mage_Payment_Model_Method_Abstract
25
  {
26
  protected $_code = 'alipay_payment';
27
  protected $_formBlockType = 'alipay/form';
 
28
 
29
  // Alipay return codes of payment
30
  const RETURN_CODE_ACCEPTED = 'Success';
@@ -52,7 +52,7 @@ class CosmoCommerce_Alipay_Model_Payment extends Mage_Payment_Model_Method_Abstr
52
  */
53
  public function getAlipayUrl()
54
  {
55
- $url = $this->getConfigData('transport').'://'.$this->getConfigData('gateway');
56
  return $url;
57
  }
58
 
@@ -147,31 +147,64 @@ class CosmoCommerce_Alipay_Model_Payment extends Mage_Payment_Model_Method_Abstr
147
  if (!($order instanceof Mage_Sales_Model_Order)) {
148
  Mage::throwException($this->_getHelper()->__('Cannot retrieve order object'));
149
  }
150
-
151
- $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
152
- $converted_final_price = Mage::helper('directory')->currencyConvert($order->getBaseGrandTotal(), $currency_code, 'CNY');
153
- if($converted_final_price){
154
- $converted_final_price=$converted_final_price;
 
 
 
 
 
 
 
 
 
 
 
 
155
  }else{
156
- $converted_final_price=$order->getBaseGrandTotal();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
- $parameter = array('service' => $this->getConfigData('service_type'),
159
- 'partner' => $this->getConfigData('partner_id'),
160
- 'return_url' => $this->getReturnURL(),
161
- 'notify_url' => $this->getNotifyURL(),
162
- '_input_charset' => 'utf-8',
163
- 'subject' => $order->getRealOrderId(),
164
- 'body' => $order->getRealOrderId(),
165
- 'out_trade_no' => $order->getRealOrderId(), // order ID
166
- 'logistics_fee' => '0.00', //because magento has shipping system, it has included shipping price
167
- 'logistics_payment' => 'BUYER_PAY', //always
168
- 'logistics_type' => 'EXPRESS', //Only three shipping method:POST,EMS,EXPRESS
169
- 'price' => sprintf('%.2f', $converted_final_price) ,
170
- 'payment_type' => '1',
171
- 'quantity' => '1', // For the moment, the parameter of price is total price, so the quantity is 1.
172
- 'show_url' => Mage::getUrl(),
173
- 'seller_email' => $this->getConfigData('seller_email')
174
- );
175
  $parameter = $this->para_filter($parameter);
176
  $security_code = $this->getConfigData('security_code');
177
  $sign_type = 'MD5';
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@magentocommerce.com so we can send you a copy immediately.
14
  *
15
+ * @category CosmoCommerce
16
+ * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
 
23
  class CosmoCommerce_Alipay_Model_Payment extends Mage_Payment_Model_Method_Abstract
24
  {
25
  protected $_code = 'alipay_payment';
26
  protected $_formBlockType = 'alipay/form';
27
+ protected $_gateway="https://mapi.alipay.com/gateway.do?";
28
 
29
  // Alipay return codes of payment
30
  const RETURN_CODE_ACCEPTED = 'Success';
52
  */
53
  public function getAlipayUrl()
54
  {
55
+ $url = $this->_gateway;
56
  return $url;
57
  }
58
 
147
  if (!($order instanceof Mage_Sales_Model_Order)) {
148
  Mage::throwException($this->_getHelper()->__('Cannot retrieve order object'));
149
  }
150
+
151
+
152
+ $converted_final_price=$order->getGrandTotal();
153
+
154
+ if($this->getConfigData('service_type')=="create_forex_trade"){
155
+
156
+ $parameter = array('service' => $this->getConfigData('service_type'),
157
+ 'partner' => $this->getConfigData('partner_id'),
158
+ 'return_url' => $this->getReturnURL(),
159
+ 'notify_url' => $this->getNotifyURL(),
160
+ '_input_charset' => 'utf-8',
161
+ 'subject' => $order->getRealOrderId(),
162
+ 'body' => $order->getRealOrderId(),
163
+ 'out_trade_no' => $order->getRealOrderId(), // order ID
164
+ 'total_fee' => sprintf('%.2f', $converted_final_price) ,
165
+ 'currency' => 'USD'
166
+ );
167
  }else{
168
+
169
+ $fromCur = Mage::app()->getStore()->getCurrentCurrencyCode();
170
+ $toCur = 'CNY';
171
+
172
+
173
+
174
+ if(Mage::app()->getStore()->getCurrentCurrencyCode() !=$toCur){
175
+ if(Mage::app()->getStore()->getBaseCurrencyCode()!=$toCur){
176
+
177
+ $rate=Mage::getModel('directory/currency')->load($toCur)->getAnyRate($fromCur);
178
+ $converted_final_price= $order->getGrandTotal()/$rate;
179
+
180
+
181
+ }else{
182
+ $rate=Mage::getModel('directory/currency')->load($toCur)->getAnyRate($fromCur);
183
+ $converted_final_price= $order->getGrandTotal()/$rate;
184
+
185
+ }
186
+ }else{
187
+ //$converted_final_price=$order->getGrandTotal();
188
+ }
189
+ $parameter = array('service' => $this->getConfigData('service_type'),
190
+ 'partner' => $this->getConfigData('partner_id'),
191
+ 'return_url' => $this->getReturnURL(),
192
+ 'notify_url' => $this->getNotifyURL(),
193
+ '_input_charset' => 'utf-8',
194
+ 'subject' => $order->getRealOrderId(),
195
+ 'body' => $order->getRealOrderId(),
196
+ 'out_trade_no' => $order->getRealOrderId(), // order ID
197
+ 'logistics_fee' => '0.00', //because magento has shipping system, it has included shipping price
198
+ 'logistics_payment' => 'BUYER_PAY', //always
199
+ 'logistics_type' => 'EXPRESS', //Only three shipping method:POST,EMS,EXPRESS
200
+ 'price' => sprintf('%.2f', $converted_final_price) ,
201
+ 'payment_type' => '1',
202
+ 'quantity' => '1', // For the moment, the parameter of price is total price, so the quantity is 1.
203
+ 'show_url' => Mage::getUrl(),
204
+ 'seller_email' => $this->getConfigData('seller_email')
205
+ );
206
  }
207
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  $parameter = $this->para_filter($parameter);
209
  $security_code = $this->getConfigData('security_code');
210
  $sign_type = 'MD5';
app/code/community/CosmoCommerce/Alipay/Model/Source/Language.php CHANGED
@@ -12,9 +12,9 @@
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@magentocommerce.com so we can send you a copy immediately.
14
  *
15
- * @category CosmoCommerce
16
- * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@magentocommerce.com so we can send you a copy immediately.
14
  *
15
+ * @category CosmoCommerce
16
+ * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
app/code/community/CosmoCommerce/Alipay/Model/Source/Servicetype.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
@@ -25,9 +25,10 @@ class CosmoCommerce_Alipay_Model_Source_Servicetype
25
  public function toOptionArray()
26
  {
27
  return array(
28
- array('value' => 'trade_create_by_buyer', 'label' => Mage::helper('alipay')->__('Products')),
29
- array('value' => 'create_direct_pay_by_user', 'label' => Mage::helper('alipay')->__('Virtual Products')),
30
- array('value' => 'create_partner_trade_by_buyer', 'label' => Mage::helper('alipay')->__('Trade by Buyer')),
 
31
  );
32
  }
33
  }
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
25
  public function toOptionArray()
26
  {
27
  return array(
28
+ array('value' => 'create_forex_trade', 'label' => Mage::helper('alipay')->__('Create Forex Trade')),
29
+ array('value' => 'trade_create_by_buyer', 'label' => Mage::helper('alipay')->__('Trade Create By Buyer')),
30
+ array('value' => 'create_direct_pay_by_user', 'label' => Mage::helper('alipay')->__('Create Direct Pay By User')),
31
+ array('value' => 'create_partner_trade_by_buyer', 'label' => Mage::helper('alipay')->__('Create Partner Trade By Buyer')),
32
  );
33
  }
34
  }
app/code/community/CosmoCommerce/Alipay/Model/Source/Transport.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
app/code/community/CosmoCommerce/Alipay/controllers/PaymentController.php CHANGED
@@ -12,9 +12,9 @@
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@magentocommerce.com so we can send you a copy immediately.
14
  *
15
- * @category CosmoCommerce
16
- * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
@@ -26,6 +26,7 @@ class CosmoCommerce_Alipay_PaymentController extends Mage_Core_Controller_Front_
26
  * Order instance
27
  */
28
  protected $_order;
 
29
 
30
  /**
31
  * Get order
@@ -102,11 +103,7 @@ class CosmoCommerce_Alipay_PaymentController extends Mage_Core_Controller_Front_
102
  $_input_charset='utf-8';
103
  $transport=$alipay->getConfigData('transport');
104
 
105
- if($transport == "https") {
106
- $gateway = "https://www.alipay.com/cooperate/gateway.do?";
107
- } else {
108
- $gateway = "http://notify.alipay.com/trade/notify_query.do?";
109
- }
110
 
111
  if($transport == "https") {
112
  $veryfy_url = $gateway. "service=notify_verify" ."&partner=" .$partner. "&notify_id=".$postData["notify_id"];
@@ -185,7 +182,7 @@ class CosmoCommerce_Alipay_PaymentController extends Mage_Core_Controller_Front_
185
  }
186
 
187
  }
188
- else if($postData['trade_status'] == 'TRADE_FINISHED') {
189
  $order = Mage::getModel('sales/order');
190
  $order->loadByIncrementId($postData['out_trade_no']);
191
  //$order->setAlipayTradeno($postData['trade_no']);
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@magentocommerce.com so we can send you a copy immediately.
14
  *
15
+ * @category CosmoCommerce
16
+ * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
26
  * Order instance
27
  */
28
  protected $_order;
29
+ protected $_gateway="https://mapi.alipay.com/gateway.do?";
30
 
31
  /**
32
  * Get order
103
  $_input_charset='utf-8';
104
  $transport=$alipay->getConfigData('transport');
105
 
106
+ $gateway = $this->_gateway;
 
 
 
 
107
 
108
  if($transport == "https") {
109
  $veryfy_url = $gateway. "service=notify_verify" ."&partner=" .$partner. "&notify_id=".$postData["notify_id"];
182
  }
183
 
184
  }
185
+ else if($postData['trade_status'] == 'TRADE_FINISHED' || $postData['trade_status'] == "TRADE_SUCCESS") {
186
  $order = Mage::getModel('sales/order');
187
  $order->loadByIncrementId($postData['out_trade_no']);
188
  //$order->setAlipayTradeno($postData['trade_no']);
app/code/community/CosmoCommerce/Alipay/etc/config.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version="1.0"?>
2
- <!--
3
  /**
4
  * Magento
5
  *
@@ -13,9 +13,9 @@
13
  * obtain it through the world-wide-web, please send an email
14
  * to license@magentocommerce.com so we can send you a copy immediately.
15
  *
16
- * @category CosmoCommerce
17
- * @package CosmoCommerce_Alipay
18
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
19
  * @contact :
20
  * T: +86-021-66346672
21
  * L: Shanghai,China
@@ -25,7 +25,7 @@
25
  <config>
26
  <modules>
27
  <CosmoCommerce_Alipay>
28
- <version>0.9.2</version>
29
  </CosmoCommerce_Alipay>
30
  </modules>
31
  <global>
1
  <?xml version="1.0"?>
2
+ <!--
3
  /**
4
  * Magento
5
  *
13
  * obtain it through the world-wide-web, please send an email
14
  * to license@magentocommerce.com so we can send you a copy immediately.
15
  *
16
+ * @category CosmoCommerce
17
+ * @package CosmoCommerce_Alipay
18
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
19
  * @contact :
20
  * T: +86-021-66346672
21
  * L: Shanghai,China
25
  <config>
26
  <modules>
27
  <CosmoCommerce_Alipay>
28
+ <version>1.5.0</version>
29
  </CosmoCommerce_Alipay>
30
  </modules>
31
  <global>
app/code/community/CosmoCommerce/Alipay/etc/system.xml CHANGED
@@ -13,9 +13,9 @@
13
  * obtain it through the world-wide-web, please send an email
14
  * to license@magentocommerce.com so we can send you a copy immediately.
15
  *
16
- * @category CosmoCommerce
17
- * @package CosmoCommerce_Alipay
18
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
19
  * @contact :
20
  * T: +86-021-66346672
21
  * L: Shanghai,China
@@ -43,8 +43,11 @@
43
  <show_in_website>1</show_in_website>
44
  <show_in_store>0</show_in_store>
45
  </active>
46
- <title translate="label">
47
  <label>Title</label>
 
 
 
48
  <frontend_type>text</frontend_type>
49
  <sort_order>2</sort_order>
50
  <show_in_default>1</show_in_default>
@@ -52,8 +55,11 @@
52
  <show_in_store>0</show_in_store>
53
  </title>
54
 
55
- <service_type translate="label">
56
- <label>Service Type</label>
 
 
 
57
  <frontend_type>select</frontend_type>
58
  <source_model>alipay/source_servicetype</source_model>
59
  <sort_order>3</sort_order>
@@ -63,38 +69,53 @@
63
  </service_type>
64
  <gateway translate="label">
65
  <label>Gateway</label>
 
 
 
66
  <frontend_type>text</frontend_type>
67
  <sort_order>4</sort_order>
68
  <show_in_default>1</show_in_default>
69
  <show_in_website>1</show_in_website>
70
  <show_in_store>0</show_in_store>
71
  </gateway>
72
- <partner_id translate="label">
73
  <label>Partner ID</label>
 
 
 
74
  <frontend_type>text</frontend_type>
75
  <sort_order>5</sort_order>
76
  <show_in_default>1</show_in_default>
77
  <show_in_website>1</show_in_website>
78
  <show_in_store>0</show_in_store>
79
  </partner_id>
80
- <security_code translate="label">
81
  <label>Security Code</label>
 
 
 
82
  <frontend_type>text</frontend_type>
83
  <sort_order>6</sort_order>
84
  <show_in_default>1</show_in_default>
85
  <show_in_website>1</show_in_website>
86
  <show_in_store>0</show_in_store>
87
  </security_code>
88
- <seller_email translate="label">
89
  <label>Seller Email</label>
 
 
 
90
  <frontend_type>text</frontend_type>
91
  <sort_order>7</sort_order>
92
  <show_in_default>1</show_in_default>
93
  <show_in_website>1</show_in_website>
94
  <show_in_store>0</show_in_store>
95
  </seller_email>
96
- <transport translate="label">
97
  <label>Transport</label>
 
 
 
98
  <frontend_type>select</frontend_type>
99
  <source_model>alipay/source_transport</source_model>
100
  <sort_order>8</sort_order>
13
  * obtain it through the world-wide-web, please send an email
14
  * to license@magentocommerce.com so we can send you a copy immediately.
15
  *
16
+ * @category CosmoCommerce
17
+ * @package CosmoCommerce_Alipay
18
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
19
  * @contact :
20
  * T: +86-021-66346672
21
  * L: Shanghai,China
43
  <show_in_website>1</show_in_website>
44
  <show_in_store>0</show_in_store>
45
  </active>
46
+ <title translate="label comment">
47
  <label>Title</label>
48
+ <comment>
49
+ <![CDATA[Would be displayed at the frontend payment method selection list.<br /><span class="notice">This is a required field</span>]]>
50
+ </comment>
51
  <frontend_type>text</frontend_type>
52
  <sort_order>2</sort_order>
53
  <show_in_default>1</show_in_default>
55
  <show_in_store>0</show_in_store>
56
  </title>
57
 
58
+ <service_type translate="label comment">
59
+ <label>Contract Type</label>
60
+ <comment>
61
+ <![CDATA[Contract Type with Alipay. <br /><b>Create Forex Trade</b>:Internation Payments Type,<b>Trade Create By Buyer</b><b>Create Direct Pay By User</b><b>Create Partner Trade By Buyer</b><br />If you have trouble to choose the type please contact<b>payment@cosmocommerce.com</b><br /><span class="notice">This is a required field</span>]]>
62
+ </comment>
63
  <frontend_type>select</frontend_type>
64
  <source_model>alipay/source_servicetype</source_model>
65
  <sort_order>3</sort_order>
69
  </service_type>
70
  <gateway translate="label">
71
  <label>Gateway</label>
72
+ <comment>
73
+ <![CDATA[Deprecated field]]>
74
+ </comment>
75
  <frontend_type>text</frontend_type>
76
  <sort_order>4</sort_order>
77
  <show_in_default>1</show_in_default>
78
  <show_in_website>1</show_in_website>
79
  <show_in_store>0</show_in_store>
80
  </gateway>
81
+ <partner_id translate="label comment">
82
  <label>Partner ID</label>
83
+ <comment>
84
+ <![CDATA[Please find the Partner ID at alipay merchant center.<br /><span class="notice">This is a required field</span>]]>
85
+ </comment>
86
  <frontend_type>text</frontend_type>
87
  <sort_order>5</sort_order>
88
  <show_in_default>1</show_in_default>
89
  <show_in_website>1</show_in_website>
90
  <show_in_store>0</show_in_store>
91
  </partner_id>
92
+ <security_code translate="label comment">
93
  <label>Security Code</label>
94
+ <comment>
95
+ <![CDATA[Please find the Security Code at alipay merchant center.<br /><span class="notice">This is a required field</span>]]>
96
+ </comment>
97
  <frontend_type>text</frontend_type>
98
  <sort_order>6</sort_order>
99
  <show_in_default>1</show_in_default>
100
  <show_in_website>1</show_in_website>
101
  <show_in_store>0</show_in_store>
102
  </security_code>
103
+ <seller_email translate="label comment">
104
  <label>Seller Email</label>
105
+ <comment>
106
+ <![CDATA[Please fill the seller email which bind with your alipay merchant.<br /><span class="notice">This is a required field except Internation Payment Type</span>]]>
107
+ </comment>
108
  <frontend_type>text</frontend_type>
109
  <sort_order>7</sort_order>
110
  <show_in_default>1</show_in_default>
111
  <show_in_website>1</show_in_website>
112
  <show_in_store>0</show_in_store>
113
  </seller_email>
114
+ <transport translate="label comment">
115
  <label>Transport</label>
116
+ <comment>
117
+ <![CDATA[Default please select https.<br /><span class="notice">This is a required field</span>]]>
118
+ </comment>
119
  <frontend_type>select</frontend_type>
120
  <source_model>alipay/source_transport</source_model>
121
  <sort_order>8</sort_order>
app/code/community/CosmoCommerce/Alipay/sql/alipay_setup/mysql4-install-0.1.0.php CHANGED
@@ -14,12 +14,10 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
23
-
24
-
25
  $installer = $this;
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
 
 
23
  $installer = $this;
app/code/community/CosmoCommerce/Alipay/sql/alipay_setup/mysql4-install-0.9.2.php CHANGED
@@ -14,12 +14,11 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
23
 
24
-
25
  $installer = $this;
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
23
 
 
24
  $installer = $this;
app/{design/frontend/default/default/template/alipay/error.phtml → code/community/CosmoCommerce/Updates/Helper/Data.php} RENAMED
@@ -14,14 +14,16 @@
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
23
- ?>
24
- <div class="page-head">
25
- <h3><?php echo $this->__('Error occured') ?></h3>
26
- </div>
27
- <p><?php echo $this->__('There was an error occurred during paying process.') ?></p>
 
 
14
  *
15
  * @category CosmoCommerce
16
  * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
  * @contact :
19
  * T: +86-021-66346672
20
  * L: Shanghai,China
21
  * M:sales@cosmocommerce.com
22
  */
23
+
24
+ class CosmoCommerce_Updates_Helper_Data extends Mage_Core_Helper_Abstract
25
+ {
26
+
27
+ }
28
+
29
+
app/code/community/CosmoCommerce/Updates/Model/Feed.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CosmoCommerce
16
+ * @package CosmoCommerce_Alipay
17
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
+ * @contact :
19
+ * T: +86-021-66346672
20
+ * L: Shanghai,China
21
+ * M:sales@cosmocommerce.com
22
+ */
23
+
24
+ class CosmoCommerce_Updates_Model_Feed extends Mage_AdminNotification_Model_Feed
25
+ {
26
+ const XML_USE_HTTPS_PATH = 'cosmocommerce/feed/use_https';
27
+ const XML_FEED_URL_PATH = 'cosmocommerce/feed/url';
28
+ const XML_FREQUENCY_PATH = 'cosmocommerce/feed/frequency';
29
+ const XML_FREQUENCY_ENABLE = 'cosmocommerce/feed/enable';
30
+ const XML_LAST_UPDATE_PATH = 'cosmocommerce/feed/last_update';
31
+
32
+
33
+ public static function check(){
34
+ // if(!Mage::getStoreConfig(self::XML_FREQUENCY_ENABLE)){
35
+ // return;
36
+ // }
37
+ return Mage::getModel('cosmocommerce/feed')->checkUpdate();
38
+ }
39
+
40
+ public function getFrequency()
41
+ {
42
+ return Mage::getStoreConfig(self::XML_FREQUENCY_PATH) * 1;
43
+ }
44
+
45
+ public function getLastUpdate()
46
+ {
47
+ //return 100;
48
+ return Mage::app()->loadCache('cosmocommerce_notifications_lastcheck');
49
+ }
50
+
51
+ public function setLastUpdate()
52
+ {
53
+ Mage::app()->saveCache(time(), 'cosmocommerce_notifications_lastcheck');
54
+ return $this;
55
+ }
56
+ public function getFeedUrl()
57
+ {
58
+
59
+ if (is_null($this->_feedUrl)) {
60
+ $this->_feedUrl = (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://')
61
+ . Mage::getStoreConfig(self::XML_FEED_URL_PATH);
62
+ }
63
+ return $this->_feedUrl;
64
+ }
65
+
66
+ public function checkUpdate()
67
+ {
68
+ if (($this->getFrequency() + $this->getLastUpdate()) > time()) {
69
+ return $this;
70
+ }
71
+
72
+ $feedData = array();
73
+
74
+ $feedXml = $this->getFeedData();
75
+
76
+ if ($feedXml && $feedXml->channel && $feedXml->channel->item) {
77
+ foreach ($feedXml->channel->item as $item) {
78
+ $feedData[] = array(
79
+ 'severity' => (int)$item->severity ? (int)$item->severity : 3,
80
+ 'date_added' => $this->getDate((string)$item->pubDate),
81
+ 'title' => (string)$item->title,
82
+ 'description' => (string)$item->description,
83
+ 'url' => (string)$item->link,
84
+ );
85
+ }
86
+ if ($feedData) {
87
+ Mage::getModel('adminnotification/inbox')->parse(array_reverse($feedData));
88
+ }
89
+
90
+ }
91
+ $this->setLastUpdate();
92
+
93
+ return $this;
94
+ }
95
+
96
+ }
app/code/community/CosmoCommerce/Updates/etc/adminhtml.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category CosmoCommerce
17
+ * @package CosmoCommerce_Alipay
18
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
19
+ * @contact :
20
+ * T: +86-021-66346672
21
+ * L: Shanghai,China
22
+ * M:sales@cosmocommerce.com
23
+ */
24
+ -->
app/code/community/CosmoCommerce/Updates/etc/config.xml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category CosmoCommerce
17
+ * @package CosmoCommerce_Alipay
18
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
19
+ * @contact :
20
+ * T: +86-021-66346672
21
+ * L: Shanghai,China
22
+ * M:sales@cosmocommerce.com
23
+ */
24
+ -->
25
+ <config>
26
+ <modules>
27
+ <CosmoCommerce_Updates>
28
+ <version>0.1</version>
29
+ </CosmoCommerce_Updates>
30
+ </modules>
31
+ <global>
32
+ <models>
33
+ <cosmocommerce>
34
+ <class>CosmoCommerce_Updates_Model</class>
35
+ </cosmocommerce>
36
+ </models>
37
+
38
+ <helpers>
39
+ <cosmocommerce>
40
+ <class>CosmoCommerce_Updates_Helper</class>
41
+ </cosmocommerce>
42
+ </helpers>
43
+ </global>
44
+ <adminhtml>
45
+ <acl>
46
+ <resources>
47
+ <all>
48
+ <title>Allow Everything</title>
49
+ </all>
50
+ <admin>
51
+ <children>
52
+ <system>
53
+ <children>
54
+ <config>
55
+ <children>
56
+ <cosmocommerce>
57
+ <title>CosmoCommerce</title>
58
+ <children>
59
+ <feed>
60
+ <title>Feed</title>
61
+ </feed>
62
+ </children>
63
+ </cosmocommerce>
64
+ </children>
65
+ </config>
66
+ </children>
67
+ </system>
68
+ </children>
69
+ </admin>
70
+ </resources>
71
+ </acl>
72
+ <events>
73
+ <controller_action_predispatch>
74
+ <observers>
75
+ <cosmocommerce>
76
+ <type>singleton</type>
77
+ <class>cosmocommerce/feed</class>
78
+ <method>check</method>
79
+ </cosmocommerce>
80
+ </observers>
81
+ </controller_action_predispatch>
82
+ </events>
83
+ </adminhtml>
84
+ <default>
85
+ <cosmocommerce>
86
+ <feed>
87
+ <url>www.cosmocommerce.com/update/feed.xml</url>
88
+ <use_https>0</use_https>
89
+ <frequency>24</frequency>
90
+ <enable>1</enable>
91
+ </feed>
92
+ </cosmocommerce>
93
+ </default>
94
+ </config>
app/code/community/CosmoCommerce/Updates/etc/system.xml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category CosmoCommerce
17
+ * @package CosmoCommerce_Alipay
18
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
19
+ * @contact :
20
+ * T: +86-021-66346672
21
+ * L: Shanghai,China
22
+ * M:sales@cosmocommerce.com
23
+ */
24
+ -->
25
+ <config>
26
+ <tabs>
27
+ <cosmocommerce translate="label" module="cosmocommerce">
28
+ <label>CosmoCommerce.com</label>
29
+ <sort_order>300</sort_order>
30
+ </cosmocommerce>
31
+ </tabs>
32
+ <sections>
33
+ <cosmocommerce translate="label" module="cosmocommerce">
34
+ <label>Update Settings</label>
35
+ <tab>cosmocommerce</tab>
36
+ <frontend_type>text</frontend_type>
37
+ <sort_order>99999</sort_order>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>1</show_in_store>
41
+ <groups>
42
+ <feed>
43
+ <label>Update Notifications</label>
44
+ <frontend_type>text</frontend_type>
45
+ <sort_order>60</sort_order>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ <fields>
50
+ <enable translate="label">
51
+ <label>Enable </label>
52
+ <comment><![CDATA[ <b>To get the latest security updates we suggest to enable this module.</b><br /><img src="http://www.cosmocommerce.com/images/logo.png" /><br />Contact Information:<br />Tel:+86-021-66346672<br />Support:support@cosmocommerce.com <br />Sales:sales@cosmocommerce.com<br />Website:<a href="http://www.cosmocommerce.com" target="_blank" >CosmoCommerce.com</a>]]></comment>
53
+ <frontend_type>select</frontend_type>
54
+ <sort_order>90</sort_order>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>0</show_in_website>
57
+ <show_in_store>0</show_in_store>
58
+ <source_model>adminhtml/system_config_source_yesno</source_model>
59
+ </enable>
60
+ </fields>
61
+ </feed>
62
+ </groups>
63
+ </cosmocommerce>
64
+ </sections>
65
+ </config>
app/design/frontend/default/default/template/alipay/form.phtml DELETED
@@ -1,57 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @category CosmoCommerce
16
- * @package CosmoCommerce_Alipay
17
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
18
- * @contact :
19
- * T: +86-021-66346672
20
- * L: Shanghai,China
21
- * M:sales@cosmocommerce.com
22
- */
23
- ?>
24
-
25
-
26
-
27
- <fieldset class="form-divst">
28
- <?php $_code=$this->getMethodCode() ?>
29
- <ul id="payment_form_<?php echo $_code ?>" style="display:none">
30
- <div style="height:30px;">
31
- <div style="width:120px;margin-left:10px;float:left;"><img width="100" height="20" border="0" alt="中国工商银行" src="https://img.alipay.com/img/bank/icon_zggsyh_s_pr.gif"/></div>
32
- <div style="width:120px;margin-left:10px;float:left;"><img height="20" border="0" alt="招商银行" src="https://img.alipay.com/img/bank/icon_zsyh_s.gif"/></div>
33
- <div style="width:120px;margin-left:10px;float:left;"><img height="20" border="0" alt="中国建设银行" src="https://img.alipay.com/img/bank/icon_ccb_s.gif"/> </div>
34
- <div style="width:120px;margin-left:10px;float:left;"><img width="100" height="20" border="0" alt="中国农业银行" src="https://img.alipay.com/img/bank/abc_pr.gif"/> </div>
35
- </div>
36
- <div style="height:30px;">
37
- <div style="width:120px;margin-left:10px;float:left;"><img height="20" border="0" alt="交通银行" src="https://img.alipay.com/img/bank/icon_comm_s.gif"/> </div>
38
- <div style="width:120px;margin-left:10px;float:left;"><img height="20" border="0" alt="中国光大银行" src="https://img.alipay.com/img/bank/icon_cebbank_s.gif"/> </div>
39
- <div style="width:120px;margin-left:10px;float:left;"><img width="100" height="20" border="0" alt="上海浦东发展银行" src="https://img.alipay.com/img/bank/spdb_pr.gif"/> </div>
40
- <div style="width:120px;margin-left:10px;float:left;"><img height="20" border="0" alt="广东发展银行" src="https://img.alipay.com/img/bank/icon_gdb_s.gif"/> </div>
41
- </div>
42
- <div style="height:30px;">
43
- <div style="width:120px;margin-left:10px;float:left;"><img height="20" border="0" alt="中信银行" src="https://img.alipay.com/img/bank/icon_itic_s.gif"/> </div>
44
- <div style="width:120px;margin-left:10px;float:left;"><img height="20" border="0" alt="兴业银行" src="https://img.alipay.com/img/bank/index_38.gif"/> </div>
45
- <div style="width:120px;margin-left:10px;float:left;"><img height="20" border="0" alt="深圳发展银行" src="https://img.alipay.com/img/bank/icon_sdb_s.gif"/> </div>
46
- <div style="width:120px;margin-left:10px;float:left;"><img height="20" border="0" alt="中国民生银行" src="https://img.alipay.com/img/bank/icon_cmbc_s.gif"/> </div>
47
- </div>
48
- <div style="height:30px;">
49
- <div style="width:120px;margin-left:10px;float:left;"><img width="100" height="20" border="0" alt="上海浦东发展银行" src="https://img.alipay.com/img/bank/spdb_co.gif"/> </div>
50
- <div style="width:120px;margin-left:10px;float:left;"><img width="100" height="20" border="0" alt="中国工商银行" src="https://img.alipay.com/img/bank/icon_zggsyh_s_co.gif"/> </div>
51
- <div style="width:120px;margin-left:10px;float:left;"><img width="100" height="20" border="0" alt="中国农业银行" src="https://img.alipay.com/img/bank/abc_co.gif"/> </div>
52
- </div>
53
- <div style="clear:both;">
54
- <?php echo $this->__('You will be redirected to alipay website when you place an order.') ?>
55
- </div>
56
- </ul>
57
- </fieldset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/etc/modules/CosmoCommerce_Alipay.xml CHANGED
@@ -15,7 +15,7 @@
15
  *
16
  * @category CosmoCommerce
17
  * @package CosmoCommerce_Alipay
18
- * @copyright Copyright (c) 2009 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
19
  * @contact :
20
  * T: +86-021-66346672
21
  * L: Shanghai,China
15
  *
16
  * @category CosmoCommerce
17
  * @package CosmoCommerce_Alipay
18
+ * @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
19
  * @contact :
20
  * T: +86-021-66346672
21
  * L: Shanghai,China
app/etc/modules/CosmoCommerce_Updates.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <CosmoCommerce_Updates>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </CosmoCommerce_Updates>
8
+ </modules>
9
+ </config>
app/locale/zh_CN/CosmoCommerce_Alipay.csv DELETED
@@ -1,31 +0,0 @@
1
- " There was an error occurred during paying process.","在支付的过程中发生了一个错误"
2
- "Bank","银行"
3
- "Service Type","服务类型"
4
- "Enabled","启用"
5
- "English","英语"
6
- "Error occured","发生错误"
7
- "Key","加密号"
8
- "New order status","新的订单号状态"
9
- "Order %s","Order %s"
10
- "Order number will be used if left empty","Order number will be used if left empty"
11
- "Site code","网站代码"
12
- "Sort order","排序方法"
13
- "Spain","西班牙"
14
- "Test mode","测试模式"
15
- "There was an error occurred during paying process.","在支付的过程中发生了一个错误"
16
- "Title","标题"
17
- "Transaction Description","交易描述"
18
- "Products","担保支付(实物产品)"
19
- "Virtual Products","即时支付(虚拟产品)"
20
- "You will be redirected to alipay website when you place an order.","下订单时,会转向支付宝网站。"
21
- "You will be redirected to Alipay in a few seconds.","您很快将会转向支付宝网站"
22
- "Gateway","接口地址"
23
- "Partner ID","合作伙伴ID (即Partner ID)"
24
- "Security Code","安全校验号"
25
- "Seller Email","支付宝账号(邮件地址或ID)"
26
- "Transport","传输协议"
27
- "Order status when payment accepted by Alipay","支付宝订单接受状态"
28
- "Order status when payment refused by Alipay","支付宝订单拒绝状态"
29
- "Payment from applicable countries","支付允许国家"
30
- "CosmoCommerce Alipay Payment","CosmoCommerce 支付宝支付接口"
31
- "Payment from Specific countries","支付指定国家"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,18 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cosmo_Community_AlipayPaymentGateway</name>
4
- <version>1.4.1.0</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Alipay for magento payment gateway from CosmoCommerce .</summary>
10
- <description>Alipay for magento payment gateway from CosmoCommerce .</description>
11
- <notes>8-1 security fix</notes>
12
- <authors><author><name>AirForce</name><user>auto-converted</user><email>airforce.e@gmail.com</email></author><author><name>CosmoDev</name><user>auto-converted</user><email>it@cosmocommerce.com</email></author><author><name>CosmoSales</name><user>auto-converted</user><email>sales@cosmocommerce.com</email></author></authors>
13
- <date>2010-07-31</date>
14
- <time>21:20:01</time>
15
- <contents><target name="magecommunity"><dir name="CosmoCommerce"><dir name="Alipay"><dir name="Block"><file name="Error.php" hash="c817532072a449b23de43ceda3e3449e"/><file name="Form.php" hash="48c64059360ff2f0c44bf24d521748c3"/><file name="Redirect.php" hash="645e71d610a544ff82c4bb7880420d82"/></dir><dir name="controllers"><file name="PaymentController.php" hash="fd041717cc226f543ea620b64db9e893"/></dir><dir name="etc"><file name="config.xml" hash="73290c161116129e355057948876bd76"/><file name="system.xml" hash="50bdd75296d629022d08f1483f1b5f74"/></dir><dir name="Helper"><file name="Data.php" hash="b43e523edae0133880db5321547e3656"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="2bcb550e5be88d775d175d6606a33abf"/></dir><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="f087249aa312269b65777307045b68f7"/></dir><file name="Debug.php" hash="0706de6770627d74826e6c9926f9bf21"/></dir><file name="Setup.php" hash="3c10dc21599a9be8ec2ea026408d0273"/></dir><dir name="Source"><file name="Language.php" hash="b42df09453e0cc1926d47389add5b17f"/><file name="Servicetype.php" hash="7c143c2f425a4bdec40f9bc596b8da1b"/><file name="Transport.php" hash="25d4c26a05bce13d8efad5f0f54e3b71"/></dir><file name="Payment.php" hash="5004e51317560503429fcd2fe1c5e90c"/></dir><dir name="sql"><dir name="alipay_setup"><file name="mysql4-install-0.1.0.php" hash="fb9240c68056ab9f023e3e205647401b"/><file name="mysql4-install-0.9.2.php" hash="fb9240c68056ab9f023e3e205647401b"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="CosmoCommerce_Alipay.csv" hash="3ab19412641b6649ee4ea1fca6a9c017"/></dir><dir name="zh_CN"><file name="CosmoCommerce_Alipay.csv" hash="0e61b9b81fd54140a5219a3a7f497c2c"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="alipay"><file name="error.phtml" hash="7d4db86d4b4f7248423949c8fd404eb9"/><file name="form.phtml" hash="10333be234e64a494305339ea1cae7c7"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CosmoCommerce_Alipay.xml" hash="55e6434f09eb7bde74bc9da39a8be7eb"/></dir></target></contents>
 
 
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cosmo_Community_AlipayPaymentGateway</name>
4
+ <version>1.5.0</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Alipay for magento payment gateway from CosmoCommerce</summary>
10
+ <description>Alipay for magento payment gateway from CosmoCommerce</description>
11
+ <notes>Add support for international payment credit cards.&#xD;
12
+ &#xD;
13
+ Add updater for module.</notes>
14
+ <authors><author><name>Cosmo Mao</name><user>auto-converted</user><email>gongyuan.mao@cosmocommerce.com</email></author></authors>
15
+ <date>2013-08-04</date>
16
+ <time>17:56:42</time>
17
+ <contents><target name="magecommunity"><dir name="CosmoCommerce"><dir name="Alipay"><dir name="Block"><file name="Error.php" hash="4350b189d1fa2b246288af23c0b9647d"/><file name="Form.php" hash="caed8eb9bb734eeb6604fbf892f11f66"/><file name="Redirect.php" hash="654292e7eed5ceb569555385863064a4"/></dir><dir name="Helper"><file name="Data.php" hash="ffeb76ef5e1f5899b7764642c8f8d53d"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="44e7f77d1845aefa58d3a828f5595a0f"/></dir><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="e49187a644dd9400170164eabfe5da19"/></dir><file name="Debug.php" hash="0dfd720a7b17d74e23117cb1b3ccd4bb"/></dir><file name="Setup.php" hash="549584bfec4351129df78431aef5c215"/></dir><dir name="Source"><file name="Language.php" hash="71a9ba2616d003fb8bf960e20229b778"/><file name="Servicetype.php" hash="59d44d4b1a8d122ded55e7838cc815dc"/><file name="Transport.php" hash="c445cb4b8b3653bb0fce9c29bb02459e"/></dir><file name="Payment.php" hash="570a3c03c32cc2a93afd2b6ac1abc32a"/></dir><dir name="controllers"><file name="PaymentController.php" hash="faba636e5e2dec5eabb2aa7334358513"/></dir><dir name="etc"><file name="config.xml" hash="60c8a576a8f973d3e7cfce6fa4ad396c"/><file name="system.xml" hash="c873aed10fd162de801d06e757c1c50d"/></dir><dir name="sql"><dir name="alipay_setup"><file name="mysql4-install-0.1.0.php" hash="9c55d00743e11c399131a5f551c517b5"/><file name="mysql4-install-0.9.2.php" hash="4ac10426fb68e49ef7152df0f7122fbd"/></dir></dir></dir><dir name="Updates"><dir name="Helper"><file name="Data.php" hash="c7eac59b50b02be7aaf4eb59986aed08"/></dir><dir name="Model"><file name="Feed.php" hash="c29278c2223fbb59691f61c7be277a6f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="eb44d4aee2b6b51be173930328ae5b46"/><file name="config.xml" hash="6fd6857d1dab8c22aa00f2ccfbda7123"/><file name="system.xml" hash="6f96c34f5ed61143e377d8142cf139b4"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CosmoCommerce_Alipay.xml" hash="d1fdbde8a9074cac4edc527fae080fea"/><file name="CosmoCommerce_Updates.xml" hash="ec62936984215a2815bb81052be4a47e"/></dir></target><target name="magelocale"><dir name="en_US"><file name="CosmoCommerce_Alipay.csv" hash="3ab19412641b6649ee4ea1fca6a9c017"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies/>
20
  </package>