This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<?php | |
use Carbon\Carbon; | |
use CardinalstoneRestServer\services\mail\Mailer; | |
?> | |
<TABLE class=full-width-container style="HEIGHT: 100%; FONT-FAMILY: Calibri(Body); WIDTH: 100%; PADDING-BOTTOM: 30px; PADDING-TOP: 30px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#eeeeee border=0> | |
<TBODY> | |
<TR> | |
<TD vAlign=top align=center> | |
<TABLE class=container style="WIDTH: 720px" cellSpacing=0 cellPadding=0 width=720 bgColor=#ffffff border=0> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- / Full width container --> | |
<!DOCTYPE html> | |
<?php | |
use Carbon\Carbon; | |
use CardinalstoneRestServer\services\mail\Mailer; | |
?> | |
<htmL> | |
<head> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function processWebhook($payload) //create new fund | |
{ | |
$transactionDetails = container('PaystackGatewayModel')->retrieveTransactionDetails($payload['reference']); | |
if($transactionDetails->amount != $payload['amount']) | |
{ | |
$message1 = $payload['reference']; | |
$message2 = $payload['amount']; | |
$message3 = $payload['ipaddress']; | |
$message4 = $payload['email']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$app->post('/api/paystackWebhook', function ($request, $response) { | |
//check originating IP Address | |
if($_SERVER['REMOTE_ADDR'] != "52.31.139.75" && $_SERVER['REMOTE_ADDR'] != "52.49.173.169" && $_SERVER['REMOTE_ADDR'] != "52.214.14.220") | |
{ | |
//check if cal is from cardinalstone server | |
if($_SERVER['REMOTE_ADDR'] != "167.99.109.180") | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<?php | |
use Carbon\Carbon; | |
use CardinalstoneRestServer\services\mail\Mailer; | |
?> | |
<TABLE class=full-width-container style="HEIGHT: 100%; FONT-FAMILY: Calibri(Body); WIDTH: 100%; PADDING-BOTTOM: 30px; PADDING-TOP: 30px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#eeeeee border=0> | |
<TBODY> | |
<TR> | |
<TD vAlign=top align=center> | |
<TABLE class=container style="WIDTH: 720px" cellSpacing=0 cellPadding=0 width=720 bgColor=#ffffff border=0> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function getFormFields(): array { | |
return [ | |
'epc-form' => [ | |
'status' => [ | |
"Pending Surveys" => ['value' => "pending", 'color' => $this->getStatusColor()['pending']], | |
"On Hold" => ['value' => 'on-hold', 'color' => $this->getStatusColor()['on-hold']], | |
"Payment Completed" => ['value' => 'payment-completed', 'color' => $this->getStatusColor()['payment-completed']], | |
"Survey Booked" => ['value' => 'survey-booked', 'color' => $this->getStatusColor()['survey-booked']], | |
'Pending Lodgement' => ['value' => "pending-lodgement", 'color' => $this->getStatusColor()['pending-lodgement']], | |
"Paid" => ['value' => "paid", 'color' => $this->getStatusColor()['paid']], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function getFormFields(): array { | |
return [ | |
'epc-form' => [ | |
'status' => [ | |
"Pending Surveys" => ['value' => "pending", 'color' => $this->getStatusColor()['pending']], | |
"On Hold" => ['value' => 'on-hold', 'color' => $this->getStatusColor()['on-hold']], | |
"Payment Completed" => ['value' => 'payment-completed', 'color' => $this->getStatusColor()['payment-completed']], | |
"Survey Booked" => ['value' => 'survey-booked', 'color' => $this->getStatusColor()['survey-booked']], | |
'Pending Lodgement' => ['value' => "pending-lodgement", 'color' => $this->getStatusColor()['pending-lodgement']], | |
"Paid" => ['value' => "paid", 'color' => $this->getStatusColor()['paid']], |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use CardinalstoneRestServer\models\MutualFundModel as mutualFundModel; | |
use CardinalstoneRestServer\models\ForeignEquityModel as ForeignEquityModel; | |
use CardinalstoneRestServer\models\CustomerModel as customerModel; | |
use Carbon\Carbon; | |
use CardinalstoneRestServer\middleware\Authentication as auth; | |
use CardinalstoneRestServer\middleware\Authorization; | |
use CardinalstoneRestServer\middleware\AdminAuthorization; | |
use CardinalstoneRestServer\middleware\CheckMultifactorAuthentication; | |
use CardinalstoneRestServer\services\JWTToken; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async computeRollingAverage( | |
accountId: string, | |
refDate: string, | |
): Promise<any> { | |
const totalPort = []; | |
const data = []; | |
let mom = 0; | |
let momC = 0; | |
// Loop through the past 7 months |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@nestjs/common'; | |
import * as moment from 'moment-timezone'; | |
isMarketOpen(): boolean { | |
// Define Lagos market hours | |
const marketOpen = { start: '10:00', end: '14:30' }; // 10 AM to 2:30 PM | |
// Get current time in Lagos | |
const lagosTime = moment().tz('Africa/Lagos'); |