<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<?php echo $__env->yieldPushContent("title"); ?>
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
<!-- css -->
<link rel="stylesheet" href="<?php echo e(asset('public/backend/css/style.css')); ?>">
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.four-not-four-content .title{
color: #ffffff;
font-family: "Josefin Sans", sans-serif;
font-weight: 700;
}
.four-not-four-content .four-not-four-btn{
margin-top: 20px;
}
.four-not-four-content .four-not-four-btn a{
background: #5B6A9E;
border-radius: 60px;
color: #ffffff;
padding: 20px 40px 15px 40px;
font-family: "Josefin Sans", sans-serif;
font-size: 18px;
font-weight: 600;
text-align: center;
-webkit-transition: all ease 0.5s;
transition: all ease 0.5s;
position: relative;
padding-right: 80px;
}
.four-not-four-content .four-not-four-btn a::before{
position: absolute;
content: "";
top: 30px;
right: 40px;
width: 30px;
height: 2px;
background-color: #ffffff;
}
.four-not-four-content .four-not-four-btn a::after{
border-top: 2px solid #ffffff;
border-right: 2px solid #ffffff;
content: "";
display: block;
height: 7px;
pointer-events: none;
position: absolute;
margin-top: -1px;
right: 40px;
top: 50%;
-webkit-transform-origin: 66% 66%;
transform-origin: 66% 66%;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transition: all 0.3s;
transition: all 0.3s;
width: 7px;
}
</style>
</head>
<body>
<?php echo $__env->yieldContent("content"); ?>
<?php echo $__env->yieldPushContent("script"); ?>
<script>
class electricity {
constructor(selector) {
this.svg = document.querySelector(selector);
this.run();
}
render() {
let d = this.calculatePoints(0, 0, 500, 80);
this.svg.querySelectorAll('path')[0].setAttribute('d', d);
this.svg.querySelectorAll('path')[1].setAttribute('d', d);
}
calculatePoints(x, y, width, height) {
let points = [[x, height / 2]];
let maxPoints = 10;
let chunkRange = width / maxPoints;
for (let i = 0; i < maxPoints; i++) {
let cx = chunkRange * i + Math.cos(i) * chunkRange;
let cy = Math.random() * height;
points.push([cx, cy]);
}
points.push([width, height / 2]);
let d = points.map(point => point.join(','));
return 'M' + d.join(',');
}
run() {
let fps = 25,
now,
delta,
then = Date.now(),
interval = 1000 / fps,
iteration = 0,
loop = () => {
requestAnimationFrame(loop);
now = Date.now();
delta = now - then;
if (delta > interval) {
then = now - delta % interval;
// update stuff
this.render(iteration++);
}
};
loop();
}}
new electricity('svg');
</script>
</body>
</html>
<?php /**PATH D:\xampp\htdocs\Projects\Version\nfcpay\v1.0.0\nfcpay-web-v1.0.0\resources\views/errors/custom-layouts.blade.php ENDPATH**/ ?>
Get access token to initiates payment transaction.
generate-token
| Parameter | Type | Comments |
|---|---|---|
| client_id | string | Enter merchant API client/primary key |
| secret_id | string | Enter merchant API secret key |
| env | string | Enter merchant API environment |
| merchant_id | string | Enter merchant API merchant id |
Request Example (guzzle)
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', $base_url. 'v1/generate-token', [
'headers' => [
'accept' => 'application/json',
'content-type' => 'application/json',
],
'form_params' => [
'client_id' => '$client_id',
'secret_id' => 'secret_id',
'env' => 'env',
'merchant_id' => 'merchant_id',
],
]);
echo $response->getBody();
**Response: SUCCESS (200 OK)**
{
"message": {
"success": [
"Successfully token is generated"
]
},
"data": {
"token":"eyJpdiI6InpkczhjTjhQdVhUL2lKQ0pSUUx6aUE9PSIsInZhbHVlIjoiVGVBTVBDTXltbjNZcEIvdEJveGpTSno3TU5NRUtnVkhCZ1pHTFNCUnZGQ2UxMnYxN202cEE1YVRDTEFsc0ZERExoTjdtL0dTL2xoU3QzeUJJOExiMUx5T0w1L0llUXhTUkU1cWVLWEdEbEplb0dKNXcwbTNRM0VxdkUwYzZuNFdtNkhMQ0pRZysyNWkvdzBxSlBoSVBSOGFTekNnR2RXNHVtcG9lMGZOTmNCcm1hR3c5Sk9KTnB4Y3ltZDl6cm90MThrR21Ca3B1azc3bXRiQ0J6SW96UVo1elNkU1ZqeE05bTcwWGp1MEUxWlJFdnNWTmpSbnVpeW92b2U4dXZkUGgyb1VmK0luaGdyaFlsVTZlcVpVRnZlTG1DeFF6Ykk2T2h6Z3JzbnIyNHpNdHowSE5JdDR0Y0pZT20zUm1XYW8iLCJtYWMiOiJlY2M4NGE1OGUzYzkzYzk0YzljNmVmNjE0YWI0ZDIwOGI3NDQ2YWEyY2ZhNzc0NzE4ZmY1ZmYyMz
IyZmQzNDY1IiwidGFnIjoiIn0=",
},
"type": "success"
}
**Response: ERROR (400 FAILED)**
{
"message": {
"error": [
"Invalid credentials."
]
},
"data": null,
"type": "error"
}