need to cope with cancelled/failed transactions

This commit is contained in:
2018-05-19 16:04:07 +01:00
parent aad442c3a5
commit 889bd68900
3 changed files with 106 additions and 1 deletions

View File

@ -1,5 +1,24 @@
<div class="col col-xs-12 col-sm-12 col-md-8 col-lg-8">
<?php if ( $transaction[ 'failed' ] ): ?>
<div class="alert alert-danger" role="alert">This transaction <strong>failed</strong> on
<?php
$tz = new DateTimeZone('UTC');
$failed = DateTime::createFromFormat('Y-m-d\TH:i:s.u\Z',$transaction['failed'],$timezone=$tz);
if ( $failed )
print $failed->format( 'j/M/Y \@ g:ia' );
?></div>
<?php endif; ?>
<?php if ( $transaction[ 'cancelled' ] ): ?>
<div class="alert alert-warning" role="alert">This transaction was <strong>cancelled</strong> on
<?php
$tz = new DateTimeZone('UTC');
$cancelled = DateTime::createFromFormat('Y-m-d\TH:i:s.u\Z',$transaction['cancelled'],$timezone=$tz);
if ( $cancelled )
print $cancelled->format( 'j/M/Y \@ g:ia' );
?>.</div>
<?php endif; ?>
<table class="table">
<caption><?php print check_plain( $transaction[ 'name' ] ); ?></caption>