Version Notes
add new service support-create_partner_trade_by_buyer
2010-06-05:
add currency convert
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Cosmo_Community_AlipayPaymentGateway |
| Version | 1.4.0.2 |
| Comparing to | |
| See all releases | |
Code changes from version 1.4.0.1 to 1.4.0.2
app/code/community/CosmoCommerce/Alipay/Model/Payment.php
CHANGED
|
@@ -148,6 +148,13 @@ class CosmoCommerce_Alipay_Model_Payment extends Mage_Payment_Model_Method_Abstr
|
|
| 148 |
Mage::throwException($this->_getHelper()->__('Cannot retrieve order object'));
|
| 149 |
}
|
| 150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
$parameter = array('service' => $this->getConfigData('service_type'),
|
| 152 |
'partner' => $this->getConfigData('partner_id'),
|
| 153 |
'return_url' => $this->getReturnURL(),
|
|
@@ -159,7 +166,7 @@ class CosmoCommerce_Alipay_Model_Payment extends Mage_Payment_Model_Method_Abstr
|
|
| 159 |
'logistics_fee' => '0.00', //because magento has shipping system, it has included shipping price
|
| 160 |
'logistics_payment' => 'BUYER_PAY', //always
|
| 161 |
'logistics_type' => 'EXPRESS', //Only three shipping method:POST,EMS,EXPRESS
|
| 162 |
-
'price' => sprintf('%.2f', $
|
| 163 |
'payment_type' => '1',
|
| 164 |
'quantity' => '1', // For the moment, the parameter of price is total price, so the quantity is 1.
|
| 165 |
'show_url' => Mage::getUrl(),
|
| 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(),
|
| 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(),
|
app/code/community/CosmoCommerce/Alipay/etc/config.xml
CHANGED
|
@@ -25,7 +25,7 @@
|
|
| 25 |
<config>
|
| 26 |
<modules>
|
| 27 |
<CosmoCommerce_Alipay>
|
| 28 |
-
<version>0.9.
|
| 29 |
</CosmoCommerce_Alipay>
|
| 30 |
</modules>
|
| 31 |
<global>
|
| 25 |
<config>
|
| 26 |
<modules>
|
| 27 |
<CosmoCommerce_Alipay>
|
| 28 |
+
<version>0.9.1</version>
|
| 29 |
</CosmoCommerce_Alipay>
|
| 30 |
</modules>
|
| 31 |
<global>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Cosmo_Community_AlipayPaymentGateway</name>
|
| 4 |
-
<version>1.4.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -18,11 +18,14 @@ Tel: +86-021-66346672
|
|
| 18 |
Cosmo Mao
|
| 19 |
|
| 20 |
Welcome your feedback, thanks!</description>
|
| 21 |
-
<notes>add new service support-create_partner_trade_by_buyer
|
|
|
|
|
|
|
|
|
|
| 22 |
<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>
|
| 23 |
-
<date>2010-
|
| 24 |
-
<time>
|
| 25 |
-
<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="27a1a7a636ea1cf09014906848513729"/></dir><dir name="etc"><file name="config.xml" hash="
|
| 26 |
<compatible/>
|
| 27 |
<dependencies/>
|
| 28 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Cosmo_Community_AlipayPaymentGateway</name>
|
| 4 |
+
<version>1.4.0.2</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
| 7 |
<channel>community</channel>
|
| 18 |
Cosmo Mao
|
| 19 |
|
| 20 |
Welcome your feedback, thanks!</description>
|
| 21 |
+
<notes>add new service support-create_partner_trade_by_buyer
|
| 22 |
+
|
| 23 |
+
2010-06-05:
|
| 24 |
+
add currency convert</notes>
|
| 25 |
<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>
|
| 26 |
+
<date>2010-06-04</date>
|
| 27 |
+
<time>20:15:16</time>
|
| 28 |
+
<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="27a1a7a636ea1cf09014906848513729"/></dir><dir name="etc"><file name="config.xml" hash="4a916376ba0121d843fef5e34fbd141e"/><file name="system.xml" hash="50bdd75296d629022d08f1483f1b5f74"/></dir><dir name="Helper"><file name="Data.php" hash="b43e523edae0133880db5321547e3656"/></dir><dir name="Model"><file name="Payment.php" hash="5004e51317560503429fcd2fe1c5e90c"/><dir name="Api"><file name="Debug.php" hash="2bcb550e5be88d775d175d6606a33abf"/></dir><dir name="Mysql4"><file name="Setup.php" hash="3c10dc21599a9be8ec2ea026408d0273"/><dir name="Api"><file name="Debug.php" hash="0706de6770627d74826e6c9926f9bf21"/><dir name="Debug"><file name="Collection.php" hash="f087249aa312269b65777307045b68f7"/></dir></dir></dir><dir name="Source"><file name="Language.php" hash="b42df09453e0cc1926d47389add5b17f"/><file name="Servicetype.php" hash="7c143c2f425a4bdec40f9bc596b8da1b"/><file name="Transport.php" hash="25d4c26a05bce13d8efad5f0f54e3b71"/></dir></dir><dir name="sql"><dir name="alipay_setup"><file name="mysql4-install-0.1.0.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>
|
| 29 |
<compatible/>
|
| 30 |
<dependencies/>
|
| 31 |
</package>
|
