Added manual payout notification
* Added mail template for manual payouts * Added code to account page to notify via mail on payout * Added new option to notification setting template Adds another feature to #144
This commit is contained in:
parent
d723f4e8ef
commit
b2b853d3e0
@ -36,12 +36,17 @@ if ( ! $user->checkPin($_SESSION['USERDATA']['id'], $_POST['authPin']) && $_POST
|
||||
}
|
||||
} catch (BitcoinClientException $e) {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Failed to send LTC, please contact site support immidiately', 'TYPE' => 'errormsg');
|
||||
$continue = false;
|
||||
// $continue = false;
|
||||
}
|
||||
}
|
||||
// Set balance to 0, add to paid out, insert to ledger
|
||||
if ($continue == true && $transaction->addTransaction($_SESSION['USERDATA']['id'], $dBalance, 'Debit_MP', NULL, $sCoinAddress))
|
||||
if ($continue == true && $transaction->addTransaction($_SESSION['USERDATA']['id'], $dBalance, 'Debit_MP', NULL, $sCoinAddress)) {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Transaction completed', 'TYPE' => 'success');
|
||||
$aMailData['email'] = $user->getUserEmail($user->getUserName($_SESSION['USERDATA']['id']));
|
||||
$aMailData['amount'] = $dBalance;
|
||||
$aMailData['subject'] = 'Manual Payout Completed';
|
||||
$notification->sendNotification($_SESSION['USERDATA']['id'], 'manual_payout', $aMailData);
|
||||
}
|
||||
} else {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to litecoind RPC service', 'TYPE' => 'errormsg');
|
||||
}
|
||||
|
||||
8
public/templates/mail/notifications/manual_payout.tpl
Normal file
8
public/templates/mail/notifications/manual_payout.tpl
Normal file
@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>An manual payout request completed.</p>
|
||||
<p>Amount: {$DATA.amount}</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</body>
|
||||
</html>
|
||||
@ -29,6 +29,13 @@
|
||||
<input type="checkbox" name="data[auto_payout]" value="1"{if $SETTINGS['auto_payout']}checked{/if} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left">Manual Payout</td>
|
||||
<td class="center">
|
||||
<input type="hidden" name="data[manual_payout]" value="0" />
|
||||
<input type="checkbox" name="data[manual_payout]" value="1"{if $SETTINGS['manual_payout']}checked{/if} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="center">
|
||||
<input type="submit" class="submit small" value="Update">
|
||||
@ -55,7 +62,13 @@
|
||||
<tr class="{cycle values="odd,even"}">
|
||||
<td class="center">{$NOTIFICATIONS[notification].id}</td>
|
||||
<td class="center">{$NOTIFICATIONS[notification].time}</td>
|
||||
<td class="center">{$NOTIFICATIONS[notification].type}</td>
|
||||
<td class="center">
|
||||
{if $NOTIFICATIONS[notification].type == new_block}New Block
|
||||
{else if $NOTIFICATIONS[notification].type == auto_payout}Auto Payout
|
||||
{else if $NOTIFICATIONS[notification].type == idle_worker}IDLE Worker
|
||||
{else if $NOTIFICATIONS[notification].type == manual_payout}Manual Payout
|
||||
{/if}
|
||||
</td>
|
||||
<td class="center">
|
||||
<img src="{$PATH}/images/{if $NOTIFICATIONS[notification].active}success{else}error{/if}.gif" />
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user