Skip to content

Commit

Permalink
anything new
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisFrench committed Jul 9, 2014
1 parent 171c03e commit 8e21e52
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
14 changes: 7 additions & 7 deletions src/Striper/Models/PaymentRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function validate()

protected function beforeSave()
{
$this->amount = (float) $this->amount;
//$this->amount = (float) $this->amount;

foreach ($this->items as $key=>$item)
{
Expand All @@ -84,18 +84,18 @@ protected function beforeSave()

public function sendChargeEmailClient($charge){

$html = \Dsc\System::instance()->get( 'theme' )->renderView( 'Striper/Site/Views::paymentrequests/emails/client_success_html.php' );
$text = \Dsc\System::instance()->get( 'theme' )->renderView( 'Striper/Site/Views::paymentrequests/emails/client_success_text.php' );
// $html = \Dsc\System::instance()->get( 'theme' )->renderView( 'Striper/Site/Views::paymentrequests/emails/client_success_html.php' );
// $text = \Dsc\System::instance()->get( 'theme' )->renderView( 'Striper/Site/Views::paymentrequests/emails/client_success_text.php' );

\Dsc\System::instance()->get('mailer')->send($charge->{'client.email'}, 'Successfully Subscribed', array($html, $text) );
//\Dsc\System::instance()->get('mailer')->send($charge->{'client.email'}, 'Successfully Subscribed', array($html, $text) );

}

public function sendChargeEmailAdmin($charge){
$html = \Dsc\System::instance()->get( 'theme' )->renderView( 'Striper/Site/Views::paymentrequests/emails/admin_success_html.php' );
$text = \Dsc\System::instance()->get( 'theme' )->renderView( 'Striper/Site/Views::paymentrequests/emails/admin_success_text.php' );
// $html = \Dsc\System::instance()->get( 'theme' )->renderView( 'Striper/Site/Views::paymentrequests/emails/admin_success_html.php' );
// $text = \Dsc\System::instance()->get( 'theme' )->renderView( 'Striper/Site/Views::paymentrequests/emails/admin_success_text.php' );

\Dsc\System::instance()->get('mailer')->send($charge->{'client.email'}, 'Successfully Subscribed', array($html, $text) );
// \Dsc\System::instance()->get('mailer')->send($charge->{'client.email'}, 'Successfully Subscribed', array($html, $text) );

}

Expand Down
7 changes: 4 additions & 3 deletions src/Striper/Site/Views/paymentrequest/read.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@
<?php } ?>


<?php if (!empty($paymentrequest->amount())) { ?>
<?php if (!empty($paymentrequest->amount)) { ?>
<?php // TODO Format this so it looks like currency ?>
<h3>
Total: <?php setlocale(LC_MONETARY, 'en_US.UTF-8');
echo money_format('$%i', number_format(($paymentrequest->amount()/100),2));?>
echo '$'. number_format(($paymentrequest->amount/100),2);?>


</h3>
<?php } ?>
Expand All @@ -61,7 +62,7 @@
<script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="<?php echo $settings->{$settings->mode.'.publishable_key'} ?>"
data-image="/theme/img/logo.png"
data-name="<?php echo $paymentrequest->title; ?>" data-description="" data-email="<?php echo $paymentrequest->{'client.email'}; ?>" data-allow-remember-me="false" data-amount="<?php echo $paymentrequest->amountForStripe(); ?>"></script>
data-name="<?php echo $paymentrequest->title; ?>" data-description="" data-email="<?php echo $paymentrequest->{'client.email'}; ?>" data-allow-remember-me="false" data-amount="<?php echo $paymentrequest->amount; ?>"></script>
</p>
</form>

Expand Down
11 changes: 10 additions & 1 deletion src/Striper/Site/Views/paymentrequest/success.php
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
<h1> Your Payment was Succesful</h1>
<div class="container">
<div class="panel panel-default">
<div class="panel-body"><h1>Success!</h1>
Everything is well, you will receive an email with your reciept.
</div>
</div>
</div>

0 comments on commit 8e21e52

Please sign in to comment.