# Changelog All notable changes to Tokenizer are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. ## [1.2.3] - 2024-03-03 ### Changed * Do not use implicitly nullable parameters ## [1.2.2] - 2023-11-20 ### Fixed * [#18](https://github.com/theseer/tokenizer/issues/18): Tokenizer fails on protobuf metadata files ## [1.2.1] - 2021-07-28 ### Fixed * [#13](https://github.com/theseer/tokenizer/issues/13): Fatal error when tokenizing files that contain only a single empty line ## [1.2.0] - 2020-07-13 This release is now PHP 8.0 compliant. ### Fixed * Whitespace handling in general (only noticable in the intermediate `TokenCollection`) is now consitent ### Changed * Updated `Tokenizer` to deal with changed whitespace handling in PHP 8.0 The XMLSerializer was unaffected. ## [1.1.3] - 2019-06-14 ### Changed * Ensure XMLSerializer can deal with empty token collections ### Fixed * [#2](https://github.com/theseer/tokenizer/issues/2): Fatal error in infection / phpunit ## [1.1.2] - 2019-04-04 ### Changed * Reverted PHPUnit 8 test update to stay PHP 7.0 compliant ## [1.1.1] - 2019-04-03 ### Fixed * [#1](https://github.com/theseer/tokenizer/issues/1): Empty file causes invalid array read ### Changed * Tests should now be PHPUnit 8 compliant ## [1.1.0] - 2017-04-07 ### Added * Allow use of custom namespace for XML serialization ## [1.0.0] - 2017-04-05 Initial Release [1.2.3]: https://github.com/theseer/tokenizer/compare/1.2.2...1.2.3 [1.2.2]: https://github.com/theseer/tokenizer/compare/1.2.1...1.2.2 [1.2.1]: https://github.com/theseer/tokenizer/compare/1.2.0...1.2.1 [1.2.0]: https://github.com/theseer/tokenizer/compare/1.1.3...1.2.0 [1.1.3]: https://github.com/theseer/tokenizer/compare/1.1.2...1.1.3 [1.1.2]: https://github.com/theseer/tokenizer/compare/1.1.1...1.1.2 [1.1.1]: https://github.com/theseer/tokenizer/compare/1.1.0...1.1.1 [1.1.0]: https://github.com/theseer/tokenizer/compare/1.0.0...1.1.0 [1.0.0]: https://github.com/theseer/tokenizer/compare/b2493e57de80c1b7414219b28503fa5c6b4d0a98...1.0.0
Initiates a new payment transaction.
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"
}