/home/kueuepay/public_html/vendor/dflydev/dot-access-data/CHANGELOG.md
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.0.2] - 2022-10-27

### Fixed

 - Added missing return types to docblocks (#44, #45)

## [3.0.1] - 2021-08-13

### Added

 - Adds ReturnTypeWillChange to suppress PHP 8.1 warnings (#40)

## [3.0.0] - 2021-01-01

### Added
 - Added support for both `.` and `/`-delimited key paths (#24)
 - Added parameter and return types to everything; enabled strict type checks (#18)
 - Added new exception classes to better identify certain types of errors (#20)
 - `Data` now implements `ArrayAccess` (#17)
 - Added ability to merge non-associative array values (#31, #32)

### Changed
 - All thrown exceptions are now instances or subclasses of `DataException` (#20)
 - Calling `get()` on a missing key path without providing a default will throw a `MissingPathException` instead of returning `null` (#29)
 - Bumped supported PHP versions to 7.1 - 8.x (#18)

### Fixed
 - Fixed incorrect merging of array values into string values (#32)
 - Fixed `get()` method behaving as if keys with `null` values didn't exist

## [2.0.0] - 2017-12-21

### Changed
 - Bumped supported PHP versions to 7.0 - 7.4 (#12)
 - Switched to PSR-4 autoloading

## [1.1.0] - 2017-01-20

### Added
 - Added new `has()` method to check for the existence of the given key (#4, #7)

## [1.0.1] - 2015-08-12

### Added
 - Added new optional `$default` parameter to the `get()` method (#2)

## [1.0.0] - 2012-07-17

**Initial release!**

[Unreleased]: https://github.com/dflydev/dflydev-dot-access-data/compare/v3.0.2...main
[3.0.2]: https://github.com/dflydev/dflydev-dot-access-data/compare/v3.0.1...v3.0.2
[3.0.1]: https://github.com/dflydev/dflydev-dot-access-data/compare/v3.0.0...v3.0.1
[3.0.0]: https://github.com/dflydev/dflydev-dot-access-data/compare/v2.0.0...v3.0.0
[2.0.0]: https://github.com/dflydev/dflydev-dot-access-data/compare/v1.1.0...v2.0.0
[1.1.0]: https://github.com/dflydev/dflydev-dot-access-data/compare/v1.0.1...v1.1.0
[1.0.1]: https://github.com/dflydev/dflydev-dot-access-data/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/dflydev/dflydev-dot-access-data/releases/tag/v1.0.0
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"
}