Cleanup, added docs & RC 2
This commit is contained in:
@ -35,13 +35,12 @@ class Handler
|
||||
* - amount
|
||||
* - description
|
||||
* - returnUrl
|
||||
* - sha1
|
||||
* - hash
|
||||
*/
|
||||
$this->post('/transactionRequest', function ($request, $response, $args) {
|
||||
$parsedBody = $request->getParsedBody();
|
||||
|
||||
if (isset($parsedBody['clientId']) && isset($parsedBody['transactionId']) && isset($parsedBody['amount']) && isset($parsedBody['description']) && isset($parsedBody['returnUrl']) && isset($parsedBody['hash'])) {
|
||||
// Correct request
|
||||
try {
|
||||
$client = new Client($parsedBody['clientId']);
|
||||
$clientSecret = $client->getClientSecret();
|
||||
@ -112,13 +111,12 @@ class Handler
|
||||
* Requires the following POST arguments:
|
||||
* - clientId
|
||||
* - transactionId
|
||||
* - sha1
|
||||
* - hash
|
||||
*/
|
||||
$this->post('/statusRequest', function ($request, $response, $args) {
|
||||
$parsedBody = $request->getParsedBody();
|
||||
|
||||
if (isset($parsedBody['clientId']) && isset($parsedBody['transactionId']) && isset($parsedBody['hash'])) {
|
||||
// Correct request
|
||||
try {
|
||||
$client = new Client($parsedBody['clientId']);
|
||||
$clientSecret = $client->getClientSecret();
|
||||
|
Reference in New Issue
Block a user