Skip to content

Commit

Permalink
Merge pull request #23 from Affirm/3_2_0
Browse files Browse the repository at this point in the history
New build version 3.2.0
  • Loading branch information
bmoaffirm authored Aug 31, 2016
2 parents e2668af + 5e8e161 commit 0f4c260
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
5 changes: 2 additions & 3 deletions extension/app/code/community/Affirm/Affirm/Model/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,8 @@ public function getCheckoutObject($order)
}
$metadata = array(
'platform_type' => 'Magento',
'platform_version' => $mageVersion,
'platform_affirm' => '3.1.0',
'shipping_type' => $shipping_type
'platform_version' => Mage::getVersion(),
'platform_affirm' => '3.2.0',
);
$checkout = array(
'checkout_id' => $order->getIncrementId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public function redirectAction()
}
$order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
$this->getResponse()
->setBody($this->getLayout()->createBlock('affirm/payment_redirect')->setOrder($order)->toHtml());
->setBody($this->getLayout()->createBlock('affirm/payment_redirect', 'affirm_redirect')
->setOrder($order)->toHtml()
);
$session->unsQuoteId();
$session->unsRedirectUrl();
}
Expand All @@ -48,7 +50,8 @@ public function renderPreOrderAction()
$order = $this->getRequest()->getParam('order');
$quote = $this->getRequest()->getParam('quote');
$checkoutSession = Mage::helper('affirm')->getCheckoutSession();
$string = $this->getLayout()->createBlock('affirm/payment_redirect')->setOrder($order)->toHtml();
$string = $this->getLayout()->createBlock('affirm/payment_redirect', 'affirm_redirect')
->setOrder($order)->toHtml();
$serializedRequest = $checkoutSession->getAffirmOrderRequest();
$proxyRequest = unserialize($serializedRequest);

