Page MenuHomePhabricator

D12878.diff
No OneTemporary

D12878.diff

diff --git a/src/applications/phortune/worker/PhortuneSubscriptionWorker.php b/src/applications/phortune/worker/PhortuneSubscriptionWorker.php
--- a/src/applications/phortune/worker/PhortuneSubscriptionWorker.php
+++ b/src/applications/phortune/worker/PhortuneSubscriptionWorker.php
@@ -15,6 +15,13 @@
return;
}
+ $currency = $subscription->getCostForBillingPeriodAsCurrency(
+ $last_epoch,
+ $next_epoch);
+ if (!$currency->isPositive()) {
+ return;
+ }
+
$account = $subscription->getAccount();
$merchant = $subscription->getMerchant();
@@ -48,10 +55,6 @@
$purchase = $cart->newPurchase($actor, $product);
- $currency = $subscription->getCostForBillingPeriodAsCurrency(
- $last_epoch,
- $next_epoch);
-
$purchase
->setBasePriceAsCurrency($currency)
->setMetadataValue('subscriptionPHID', $subscription->getPHID())

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 2:30 PM (4 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6740037
Default Alt Text
D12878.diff (908 B)

Event Timeline