Version Notes
User will get response messages from API on failed transaction.
Fixed authorized and cature for live trasactions.
Download this release
Release Info
Developer | Ashish Khuller |
Extension | netgains_stripe |
Version | 0.1.2 |
Comparing to | |
See all releases |
Code changes from version 0.1.1 to 0.1.2
app/code/local/Netgains/Stripe/Model/Stripe.php
CHANGED
@@ -143,6 +143,7 @@ class Netgains_Stripe_Model_Stripe extends Mage_Payment_Model_Method_Cc
|
|
143 |
}
|
144 |
|
145 |
private function callApi(Varien_Object $payment, $amount,$type){
|
|
|
146 |
$order = $payment->getOrder();
|
147 |
$types = Mage::getSingleton('payment/config')->getCcTypes();
|
148 |
if (isset($types[$payment->getCcType()]))
|
@@ -158,7 +159,7 @@ class Netgains_Stripe_Model_Stripe extends Mage_Payment_Model_Method_Cc
|
|
158 |
try
|
159 |
{
|
160 |
$createtoken= Stripe_Token::create(array( "card" => array( "number" => $payment->getCcNumber(), "exp_month" => $payment->getCcExpMonth(), "exp_year" => $payment->getCcExpYear(), "cvc" => $payment->getCcCid(),"name"=>$billingaddress->getData('firstname').' '.$billingaddress->getData('lastname'),"address_line1"=>$billingaddress->getData('street'),"address_city"=>$billingaddress->getData('city'),"address_state"=>$billingaddress->getData('region'),"address_zip"=>$billingaddress->getData('postcode'),"address_country"=>$billingaddress->getData('country_id'),"customer"=>Mage::getSingleton('customer/session')->getCustomerId() ) ));
|
161 |
-
$createcharge=Stripe_Charge::create(array( "amount" => $totals*100, "currency" => $currencyDesc, "card" => $createtoken->id,"description" => sprintf('#%s, %s', $orderId, $order->getCustomerEmail())));
|
162 |
return array('status'=>1,'transaction_id' => $createcharge->id,'fraud' => rand(0,1));
|
163 |
}
|
164 |
catch (Exception $e)
|
143 |
}
|
144 |
|
145 |
private function callApi(Varien_Object $payment, $amount,$type){
|
146 |
+
$storeId = 'Store Id'.' '.Mage::app()->getStore()->getId();
|
147 |
$order = $payment->getOrder();
|
148 |
$types = Mage::getSingleton('payment/config')->getCcTypes();
|
149 |
if (isset($types[$payment->getCcType()]))
|
159 |
try
|
160 |
{
|
161 |
$createtoken= Stripe_Token::create(array( "card" => array( "number" => $payment->getCcNumber(), "exp_month" => $payment->getCcExpMonth(), "exp_year" => $payment->getCcExpYear(), "cvc" => $payment->getCcCid(),"name"=>$billingaddress->getData('firstname').' '.$billingaddress->getData('lastname'),"address_line1"=>$billingaddress->getData('street'),"address_city"=>$billingaddress->getData('city'),"address_state"=>$billingaddress->getData('region'),"address_zip"=>$billingaddress->getData('postcode'),"address_country"=>$billingaddress->getData('country_id'),"customer"=>Mage::getSingleton('customer/session')->getCustomerId() ) ));
|
162 |
+
$createcharge=Stripe_Charge::create(array( "amount" => $totals*100, "currency" => $currencyDesc, "card" => $createtoken->id,"statement_descriptor"=>$storeId,"description" => sprintf('#%s, %s', $orderId, $order->getCustomerEmail())));
|
163 |
return array('status'=>1,'transaction_id' => $createcharge->id,'fraud' => rand(0,1));
|
164 |
}
|
165 |
catch (Exception $e)
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>netgains_stripe</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
@@ -11,9 +11,9 @@
|
|
11 |
<notes>User will get response messages from API on failed transaction.
|
12 |
Fixed authorized and cature for live trasactions.</notes>
|
13 |
<authors><author><name>Rohit Dhiman</name><user>netgainsorg</user><email>biz@netgains.org</email></author></authors>
|
14 |
-
<date>
|
15 |
-
<time>
|
16 |
-
<contents><target name="magelocal"><dir name="Netgains"><dir name="Stripe"><dir name="Block"><dir name="Form"><file name="Pay.php" hash="1affb1c584f7e13fae4b140adc80aa83"/></dir><dir name="Info"><file name="Pay.php" hash="63753850bff82e329555e9867af0920b"/><file name="Pay.php~" hash="a5c5ed400023fad769b7df871f5288d0"/></dir></dir><dir name="Helper"><file name="Data.php" hash="2f4fc64377398192e5ac6aa718fa79a8"/></dir><dir name="Model"><dir name="Source"><file name="Action.php" hash="fe81c8effe616fed6d752db6a461f630"/></dir><file name="Stripe.php" hash="
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>netgains_stripe</name>
|
4 |
+
<version>0.1.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
11 |
<notes>User will get response messages from API on failed transaction.
|
12 |
Fixed authorized and cature for live trasactions.</notes>
|
13 |
<authors><author><name>Rohit Dhiman</name><user>netgainsorg</user><email>biz@netgains.org</email></author></authors>
|
14 |
+
<date>2015-02-14</date>
|
15 |
+
<time>07:24:26</time>
|
16 |
+
<contents><target name="magelocal"><dir name="Netgains"><dir name="Stripe"><dir name="Block"><dir name="Form"><file name="Pay.php" hash="1affb1c584f7e13fae4b140adc80aa83"/></dir><dir name="Info"><file name="Pay.php" hash="63753850bff82e329555e9867af0920b"/><file name="Pay.php~" hash="a5c5ed400023fad769b7df871f5288d0"/></dir></dir><dir name="Helper"><file name="Data.php" hash="2f4fc64377398192e5ac6aa718fa79a8"/></dir><dir name="Model"><dir name="Source"><file name="Action.php" hash="fe81c8effe616fed6d752db6a461f630"/></dir><file name="Stripe.php" hash="359a689223faa59903a56ad8f9accf74"/><dir name="stripe"><file name="CHANGELOG" hash="34597ade22d9002dab7801b06dfedc12"/><file name="LICENSE" hash="3f60503742f733f3624aacef32afa581"/><file name="README.rdoc" hash="de20e74904f04c03119ec624bec14dd9"/><file name="VERSION" hash="a641995f5b1adc921d379a100407dc14"/><file name="composer.json" hash="60a2dd1119cee52d925245118c4c3bfc"/><dir name="lib"><dir name="Stripe"><file name="Account.php" hash="54b56a327935a7542119247b1171c2b7"/><file name="ApiConnectionError.php" hash="7674930cb61f40e5f3208ad23127de61"/><file name="ApiError.php" hash="d6886665b4d1c666f1b7250d94fe1a00"/><file name="ApiRequestor.php" hash="f44a40817d411f8b9cbfdedfd27f0fa5"/><file name="ApiResource.php" hash="a3806be3b99a9ffcd596a83e0c68e79f"/><file name="ApplicationFee.php" hash="c72c337a5d0806d6a102e7d429fc2047"/><file name="AttachedObject.php" hash="04d143bf291af575c4e3920e84e74814"/><file name="AuthenticationError.php" hash="9fefa5160047e3a90b48cb9feac88b58"/><file name="Balance.php" hash="ffcc0f30d75ada8a8de2c7e3199ae68b"/><file name="BalanceTransaction.php" hash="5d883f22c4e360119b3933de3527a720"/><file name="Card.php" hash="523e326b6f58894eee3bf0afa2adda2e"/><file name="CardError.php" hash="6f06b7d15d6a3633e2c44d866705e6b9"/><file name="Charge.php" hash="97a8159d2adb84d8790c2ac8922bc293"/><file name="Coupon.php" hash="f659b487fac4ad1f0f6611756c7f1ba7"/><file name="Customer.php" hash="7cb94782343c9e7c86051d98f085287b"/><file name="Error.php" hash="60987b661bca9c34a7ce8b7288c7be26"/><file name="Event.php" hash="4d123e2375b6cf20c93c2343cb3a127d"/><file name="InvalidRequestError.php" hash="03f74df02e39529ec3af42e779db571b"/><file name="Invoice.php" hash="5d173b807e22ae832b6423b2f03d5b02"/><file name="InvoiceItem.php" hash="29ff54fb05d21e4f0b32041158f29f87"/><file name="List.php" hash="d4c7e0045c9cd9b9f069b01469bd6f78"/><file name="Object.php" hash="3f9be01d7ec93f887d9b9bca2cc349e3"/><file name="Plan.php" hash="2da1eede19e4cfeb0d5f82c1667294fd"/><file name="RateLimitError.php" hash="065ed8a05bda898e0e6d4306e63d6932"/><file name="Recipient.php" hash="6f808f7f2a656d97d002d71aefdbbd48"/><file name="Refund.php" hash="fb3adf69d8f1e6aec3708b30f7f99aaa"/><file name="SingletonApiResource.php" hash="2407899ebe585442e0447aa0f479b64f"/><file name="Stripe.php" hash="af21b96401807d5c17b9331026682797"/><file name="Subscription.php" hash="49ca40dcf930c62930d9937c49bdca86"/><file name="Token.php" hash="5a3718521c3d230a068eaf11051b9d2e"/><file name="Transfer.php" hash="d37658c7ea42e17fd7d15f4fe11c96c7"/><dir name="Util"><file name="Set.php" hash="b8f9cb0a7ee64dc3f4a11dcfef50008d"/></dir><file name="Util.php" hash="1c1dcea6154861acdc986e44f903c68a"/></dir><file name="Stripe.php" hash="bc0d562ad28e4f44ad28b7e74ae76448"/><dir name="data"><file name="ca-certificates.crt" hash="df9f6d3ec4b782c256b43f430f801a65"/></dir></dir><dir name="test"><dir name="Stripe"><file name="AccountTest.php" hash="6dc3de4d768998a3a49bb7b5f8f28572"/><file name="ApiRequestorTest.php" hash="1fc704117bde384ef087d57157f30798"/><file name="ApplicationFeeTest.php" hash="753ebf9103b61f97c916fa91de85ea0b"/><file name="AuthenticationErrorTest.php" hash="7b9a92ea706c8108ddef3d1258a7d401"/><file name="BalanceTest.php" hash="7b7c0501a4e27b3392fd1a8a93e9bfa0"/><file name="BalanceTransactionTest.php" hash="1bf57c29502ce59c714eebce5386d0c7"/><file name="CardErrorTest.php" hash="0325471fa210cccc2305c43a7b1f248c"/><file name="ChargeTest.php" hash="cb6f1be9a74ddb74fe1f534fb6efd812"/><file name="CouponTest.php" hash="fd96fdba51dcbb51c197ce6f9b11367e"/><file name="CustomerTest.php" hash="92fc46699a1d67e9c8513df5ee90bf22"/><file name="DiscountTest.php" hash="2a6a4dda4aa9058ceb12fab5bfcf740f"/><file name="Error.php" hash="df4ec56fbafc88db4da85c6198da4d62"/><file name="InvalidRequestErrorTest.php" hash="fe94762e7e4b37b787f98279478e3d89"/><file name="InvoiceTest.php" hash="df4b7ad33baf59c19415e33c61892eb3"/><file name="ObjectTest.php" hash="bdc1b02710a4d773c8fe0cb1b275bb67"/><file name="PlanTest.php" hash="feedc0fdc7ed88f6431c1104b510e9b6"/><file name="RecipientTest.php" hash="dfe2e4656f8f3a482831344049284678"/><file name="RefundTest.php" hash="487bfd562ee83c99904aea0dd0b305e5"/><file name="SubscriptionTest.php" hash="601611d9a8a1ff9725d0f97a77c5354d"/><file name="TestCase.php" hash="fad2892cc98d3046eb52d28ba4346bf1"/><file name="Token.php" hash="40a93faf960080219b11b3182f354f5a"/><file name="TransferTest.php" hash="a1b0f6ee50be49ceb78d7180d0e99503"/><file name="UtilTest.php" hash="bea77fb56ca80682f5188e8c7f03a07a"/></dir><file name="Stripe.php" hash="9ea79f9b39fb4656549491c5776131e2"/></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="620450f4c4498eb0002ac8c8c3a7b643"/></dir><dir name="etc"><file name="config.xml" hash="bc11eddb61e11c67edf9946840036344"/><file name="system.xml" hash="0439851f47efc3171ed65de252392a09"/></dir><dir name="sql"><dir name="stripe_setup"><file name="mysql4-install-0.1.0.php" hash="68f93fe8b73aecc28b014b9f491962d9"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Netgains_Stripe.xml" hash="f1cc20dfbde1822dfd2a8e5e4d634924"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="stripe.xml" hash="5ebe778accf58df77b2a7cb5c969be4b"/></dir><dir name="template"><dir name="stripe"><dir name="form"><file name="stripe.phtml" hash="b52e20c18cf71c8200e46193cb51e58f"/></dir></dir></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|