-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #272 from Adyen/develop
Release 10.1.0
- Loading branch information
Showing
10 changed files
with
313 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
namespace Adyen\Service; | ||
|
||
class Hop extends \Adyen\Service | ||
{ | ||
/** | ||
* @var ResourceModel\Hop\GetOnboardingUrl | ||
*/ | ||
protected $getOnboardingUrl; | ||
|
||
/** | ||
* @var ResourceModel\Hop\GetPciQuestionnaireUrl | ||
*/ | ||
protected $getPciQuestionnaireUrl; | ||
|
||
/** | ||
* Hop constructor. | ||
* @param \Adyen\Client $client | ||
* @throws \Adyen\AdyenException | ||
*/ | ||
public function __construct(\Adyen\Client $client) | ||
{ | ||
parent::__construct($client); | ||
|
||
$this->getOnboardingUrl = new \Adyen\Service\ResourceModel\Hop\GetOnboardingUrl($this); | ||
$this->getPciQuestionnaireUrl = new \Adyen\Service\ResourceModel\Hop\GetPciQuestionnaireUrl($this); | ||
} | ||
|
||
/** | ||
* @param $params | ||
* @return mixed | ||
* @throws \Adyen\AdyenException | ||
*/ | ||
public function getOnboardingUrl($params) | ||
{ | ||
return $this->getOnboardingUrl->request($params); | ||
} | ||
|
||
/** | ||
* @param $params | ||
* @return mixed | ||
* @throws \Adyen\AdyenException | ||
*/ | ||
public function getPciQuestionnaireUrl($params) | ||
{ | ||
return $this->getPciQuestionnaireUrl->request($params); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Hop; | ||
|
||
class GetOnboardingUrl extends \Adyen\Service\AbstractResource | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $endpoint; | ||
|
||
/** | ||
* GetOnboardingUrl constructor. | ||
* @param $service | ||
*/ | ||
public function __construct($service) | ||
{ | ||
$this->endpoint = $service->getClient()->getConfig()->get('endpointHop') . | ||
'/' . $service->getClient()->getApiHopVersion() . '/getOnboardingUrl'; | ||
parent::__construct($service, $this->endpoint); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/Adyen/Service/ResourceModel/Hop/GetPciQuestionnaireUrl.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Hop; | ||
|
||
class GetPciQuestionnaireUrl extends \Adyen\Service\AbstractResource | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $endpoint; | ||
|
||
/** | ||
* GetPciQuestionnaireUrl constructor. | ||
* @param $service | ||
*/ | ||
public function __construct($service) | ||
{ | ||
$this->endpoint = $service->getClient()->getConfig()->get('endpointHop') . | ||
'/' . $service->getClient()->getApiHopVersion() . '/getPciQuestionnaireUrl'; | ||
parent::__construct($service, $this->endpoint); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"invalidFields": [ | ||
{ | ||
"errorCode": 91, | ||
"errorDescription": "The return url specified is invalid", | ||
"fieldType": { | ||
"field": "returnUrl", | ||
"fieldName": "returnUrl" | ||
} | ||
} | ||
], | ||
"pspReference": "8816163576602761", | ||
"resultCode": "Failed" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"status": 500, | ||
"errorCode": "702", | ||
"message": "Required field 'accountHolderCode' is null", | ||
"errorType": "validation" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"invalidFields": [], | ||
"pspReference": "8616163562170106", | ||
"resultCode": "Success", | ||
"redirectUrl": "https://hop-test.adyen.com/hop/view/?token=tokenValue" | ||
} |
Oops, something went wrong.