Skip to content

Commit

Permalink
Release 1.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
r-simlinger committed Dec 5, 2022
1 parent cfc5227 commit ef14561
Show file tree
Hide file tree
Showing 20 changed files with 130 additions and 41 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Removed


## [1.23.0] - 2022-12-05

### Added
Function to check the live transaction status:
- \SecucardConnect\Product\Payment\TransactionsService::checkStatus()

### Changed
- New structure of Payment.Model.CrowdFundingData


## [1.22.0] - 2021-06-11

### Added
Expand Down Expand Up @@ -703,3 +714,4 @@ First release
[1.20.0]:https://github.com/secucard/secucard-connect-php-sdk/compare/1.19.0...1.20.0
[1.21.0]:https://github.com/secucard/secucard-connect-php-sdk/compare/1.20.0...1.21.0
[1.22.0]:https://github.com/secucard/secucard-connect-php-sdk/compare/1.21.0...1.22.0
[1.23.0]:https://github.com/secucard/secucard-connect-php-sdk/compare/1.22.0...1.23.0
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "secucard connect PHP client SDK",
"license": "Apache-2.0",
"homepage": "https://github.com/secucard/secucard-connect-php-sdk",
"version": "1.22.0",
"version": "1.23.0",
"require": {
"php": ">=5.5.0",
"guzzlehttp/guzzle": "~6.3|~7.0",
Expand Down
2 changes: 0 additions & 2 deletions src/SecucardConnect/Auth/OauthProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ public function getAccessToken($deviceCode = null, $json = false)
*/
private function updateToken(RefreshTokenCredentials $refreshToken = null, $deviceCode = null)
{
$tokenData = null;

// array of url parameters that will be sent in auth request
$params = [];
if ($refreshToken == null && !empty($deviceCode)) {
Expand Down
6 changes: 1 addition & 5 deletions src/SecucardConnect/Product/Payment/ContainersService.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<?php
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Payment;

use GuzzleHttp\Exception\GuzzleException;
use SecucardConnect\Client\ApiError;
use SecucardConnect\Client\AuthError;
use SecucardConnect\Client\ClientError;
use SecucardConnect\Client\ProductService;
use SecucardConnect\Product\Common\Model\BaseCollection;

/**
* Operations for the payment/containers resource.
Expand Down
6 changes: 3 additions & 3 deletions src/SecucardConnect/Product/Payment/ContractsService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Payment;

Expand All @@ -11,7 +12,6 @@
use SecucardConnect\Product\Payment\Model\CloneParams;
use SecucardConnect\Product\Payment\Model\CreateSubContractRequest;
use SecucardConnect\Product\Payment\Model\CreateSubContractResponse;
use SecucardConnect\Product\Payment\Model\Transaction;
use SecucardConnect\Product\Services\Model\Contract;


Expand All @@ -26,7 +26,7 @@ class ContractsService extends ProductService
*
* @param string $contractId The id of the parent contract.
* @param CloneParams $param The parameters for cloning.
* @return Contract
* @return \SecucardConnect\Product\Payment\Model\Contract
* @throws GuzzleException
* @throws ApiError
* @throws AuthError
Expand Down Expand Up @@ -56,7 +56,7 @@ public function getPaymentMethods($contractId = 'me')
* Clones the contract of the current user according to the given parameters and returns the contract.
*
* @param CloneParams $param The parameters for cloning.
* @return Contract
* @return \SecucardConnect\Product\Payment\Model\Contract
* @throws GuzzleException
* @throws ApiError
* @throws AuthError
Expand Down
26 changes: 26 additions & 0 deletions src/SecucardConnect/Product/Payment/Model/CheckStatusResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Payment\Model;

/**
* Class CheckStatusResponse
* @package SecucardConnect\Product\Payment\Model
*/
class CheckStatusResponse
{
/**
* @var int
*/
public $status;

/**
* @var int
*/
public $amount;

/**
* @var string
*/
public $currency;
}
11 changes: 11 additions & 0 deletions src/SecucardConnect/Product/Payment/Model/CrowdFundingData.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Payment\Model;

Expand All @@ -13,11 +14,21 @@ class CrowdFundingData
*/
public $project;

/**
* @var int
*/
public $deposited_amount = 0;

/**
* @var int
*/
public $paid_out = 0;

/**
* @var int
*/
public $deducted_amount = 0;

/**
* @var CrowdFundingDataOpen
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Payment\Model;

Expand All @@ -12,4 +13,29 @@ class CrowdFundingDataOpenDetail
* @var int
*/
public $total = 0;

/**
* @var int|null
*/
public $debit = null;

/**
* @var int|null
*/
public $credit_card = null;

/**
* @var int|null
*/
public $prepay = null;

/**
* @var int|null
*/
public $sofort = null;

/**
* @var int|null
*/
public $twint = null;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@
class CrowdFundingDataProject
{
/**
* @var int
* @var string
*/
public $total_amount = 0;

/**
* @var int
*/
public $total_count = 0;
public $currency = 'EUR';

/**
* @var CrowdFundingDataProjectAmount
Expand All @@ -37,4 +32,9 @@ class CrowdFundingDataProject
* @var CrowdFundingDataProjectAmount
*/
public $sofort;

/**
* @var CrowdFundingDataProjectAmount
*/
public $twint;
}
1 change: 0 additions & 1 deletion src/SecucardConnect/Product/Payment/Model/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class Data
*/
public $owner;

// account data:
/**
* @var string
*/
Expand Down
3 changes: 2 additions & 1 deletion src/SecucardConnect/Product/Payment/Model/SecupayPayout.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Payment\Model;

Expand All @@ -18,7 +19,7 @@ class SecupayPayout extends BaseModel
public $demo;

/**
* Total amount of transaction lit's items
* Total amount of transaction lit's items
*
* @var int
*/
Expand Down
3 changes: 1 addition & 2 deletions src/SecucardConnect/Product/Payment/Model/Transactions.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Payment\Model;

use SecucardConnect\Product\Common\Model\BaseModel;

/**
* Class Transactions
* @package SecucardConnect\Product\Payment\Model
Expand Down
24 changes: 24 additions & 0 deletions src/SecucardConnect/Product/Payment/TransactionsService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
/** @noinspection PhpUnused */
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */

namespace SecucardConnect\Product\Payment;

Expand All @@ -14,6 +16,7 @@
use SecucardConnect\Product\Payment\Event\PaymentChanged;
use SecucardConnect\Product\Payment\Model\AssignedPaymentTransaction;
use SecucardConnect\Product\Payment\Model\Basket;
use SecucardConnect\Product\Payment\Model\CheckStatusResponse;
use SecucardConnect\Product\Payment\Model\CrowdFundingData;
use SecucardConnect\Product\Payment\Model\Transaction;
use SecucardConnect\Product\Payment\Model\Transactions;
Expand Down Expand Up @@ -88,6 +91,27 @@ public function getOldFormat($id)
);
}

/**
* Function to check the live data for the given transaction
*
* @param string $paymentId The payment transaction id
* @return CheckStatusResponse
* @throws ApiError
* @throws AuthError
* @throws ClientError
* @throws GuzzleException
*/
public function checkStatus($paymentId)
{
return $this->getWithAction(
$paymentId,
'checkStatus',
null,
null,
'SecucardConnect\\Product\\Payment\\Model\\CheckStatusResponse'
);
}

/**
* @param string $merchantId ('MRC_...')
* @return CrowdFundingData
Expand Down
7 changes: 4 additions & 3 deletions src/SecucardConnect/Product/Services/Model/Contract.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php
/** @noinspection PhpFullyQualifiedNameUsageInspection */
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Services\Model;

use SecucardConnect\Product\Common\Model\BaseModel;
use SecucardConnect\Product\General\Model\Merchant;

/**
* Ident contracts Api Model class
Expand Down Expand Up @@ -31,7 +32,7 @@ class Contract extends BaseModel
public $created;

/**
* @var Merchant
* @var \SecucardConnect\Product\General\Model\Merchant
*/
public $merchant;
}
}
5 changes: 3 additions & 2 deletions src/SecucardConnect/Product/Services/Model/IdentCase.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Services\Model;

