Skip to content

Commit

Permalink
Insights email digest: Improve Payment due messaging
Browse files Browse the repository at this point in the history
When a payment is due (vs a payment has failed), adjust the language to
not mention errors or fixing. This is primarily for coupon codes which
have expired.
  • Loading branch information
ginatrapani committed Dec 29, 2015
1 parent f2ef3e7 commit b9f5ab2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 28 deletions.
Expand Up @@ -335,37 +335,67 @@ private function sendDigestSinceWithTemplate($owner, $start, $template, &$option
__METHOD__.','.__LINE__);

$payment_failed_copy = array ();
$payment_failed_copy[] = array(
'headline'=>'Oops! Your account needs attention',
'explainer' => "We had a problem processing your membership payment. "
."But it's easy to fix."
);
$payment_failed_copy[] = array(
'headline'=>'Uh oh, problem with your subscription...',
'explainer' => "There was a problem processing your membership payment. "
."To fix it, update your payment info."
);
$payment_failed_copy[] = array(
'headline'=>'Your ThinkUp subscription is out of date...',
'explainer' => "We tried to charge your Amazon account for your ThinkUp membership,"
." and there was an error. But it's easy to fix."
);
$payment_failed_copy[] = array(
'headline'=>'Action required to keep your ThinkUp account active',
'explainer' => "We weren't able to process your last membership payment—maybe your "
."info is out of date? Fixing it just takes a moment."
);
$payment_failed_copy[] = array(
'headline'=>"Urgent! Keep your ThinkUp account active",
'explainer' => "We tried to process your ThinkUp subscription, but "
."the payment was not successful. Please update your payment information "
."now to make sure your ThinkUp membership stays in good standing."
);
if ($membership_details->subscription_status == 'Payment failed') {
$payment_failed_copy[] = array(
'headline'=>'Oops! Your account needs attention',
'explainer' => "We had a problem processing your membership payment. "
."But it's easy to fix."
);
$payment_failed_copy[] = array(
'headline'=>'Uh oh, problem with your subscription...',
'explainer' => "There was a problem processing your membership payment. "
."To fix it, update your payment info."
);
$payment_failed_copy[] = array(
'headline'=>'Your ThinkUp subscription is out of date...',
'explainer' => "We tried to charge your Amazon account for your ThinkUp membership,"
." and there was an error. But it's easy to fix."
);
$payment_failed_copy[] = array(
'headline'=>'Action required to keep your ThinkUp account active',
'explainer' => "We weren't able to process your last membership payment—maybe your "
."info is out of date? Fixing it just takes a moment."
);
$payment_failed_copy[] = array(
'headline'=>"Urgent! Keep your ThinkUp account active",
'explainer' => "We tried to process your ThinkUp subscription, but "
."the payment was not successful. Please update your payment information "
."now to make sure your ThinkUp membership stays in good standing."
);
$payment_failed_button_label = "Update your payment info";
} else { //Payment due
$payment_failed_copy[] = array(
'headline'=>'Oops! Your ThinkUp membership needs attention',
'explainer' => "Looks like you've got a membership payment due. "
."But it's easy to make it."
);
$payment_failed_copy[] = array(
'headline'=>"Uh-oh, don't let your subscription expire",
'explainer' => "Looks like your ThinkUp payment is due. "
."Make it now so your account doesn't expire."
);
$payment_failed_copy[] = array(
'headline'=>'Hey, your ThinkUp subscription payment is due',
'explainer' => "Your membership payment isn't up-to-date. "
." But it's easy to fix."
);
$payment_failed_copy[] = array(
'headline'=>'Action required: Keep your ThinkUp account active',
'explainer' => "Looks like you've got a membership payment due. "
."Making it just takes a moment."
);
$payment_failed_copy[] = array(
'headline'=>"Urgent! Keep your ThinkUp account active",
'explainer' => "Your subscription payment is due. "
."Please update your information now to keep your ThinkUp membership "
."in good standing."
);
$payment_failed_button_label = "Make your payment";
}

$copy_index = TimeHelper::getDayOfYear() % count($payment_failed_copy);
$payment_failed_headline = $payment_failed_copy[$copy_index]['headline'];
$payment_failed_explainer = $payment_failed_copy[$copy_index]['explainer'];
$payment_failed_button_label = "Update your payment info";

$view->assign('payment_failed_headline', $payment_failed_headline);
$view->assign('payment_failed_explainer', $payment_failed_explainer);
Expand Down
Expand Up @@ -750,7 +750,7 @@ public function testMandrillHTMLDailyPaymentDue() {
}
$html_email = $merge_vars['insights'];
$this->debug($html_email);
$this->assertPattern('/Update your payment info/', $html_email);
$this->assertPattern('/Make your payment/', $html_email);
unlink(FileDataManager::getDataPath(Mailer::EMAIL));
$plugin_option_dao->updateOption($options['last_daily_email']->id, 'last_daily_email', $long_ago);
$owner_builder = null;
Expand Down

0 comments on commit b9f5ab2

Please sign in to comment.