/home/kueuepay/public_html/vendor/maennchen/zipstream-php/composer.json
{
  "name": "maennchen/zipstream-php",
  "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
  "keywords": ["zip", "stream"],
  "type": "library",
  "license": "MIT",
  "authors": [{
      "name": "Paul Duncan",
      "email": "pabs@pablotron.org"
    },
    {
      "name": "Jonatan Männchen",
      "email": "jonatan@maennchen.ch"
    },
    {
      "name": "Jesse Donat",
      "email": "donatj@gmail.com"
    },
    {
      "name": "András Kolesár",
      "email": "kolesar@kolesar.hu"
    }
  ],
  "require": {
    "php": "^8.0",
    "ext-mbstring": "*",
    "psr/http-message": "^1.0",
    "myclabs/php-enum": "^1.5"
  },
  "require-dev": {
    "phpunit/phpunit": "^8.5.8 || ^9.4.2",
    "guzzlehttp/guzzle": "^6.5.3 || ^7.2.0",
    "ext-zip": "*",
    "mikey179/vfsstream": "^1.6",
    "vimeo/psalm": "^5.0",
    "php-coveralls/php-coveralls": "^2.4",
    "friendsofphp/php-cs-fixer": "^3.9"
  },
  "scripts": {
    "format": "PHP_CS_FIXER_IGNORE_ENV=true php-cs-fixer fix",
    "test": "composer run test:unit && composer run test:formatted && composer run test:lint",
    "test:unit": "phpunit --coverage-clover=coverage.clover.xml --coverage-html cov",
    "test:formatted": "composer run format -- --dry-run --stop-on-violation --using-cache=no",
    "test:lint": "psalm --stats --show-info --find-unused-psalm-suppress",
    "coverage:report": "php-coveralls --coverage_clover=coverage.clover.xml --json_path=coveralls-upload.json --insecure",
    "install:tools": "phive install --trust-gpg-keys 0x67F861C3D889C656",
    "docs:generate": "tools/phpdocumentor --sourcecode"
  },
  "autoload": {
    "psr-4": {
      "ZipStream\\": "src/"
    }
  },
  "archive": {
    "exclude": [
      "/composer.lock",
      "/docs",
      "/.gitattributes",
      "/.github",
      "/.gitignore",
      "/guides",
      "/.phive",
      "/.php-cs-fixer.cache",
      "/.php-cs-fixer.dist.php",
      "/.phpdoc",
      "/phpdoc.dist.xml",
      "/.phpunit.result.cache",
      "/phpunit.xml.dist",
      "/psalm.xml",
      "/test",
      "/tools",
      "/.tool-versions",
      "/vendor"
    ]
  }
}
Initiate Payment

Initiate Payment

Initiates a new payment transaction.

Endpoint: POST create-order
Parameter Type Details
amount decimal Your Amount , Must be rounded at 2 precision.
currency string Currency Code, Must be in Upper Case (Alpha-3 code)
success_url string Enter your return or success URL
cancel_url string (optional) Enter your cancel or failed URL
                    
                        Request Example (guzzle)
                        

<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', $base_url.'create-order', [
'headers' => [
  'Authorization' => 'Bearer '. $authorizationToken,
  'accept' => 'application/json',
  'content-type' => 'application/json',
 ],
'form_params' => [
  'amount' => '$amount',
  'currency' => 'currency',
  'success_url' => 'success_url',
  'cancel_url' => 'cancel_url',
 ],
]);
echo $response->getBody();
                    
                        
**Response: SUCCESS (200 OK)**
{
 "message": {
 "success": [
  "Order created successfully."
 ]
},
"data": {
 "redirect_url":"https://example.com/login/OISADFDFSDFSF",
 "order_details":{
 "amount" : "10",
 "fixed_charge" : 2,
 "percent_charge" : 1,
 "total_charge" : 3,
 "total_payable" : 13,
 "currency" : "USD",
 "expiry_time": "2024-04-25T06:48:35.984285Z",
 "success_url": "http://127.0.0.1/nfcpay/user/transaction/success",
 "cancel_url": "http://127.0.0.1/nfcpay/user/transaction/cancel"
}
},
"type": "success"
}
                    
                        
**Response: ERROR (400 FAILED)**
{
 "message": {
 "error": [
  "Invalid token."
 ]
},
"data": null,
"type": "error"
}