Expand Down
4 changes: 2 additions & 2 deletions extension/app/code/community/Affirm/Affirm/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<Affirm_Affirm>
<version>3.1.1.0</version>
<version>3.2.0</version>
</Affirm_Affirm>
</modules>
<global>
Expand Down Expand Up @@ -161,7 +161,7 @@
<model>affirm/payment</model>
<!-- WARNING: default value for title removed to prevent it from appearing on checkout page on MCE 1.4.0.1 -->
<title>Affirm: Buy with Monthly Payments</title>
<label_html_custom><![CDATA[<img src="https://cdn-assets.affirm.com/images/blue_logo-transparent_bg.png" width="39" height="27" class="v-middle">&nbsp;Buy with Monthly Payments]]></label_html_custom>
<label_html_custom><![CDATA[<img src="https://cdn-assets.affirm.com/images/blue_logo-transparent_bg.png" width="57" height="17" class="v-middle" style="margin-right:3px;">&nbsp;Buy with Monthly Payments]]></label_html_custom>
<checkout_button_active>0</checkout_button_active>
<checkout_button_code>https://cdn-assets.affirm.com/images/buttons/30_148-white.png</checkout_button_code>
<payment_action>authorize</payment_action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
</reference>
<reference name="checkout.cart.top_methods">
<block type="affirm/promo_checkoutButton"
name="checkout.cart.methods.affrim.top"
name="checkout.cart.methods.affirm.top"
template="affirm/promo/checkout_button.phtml"
after="-" />
</reference>
<reference name="checkout.cart.methods">
<block type="affirm/promo_checkoutButton"
name="checkout.cart.methods.affrim.top"
name="checkout.cart.methods.affirm.top"
template="affirm/promo/checkout_button.phtml"
after="checkout.cart.methods.onepage.bottom" />
</reference>
Expand Down
8 changes: 4 additions & 4 deletions extension/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<name>Affirm_Affirm</name>
<version>3.1.0</version>
<version>3.2.0</version>
<stability>stable</stability>
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
<channel>community</channel>
Expand All @@ -10,9 +10,9 @@
<description>Affirm functions as an alternative payment method and offers easy financing - without a catch.</description>
<notes>Added "Multiple Financing Program" functionality.</notes>
<authors><author><name>Sergii Shkiria</name><user>virtual97</user><email>[email protected]</email></author></authors>
<date>2016-07-19</date>
<time>12:49:45</time>
<contents><target name="magecommunity"><dir name="Affirm"><dir name="Affirm"><dir name="Block"><dir name="Adminhtml"><dir name="Compatibility"><dir name="Tool"><file name="ClassRewrites.php" hash="b26f33dfcc806782d41b6e8602b7bb7f"/><file name="Compiler.php" hash="7bdc20939114ac7e2c9b2035f19f8e43"/><file name="Event.php" hash="4ad889af3bb8fb12097f3fd6ee093d10"/></dir><file name="Tool.php" hash="c7c43db011941636d4ad42b339baa6dc"/></dir><dir name="System"><dir name="Config"><file name="Date.php" hash="ae7304602ae77058f62181280d194711"/></dir></dir></dir><dir name="Payment"><file name="Form.php" hash="67bdde92d37a02011899f2633cb544ba"/><file name="Info.php" hash="ac3e7354e88bdc01ef24a9470f94622e"/><file name="Redirect.php" hash="0d27918fb01fba974eb46025d423b210"/></dir><dir name="Promo"><dir name="AsLowAs"><file name="Checkout.php" hash="682f709370a18376f4f17f3dd6467755"/><file name="Product.php" hash="a63e59b78593547fcb92c9077ab98f2d"/></dir><file name="CheckoutButton.php" hash="e8b03b3821d4cf6f32795b894125e462"/><file name="Promo.php" hash="2ed553099daab05063450b2244a0780a"/></dir></dir><file name="Exception.php" hash="79bca7a952703b29d1dcf2430f395f64"/><dir name="Helper"><file name="Data.php" hash="4c9a4f765b73a3e2bb438bf89df3ee8b"/><file name="Mfp.php" hash="2b451f003654d6b54828f32e55c68520"/><dir name="Promo"><file name="AsLowAs.php" hash="0a70a4aa3f22f909429405936e90a6a7"/><file name="Data.php" hash="b0c4836622ad3f55cf3344d9f235c81b"/></dir><file name="Util.php" hash="97d355910a79ee5b510ef1a87c74b1b8"/></dir><dir name="Model"><dir name="Compatibility"><dir name="Tool"><file name="ClassRewrites.php" hash="c68130bf09e0a59a8797df3412a0e9a0"/><file name="Compiler.php" hash="c3f11596170def613047bcfe61e0b346"/><dir name="Entity"><file name="Abstract.php" hash="a30f11b9b216c6c5c1a33b65103efdcb"/></dir><file name="Event.php" hash="426686df21c7ed65e43f11f2e374fe52"/></dir></dir><dir name="Credential"><file name="Abstract.php" hash="6400a6ecc12a5537ee635934aa79d20c"/><file name="Production.php" hash="b3221c9fd28dc3a4e44a9df874419c33"/><file name="Sandbox.php" hash="99cf9f600315af2d62cf8976debaa6fb"/></dir><file name="Credential.php" hash="b1f4e9aaf33eab2385d73c70a0908e68"/><dir name="Order"><dir name="Observer"><file name="AfterSaveOrder.php" hash="cb909c8891cdde6f3da6fd30fdf62da7"/><file name="ApplyAffirmPaymentMethod.php" hash="c7fc6a84ff50f1163b3bee0b0fb2caf2"/><file name="BeforeOrderEditSaveAdmin.php" hash="bd72eb7f5b30b432e69ec7075b985d57"/><file name="BeforeOrderSaveAdmin.php" hash="cfa8d7a9b29602b0e2d146af2c3f92bc"/><dir name="Mfp"><file name="Identify.php" hash="4dbf6bfb34ce452ad2982456b79b3066"/><file name="UpdateOnCustomerLogin.php" hash="e7bf3a2215f6de5b8cd5e2a624b238b0"/></dir></dir><file name="Observer.php" hash="a4a1ae443a555aa86dadf1c19ec49260"/></dir><file name="Payment.php" hash="05e3cc5cc0bec8614c4291bc73fd7918"/><dir name="Promo"><file name="Observer.php" hash="81a36fb6ef242d3ed7cfc24328e466a8"/><dir name="System"><dir name="Config"><dir name="AsLowAs"><file name="Months.php" hash="f5235672b4cc035aabd0677c0837e835"/></dir><file name="Position.php" hash="06d5d97963dabba814768983a1ea5207"/><file name="Size.php" hash="32308729327b587da2308e7c5e06833e"/></dir></dir></dir><dir name="Source"><file name="AccountMode.php" hash="7cfbca1620a67af7b1776d96f24e2144"/><file name="PaymentAction.php" hash="30b3373bf773d0bc8bdde55d4c185f45"/><file name="PaymentCheckoutXhr.php" hash="c589cbec8fe70164700b4e5fe3c5f3a9"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AffirmController.php" hash="38821213d8f9a4a90d14edbe712696cb"/><dir name="Compatibility"><file name="ToolController.php" hash="c8362d7bd67ae79b2c284e0b12f2cebb"/></dir></dir><file name="PaymentController.php" hash="61df0f4f8bf01805ceff6736f67a0391"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d7b44845988e2722ca2be0e63837ed13"/><file name="config.xml" hash="440ac1d341112c0041aa40728d344c78"/><file name="system.xml" hash="c495356962bbf5fabb3a992b46b94c91"/></dir><dir name="sql"><dir name="affirm_setup"><file name="mysql4-install-0.0.1.php" hash="04a75163063f6e770ff597c78bf6e75e"/><file name="mysql4-upgrade-3.0.0.10-3.1.0.0.php" hash="e7fece2b3af77ead4058d5601181b912"/><file name="mysql4-upgrade-3.0.0.9-3.0.0.10.php" hash="16a74e4aa02db6b73753c646875ae517"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Affirm_Affirm.xml" hash="921f5ae1522af33bd4bc99f097bc17e7"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="affirm"><dir name="affirm"><dir name="payment"><dir name="form"><file name="affirm.phtml" hash="06eecd1acf25daaf7c71eb9968159a8c"/></dir><dir name="info"><file name="affirm.phtml" hash="8d9b73dcb1a6f6b5095b09aff22dd4fd"/></dir><file name="redirect.phtml" hash="10404eb655ae062890e986c87d74abef"/></dir></dir><dir name="promo"><dir name="aslowas"><file name="checkout.phtml" hash="c4553bdecc388c5cab77e5297ed9be15"/><file name="product.phtml" hash="9c66ce4decb613058dcf4917c7a4fb07"/></dir><file name="checkout_button.phtml" hash="f04d6a69313fe25c30d9682ea9655482"/><file name="promo.phtml" hash="89ca4dc320696101907aa15480b3c3cf"/><file name="snippet.phtml" hash="53641da354d7a410bd33a07fa3502152"/></dir></dir></dir><dir name="layout"><dir name="affirm"><file name="affirm.xml" hash="f47daaac4a310a7fe5b5dc6a3220dc89"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="affirm"><file name="affirm.xml" hash="a52455a5b71c40cde435db9ed8f986eb"/></dir></dir><dir name="template"><dir name="affirm"><dir name="affirm"><file name="errorOrderCreatePageOnAffirmPayment.phtml" hash="f1951538db2ca1a35664ceb42d0592e8"/><dir name="payment"><dir name="info"><file name="affirm.phtml" hash="011593ff22291d6003fcf5afcfcd111c"/></dir></dir></dir><dir name="compatibility"><dir name="tool"><file name="class-rewrites.phtml" hash="b759ae549665daa27f8c1325f4a6ff58"/><file name="compiler.phtml" hash="34de4cb3c7b84337839f7fc7a9870d7a"/><file name="event.phtml" hash="2efc334830ff9683dd2ac358386d4541"/></dir><file name="tool.phtml" hash="5dc08041e2a1e38d0421db5da7f0ced2"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="js"><dir name="affirm"><file name="affirm.js" hash="097dbf57f4f1491cfce892a59e9028c1"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="affirm"><file name="aslowas.js" hash="44771783f2d64f18a754fa559039c5b6"/><file name="promos.js" hash="b1bf9cba12eba34c5fb44931d12be7a6"/></dir></dir></dir></dir></dir></target></contents>
<date>2016-08-26</date>
<time>14:16:55</time>
<contents><target name="magecommunity"><dir name="Affirm"><dir name="Affirm"><dir name="Block"><dir name="Adminhtml"><dir name="Compatibility"><dir name="Tool"><file name="ClassRewrites.php" hash="b26f33dfcc806782d41b6e8602b7bb7f"/><file name="Compiler.php" hash="7bdc20939114ac7e2c9b2035f19f8e43"/><file name="Event.php" hash="4ad889af3bb8fb12097f3fd6ee093d10"/></dir><file name="Tool.php" hash="c7c43db011941636d4ad42b339baa6dc"/></dir><dir name="System"><dir name="Config"><file name="Date.php" hash="ae7304602ae77058f62181280d194711"/></dir></dir></dir><dir name="Payment"><file name="Form.php" hash="67bdde92d37a02011899f2633cb544ba"/><file name="Info.php" hash="ac3e7354e88bdc01ef24a9470f94622e"/><file name="Redirect.php" hash="0d27918fb01fba974eb46025d423b210"/></dir><dir name="Promo"><dir name="AsLowAs"><file name="Checkout.php" hash="682f709370a18376f4f17f3dd6467755"/><file name="Product.php" hash="a63e59b78593547fcb92c9077ab98f2d"/></dir><file name="CheckoutButton.php" hash="e8b03b3821d4cf6f32795b894125e462"/><file name="Promo.php" hash="2ed553099daab05063450b2244a0780a"/></dir></dir><file name="Exception.php" hash="79bca7a952703b29d1dcf2430f395f64"/><dir name="Helper"><file name="Data.php" hash="4c9a4f765b73a3e2bb438bf89df3ee8b"/><file name="Mfp.php" hash="2b451f003654d6b54828f32e55c68520"/><dir name="Promo"><file name="AsLowAs.php" hash="0a70a4aa3f22f909429405936e90a6a7"/><file name="Data.php" hash="b0c4836622ad3f55cf3344d9f235c81b"/></dir><file name="Util.php" hash="97d355910a79ee5b510ef1a87c74b1b8"/></dir><dir name="Model"><dir name="Compatibility"><dir name="Tool"><file name="ClassRewrites.php" hash="c68130bf09e0a59a8797df3412a0e9a0"/><file name="Compiler.php" hash="c3f11596170def613047bcfe61e0b346"/><dir name="Entity"><file name="Abstract.php" hash="a30f11b9b216c6c5c1a33b65103efdcb"/></dir><file name="Event.php" hash="426686df21c7ed65e43f11f2e374fe52"/></dir></dir><dir name="Credential"><file name="Abstract.php" hash="6400a6ecc12a5537ee635934aa79d20c"/><file name="Production.php" hash="b3221c9fd28dc3a4e44a9df874419c33"/><file name="Sandbox.php" hash="99cf9f600315af2d62cf8976debaa6fb"/></dir><file name="Credential.php" hash="b1f4e9aaf33eab2385d73c70a0908e68"/><dir name="Order"><dir name="Observer"><file name="AfterSaveOrder.php" hash="cb909c8891cdde6f3da6fd30fdf62da7"/><file name="ApplyAffirmPaymentMethod.php" hash="c7fc6a84ff50f1163b3bee0b0fb2caf2"/><file name="BeforeOrderEditSaveAdmin.php" hash="bd72eb7f5b30b432e69ec7075b985d57"/><file name="BeforeOrderSaveAdmin.php" hash="cfa8d7a9b29602b0e2d146af2c3f92bc"/><dir name="Mfp"><file name="Identify.php" hash="4dbf6bfb34ce452ad2982456b79b3066"/><file name="UpdateOnCustomerLogin.php" hash="e7bf3a2215f6de5b8cd5e2a624b238b0"/></dir></dir><file name="Observer.php" hash="a4a1ae443a555aa86dadf1c19ec49260"/></dir><file name="Payment.php" hash="05e3cc5cc0bec8614c4291bc73fd7918"/><dir name="Promo"><file name="Observer.php" hash="81a36fb6ef242d3ed7cfc24328e466a8"/><dir name="System"><dir name="Config"><dir name="AsLowAs"><file name="Months.php" hash="f5235672b4cc035aabd0677c0837e835"/></dir><file name="Position.php" hash="06d5d97963dabba814768983a1ea5207"/><file name="Size.php" hash="32308729327b587da2308e7c5e06833e"/></dir></dir></dir><dir name="Source"><file name="AccountMode.php" hash="7cfbca1620a67af7b1776d96f24e2144"/><file name="PaymentAction.php" hash="30b3373bf773d0bc8bdde55d4c185f45"/><file name="PaymentCheckoutXhr.php" hash="c589cbec8fe70164700b4e5fe3c5f3a9"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AffirmController.php" hash="38821213d8f9a4a90d14edbe712696cb"/><dir name="Compatibility"><file name="ToolController.php" hash="c8362d7bd67ae79b2c284e0b12f2cebb"/></dir></dir><file name="PaymentController.php" hash="5fcb94bd33bbc5d99b1eeaf386232d30"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d7b44845988e2722ca2be0e63837ed13"/><file name="config.xml" hash="35ba426decd8680a455f90cf4d989536"/><file name="system.xml" hash="c495356962bbf5fabb3a992b46b94c91"/></dir><dir name="sql"><dir name="affirm_setup"><file name="mysql4-install-0.0.1.php" hash="04a75163063f6e770ff597c78bf6e75e"/><file name="mysql4-upgrade-3.0.0.10-3.1.0.0.php" hash="e7fece2b3af77ead4058d5601181b912"/><file name="mysql4-upgrade-3.0.0.9-3.0.0.10.php" hash="16a74e4aa02db6b73753c646875ae517"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Affirm_Affirm.xml" hash="921f5ae1522af33bd4bc99f097bc17e7"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="affirm"><dir name="affirm"><dir name="payment"><dir name="form"><file name="affirm.phtml" hash="06eecd1acf25daaf7c71eb9968159a8c"/></dir><dir name="info"><file name="affirm.phtml" hash="8d9b73dcb1a6f6b5095b09aff22dd4fd"/></dir><file name="redirect.phtml" hash="10404eb655ae062890e986c87d74abef"/></dir></dir><dir name="promo"><dir name="aslowas"><file name="checkout.phtml" hash="c4553bdecc388c5cab77e5297ed9be15"/><file name="product.phtml" hash="9c66ce4decb613058dcf4917c7a4fb07"/></dir><file name="checkout_button.phtml" hash="f04d6a69313fe25c30d9682ea9655482"/><file name="promo.phtml" hash="89ca4dc320696101907aa15480b3c3cf"/><file name="snippet.phtml" hash="53641da354d7a410bd33a07fa3502152"/></dir></dir></dir><dir name="layout"><dir name="affirm"><file name="affirm.xml" hash="f47daaac4a310a7fe5b5dc6a3220dc89"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="affirm"><file name="affirm.xml" hash="a52455a5b71c40cde435db9ed8f986eb"/></dir></dir><dir name="template"><dir name="affirm"><dir name="affirm"><file name="errorOrderCreatePageOnAffirmPayment.phtml" hash="f1951538db2ca1a35664ceb42d0592e8"/><dir name="payment"><dir name="info"><file name="affirm.phtml" hash="011593ff22291d6003fcf5afcfcd111c"/></dir></dir></dir><dir name="compatibility"><dir name="tool"><file name="class-rewrites.phtml" hash="b759ae549665daa27f8c1325f4a6ff58"/><file name="compiler.phtml" hash="34de4cb3c7b84337839f7fc7a9870d7a"/><file name="event.phtml" hash="2efc334830ff9683dd2ac358386d4541"/></dir><file name="tool.phtml" hash="5dc08041e2a1e38d0421db5da7f0ced2"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="js"><dir name="affirm"><file name="affirm.js" hash="097dbf57f4f1491cfce892a59e9028c1"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="affirm"><file name="aslowas.js" hash="44771783f2d64f18a754fa559039c5b6"/><file name="promos.js" hash="b1bf9cba12eba34c5fb44931d12be7a6"/></dir></dir></dir></dir></dir></target></contents>
<compatible/>
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
</package>
4 changes: 2 additions & 2 deletions extension/skin/frontend/base/default/js/affirm/aslowas.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ var AFFIRM_AFFIRM = AFFIRM_AFFIRM || {};
// Set affirm payment text
var logo = '<img src="https://cdn-assets.affirm.com/images/blue_logo-transparent_bg.png" style="height:1em; margin:0 .3em .15em;vertical-align:bottom;">';
var a = document.getElementById('learn-more');
var iText = ('innerText' in a)? 'innerText' : 'textContent';
var iText = ('innerHTML' in a)? 'innerHTML' : 'textContent';
a[iText] = "Starting at $" + dollars + " a month with" + logo + "Learn More";
// open the customized Affirm learn more modal
a.onclick = payment_estimate.open_modal;
Expand All @@ -140,7 +140,7 @@ var AFFIRM_AFFIRM = AFFIRM_AFFIRM || {};
processPriceThresholdRange: function(amount) {
if ((this.minTotal && amount < this.minTotal) || (this.maxTotal && amount > this.maxTotal)) {
var a = document.getElementById('learn-more');
var iText = ('innerText' in a)? 'innerText' : 'textContent';
var iText = ('innerHTML' in a)? 'innerHTML' : 'textContent';
a[iText] = "";
a.style.visibility = "hidden";
return true;
Expand Down

0 comments on commit 0f4c260

Please sign in to comment.