Skip to content

Commit 9082a53

Browse files
committed
Optional BIN information and new FieldTypes
1 parent 8c49d78 commit 9082a53

File tree

5 files changed

+48
-26
lines changed

5 files changed

+48
-26
lines changed

composer.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"name": "plexophp/php-sdk",
3-
"type": "library",
4-
"license": "AGPL-3.0-only",
5-
"description": "Plexo SDK para PHP",
6-
"autoload": {
7-
"psr-4": {
8-
"Plexo\\Sdk\\": "src"
9-
},
10-
"files": [
11-
"src/Utilities/functions.php"
12-
]
13-
},
14-
"scripts": {
15-
"test": "./vendor/bin/phpunit --bootstrap vendor/autoload.php tests"
16-
},
17-
"require": {
18-
"php": ">=5.6",
19-
"guzzlehttp/guzzle": "^6.3.0",
20-
"psr/log": "^1.0"
21-
},
22-
"require-dev": {
23-
"phpunit/phpunit": "^5.7",
24-
"monolog/monolog": "^2.2"
25-
}
2+
"name" : "plexophp/php-sdk",
3+
"type" : "library",
4+
"license" : "AGPL-3.0-only",
5+
"description" : "Plexo SDK para PHP",
6+
"autoload" : {
7+
"psr-4" : {
8+
"Plexo\\Sdk\\" : "src"
9+
},
10+
"files" : [
11+
"src/Utilities/functions.php"
12+
]
13+
},
14+
"scripts" : {
15+
"test" : "./vendor/bin/phpunit --bootstrap vendor/autoload.php tests"
16+
},
17+
"require" : {
18+
"php" : ">=7.4",
19+
"guzzlehttp/guzzle" : "^7.3.0",
20+
"psr/log" : "^1.0"
21+
},
22+
"require-dev" : {
23+
"phpunit/phpunit" : "^5.7",
24+
"monolog/monolog" : "^2.2"
25+
}
2626
}

src/Models/Authorization.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class Authorization extends ModelsBase
1818
* @var string $ExtendableInstrumentToken (Optional)
1919
* @var bool $DoNotUseCallback Default false
2020
* @var WebFormSettingsDto $WebFormSettings
21+
* @var bool $ExtendedBINInformation Default false
2122
*/
2223

2324
protected $data = [
@@ -34,6 +35,7 @@ class Authorization extends ModelsBase
3435
'RedirectUri' => null,
3536
'Type' => null,
3637
'WebFormSettings' => null,
38+
'ExtendedBINInformation' => false,
3739
];
3840

3941
public static function getValidationMetadata()
@@ -92,6 +94,10 @@ public static function getValidationMetadata()
9294
'class' => 'WebFormSettingsDto',
9395
'required' => false,
9496
],
97+
'ExtendedBINInformation' => [
98+
'type' => 'bool',
99+
'required' => false,
100+
],
95101
];
96102
}
97103

src/Models/ExpressCheckoutSettingsDto.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,13 @@ public static function getValidationMetadata()
2121
],
2222
];
2323
}
24+
25+
public function toArray($canonize = false)
26+
{
27+
return
28+
[
29+
'Display'=>$this->data['Display']? $this->data['Display']->toArray($canonize):null
30+
];
31+
}
32+
2433
}

src/Models/Transaction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class Transaction extends ModelsBase
8686
* @var Dictionary<FieldType, string>
8787
*/
8888
public $FieldInformation;
89+
8990

9091
public function __construct($data = null)
9192
{
@@ -99,7 +100,6 @@ public function __construct($data = null)
99100
$this->Currency = new Currency($data['Currency']);
100101
$this->IsAnonymous = $data['IsAnonymous'];
101102
$this->CurrentState = $data['CurrentState'];
102-
// $this->CurrentState = new TransactionType($data['CurrentState']);
103103
$this->InvoiceNumber = $data['InvoiceNumber'];
104104
$this->FinancialInclusion = new FinancialInclusionResult($data['FinancialInclusion']);
105105
$this->Transactions = $data['Transactions'];

src/Type/FieldType.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ class FieldType {
9595
const SUBCOMMERCELEGALNAME= 0x81C;
9696
const SUBCOMMERCESTATE= 0x81D;
9797
const SUBCOMMERCEPOSTALCODE= 0x81E;
98+
const BUYERFEEAMOUNT= 0x81F;
99+
const ISSUERFEEAMOUNT= 0x820;
100+
const TAXDISCOUNTAMOUNT= 0x821;
101+
const TAXDISCOUNTLAW= 0x822;
98102

99103

100104
// Secure Information Starts at 0x8100. Private Flag | User Flag
@@ -196,7 +200,10 @@ class FieldType {
196200
'SubCommerceLegalName',
197201
'SubCommerceState',
198202
'SubCommercePostalCode',
199-
203+
'BuyerFeeAmount',
204+
'IssuerFeeAmount',
205+
'TaxDiscountAmount',
206+
'TaxDiscountLaw',
200207
0x8101 => 'Pan',
201208
'Token',
202209
'UniqueId',

0 commit comments

Comments
 (0)