use SecucardConnect\Product\Common\Model\BaseModel;
use SecucardConnect\Product\Common\Model\Contact;

/**
* Identcase Api Model class
Expand Down Expand Up @@ -100,7 +101,7 @@ class IdentCase extends BaseModel
public $task;

/**
* @var BaseModel
* @var \SecucardConnect\Product\Common\Model\BaseModel
*/
public $owner;
}
Expand Down
5 changes: 3 additions & 2 deletions src/SecucardConnect/Product/Services/Model/IdentRequest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php
/** @noinspection PhpFullyQualifiedNameUsageInspection */
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Services\Model;

use SecucardConnect\Product\Common\Model\BaseModel;
use SecucardConnect\Product\General\Model\Merchant;

/**
* Identrequests Api Model class
Expand Down Expand Up @@ -68,7 +69,7 @@ class IdentRequest extends BaseModel
public $use_internal_contract;

/**
* @var Merchant[]
* @var \SecucardConnect\Product\General\Model\Merchant[]
*/
public $assignment;

Expand Down
8 changes: 4 additions & 4 deletions src/SecucardConnect/Product/Services/Model/Task.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/** @noinspection PhpFullyQualifiedNameUsageInspection */
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Services\Model;

use SecucardConnect\Product\Common\Model\BaseModel;

/**
* Task Api Model class
*/
Expand All @@ -30,7 +30,7 @@ class Task
public $status;

/**
* @var BaseModel[]
* @var \SecucardConnect\Product\Common\Model\BaseModel[]
*/
public $assign;
}
}
2 changes: 1 addition & 1 deletion src/SecucardConnect/Product/Services/Model/Uploadident.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/** @noinspection PhpUnused */

namespace SecucardConnect\Product\Services\Model;

use SecucardConnect\Product\Common\Model\BaseModel;
use SecucardConnect\Product\General\Model\Merchant;

/**
* Uploadidents Api Model class
Expand Down
5 changes: 0 additions & 5 deletions src/SecucardConnect/Product/Services/UploadidentsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

namespace SecucardConnect\Product\Services;

use GuzzleHttp\Exception\GuzzleException;
use SecucardConnect\Client\ApiError;
use SecucardConnect\Client\AuthError;
use SecucardConnect\Client\ClientError;
use SecucardConnect\Client\ProductService;
use SecucardConnect\Product\Services\Model\IdentCase;

/**
* Operations for the services/uploadidents resource.
Expand Down
Loading

0 comments on commit ef14561

Please sign in to comment.