Skip to content

Commit

Permalink
Merge pull request #13 from Affirm/dev
Browse files Browse the repository at this point in the history
Release: Friday 25 August
  • Loading branch information
perfmode committed Aug 16, 2014
2 parents 9fc8ee6 + 5bbfc8e commit 1ecb18f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions build/affirm_tar_to_connect_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
'archive_files' => 'Affirm_Magento.tar',
'extension_name' => 'Affirm_Magento',
'skip_version_compare' => true,
'extension_version' => '2.0.4',
'archive_connect' => 'Affirm_Magento-2.0.4.tgz',
'extension_version' => '2.0.5',
'archive_connect' => 'Affirm_Magento-2.0.5.tgz',
'path_output' => realpath('../var/'),

'stability' => 'stable',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private function replaceLabel()

// TODO(brian): conditionally display based on payment type
// alt message: $html.= "Buy Now and Pay Later";
$html.= "Split into 3 Easy Payments";
$html.= "Buy Now with 3 Easy Payments";

$this->setMethodLabelAfterHtml($html);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Affirm_Affirm_Block_Payment_Info extends Mage_Payment_Block_Info

protected function _toHtml()
{
$html = '<a href="https://www.affirm.com/u/">Affirm Split Pay</a>';
$html = '<a href="https://www.affirm.com/u/">Affirm</a>';
return $html;
}

Expand Down
12 changes: 6 additions & 6 deletions extension/app/code/community/Affirm/Affirm/Model/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ public function processConfirmOrder($order, $checkout_token)

//authorize the total amount.
Affirm_Affirm_Model_Payment::authorizePaymentForOrder($payment, $order);
$payment->setAmountAuthorized(static::_affirmTotal($order));
$payment->setAmountAuthorized(Affirm_Affirm_Model_Payment::_affirmTotal($order));
$order->save();
//can capture as well..
if ($action == self::ACTION_AUTHORIZE_CAPTURE)
{
$payment->setAmountAuthorized(static::_affirmTotal($order));
$payment->setAmountAuthorized(Affirm_Affirm_Model_Payment::_affirmTotal($order));

// TODO(brian): It is unclear why this statement is here. If you
// know why, please replace this message with documentation to
Expand Down Expand Up @@ -405,8 +405,8 @@ public function getCheckoutObject($order)
$checkout['financial_product_key'] = $this->getConfigData('financial_product_key');

// TODO(brian): make this safer and less error-prone.
$checkout['total'] = Affirm_Util::formatCents(static::_affirmTotal($order));
$checkout['meta'] = static::_getMetadata();
$checkout['total'] = Affirm_Util::formatCents(Affirm_Affirm_Model_Payment::_affirmTotal($order));
$checkout['meta'] = Affirm_Affirm_Model_Payment::_getMetadata();
return $checkout;
}

Expand Down Expand Up @@ -461,9 +461,9 @@ private static function authorizePaymentForOrder($payment, $order)
"0.9.56"
);
if (in_array($moduleVersion, $incompatibleVersions)) {
Affirm_Affirm_Model_Payment::callPrivateMethod($payment, "_authorize", true, static::_affirmTotal($order));
Affirm_Affirm_Model_Payment::callPrivateMethod($payment, "_authorize", true, Affirm_Affirm_Model_Payment::_affirmTotal($order));
} else {
$payment->authorize(true, static::_affirmTotal($order));
$payment->authorize(true, Affirm_Affirm_Model_Payment::_affirmTotal($order));
}
}

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>2.0.4</version>
<version>2.0.5</version>
</Affirm_Affirm>
</modules>
<global>
Expand Down Expand Up @@ -61,7 +61,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 -->
<!-- TODO(brian): fix rendering of payment method block so that adding a title here doesn't break presentation there -->
<title>Affirm: Split into 3 Easy Payments</title>
<title>Affirm: Buy Now with 3 Easy Payments</title>
<payment_action>authorize</payment_action>
<api_url>https://sandbox.affirm.com</api_url>
<api_key />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<Affirm_AffirmPromo>
<version>2.0.4</version>
<version>2.0.5</version>
</Affirm_AffirmPromo>
</modules>
<global>
Expand Down
4 changes: 2 additions & 2 deletions extension/lib/Affirm/Affirm/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ class Affirm_Util {
const MONEY_FORMAT = "%.2f";

public static function formatMoney($amount) {
return sprintf(static::MONEY_FORMAT, $amount);
return sprintf(Affirm_Util::MONEY_FORMAT, $amount);
}

public static function formatCents($amount = 0) {
$negative = false;

$str = static::formatMoney($amount);
$str = Affirm_Util::formatMoney($amount);

if (strcmp($str[0], "-") === 0) {
// treat it like a positive. then prepend a '-' to the return value.
Expand Down

0 comments on commit 1ecb18f

Please sign in to comment.