-
Notifications
You must be signed in to change notification settings - Fork 108
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 #17 from Adyen/develop
Merge 'Develop'
- Loading branch information
Showing
15 changed files
with
767 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,7 @@ | |
composer.lock | ||
|
||
# ignore Mac OS X file | ||
.DS_Store | ||
.DS_Store | ||
|
||
# ignore PhpStorm .idea folder | ||
.idea |
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,67 @@ | ||
<?php | ||
|
||
namespace Adyen\Service; | ||
|
||
class Payout extends \Adyen\Service | ||
{ | ||
|
||
protected $_confirm; | ||
protected $_decline; | ||
protected $_storeDetailsAndSubmit; | ||
protected $_submit; | ||
protected $_confirmThirdParty; | ||
protected $_declineThirdParty; | ||
protected $_storeDetailsAndSubmitThirdParty; | ||
protected $_submitThirdParty; | ||
|
||
public function __construct(\Adyen\Client $client) | ||
{ | ||
parent::__construct($client); | ||
|
||
$this->_confirm = new \Adyen\Service\ResourceModel\Payout\Confirm($this); | ||
$this->_decline = new \Adyen\Service\ResourceModel\Payout\Decline($this); | ||
$this->_storeDetailsAndSubmit = new \Adyen\Service\ResourceModel\Payout\StoreDetailsAndSubmit($this); | ||
$this->_submit = new \Adyen\Service\ResourceModel\Payout\Submit($this); | ||
$this->_confirmThirdParty = new \Adyen\Service\ResourceModel\Payout\ThirdParty\ConfirmThirdParty($this); | ||
$this->_declineThirdParty = new \Adyen\Service\ResourceModel\Payout\ThirdParty\DeclineThirdParty($this); | ||
$this->_storeDetailsAndSubmitThirdParty = new \Adyen\Service\ResourceModel\Payout\ThirdParty\StoreDetailsAndSubmitThirdParty($this); | ||
$this->_submitThirdParty = new \Adyen\Service\ResourceModel\Payout\ThirdParty\SubmitThirdParty($this); | ||
|
||
} | ||
|
||
public function confirm($params) { | ||
$result = $this->_confirm->request($params); | ||
return $result; | ||
} | ||
public function decline($params) { | ||
$result = $this->_decline->request($params); | ||
return $result; | ||
} | ||
public function storeDetailsAndSubmit($params) { | ||
$result = $this->_storeDetailsAndSubmit->request($params); | ||
return $result; | ||
} | ||
public function submit($params) { | ||
$result = $this->_submit->request($params); | ||
return $result; | ||
} | ||
public function confirmThirdParty($params) { | ||
$result = $this->_confirmThirdParty->request($params); | ||
return $result; | ||
} | ||
public function declineThirdParty($params) { | ||
$result = $this->_declineThirdParty->request($params); | ||
return $result; | ||
} | ||
public function storeDetailsAndSubmitThirdParty($params) { | ||
$result = $this->_storeDetailsAndSubmitThirdParty->request($params); | ||
return $result; | ||
} | ||
public function submitThirdParty($params) { | ||
$result = $this->_submitThirdParty->request($params); | ||
return $result; | ||
} | ||
|
||
|
||
|
||
} |
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,20 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Payout; | ||
|
||
class Confirm extends \Adyen\Service\AbstractResource | ||
{ | ||
protected $_requiredFields = array( | ||
'merchantAccount', | ||
'originalReference' | ||
); | ||
|
||
protected $_endpoint; | ||
|
||
public function __construct($service) | ||
{ | ||
$this->_endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Payout/' . $service->getClient()->getApiVersion() . '/confirm'; | ||
parent::__construct($service, $this->_endpoint, $this->_requiredFields); | ||
} | ||
|
||
} |
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,20 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Payout; | ||
|
||
class Decline extends \Adyen\Service\AbstractResource | ||
{ | ||
protected $_requiredFields = array( | ||
'merchantAccount', | ||
'originalReference' | ||
); | ||
|
||
protected $_endpoint; | ||
|
||
public function __construct($service) | ||
{ | ||
$this->_endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Payout/' . $service->getClient()->getApiVersion() . '/decline'; | ||
parent::__construct($service, $this->_endpoint, $this->_requiredFields); | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
src/Adyen/Service/ResourceModel/Payout/StoreDetailsAndSubmit.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,25 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Payout; | ||
|
||
class StoreDetailsAndSubmit extends \Adyen\Service\AbstractResource | ||
{ | ||
protected $_requiredFields = array( | ||
'amount.currency', | ||
'amount.value', | ||
'merchantAccount', | ||
'recurring.contract', | ||
'reference', | ||
'shopperEmail', | ||
'shopperReference', | ||
); | ||
|
||
protected $_endpoint; | ||
|
||
public function __construct($service) | ||
{ | ||
$this->_endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Payout/' . $service->getClient()->getApiVersion() . '/storeDetailAndSubmit'; | ||
parent::__construct($service, $this->_endpoint, $this->_requiredFields); | ||
} | ||
|
||
} |
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,26 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Payout; | ||
|
||
class Submit extends \Adyen\Service\AbstractResource | ||
{ | ||
protected $_requiredFields = array( | ||
'amount.currency', | ||
'amount.value', | ||
'merchantAccount', | ||
'recurring.contract', | ||
'reference', | ||
'shopperEmail', | ||
'shopperReference', | ||
'selectedRecurringDetailReference' | ||
); | ||
|
||
protected $_endpoint; | ||
|
||
public function __construct($service) | ||
{ | ||
$this->_endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Payout/' . $service->getClient()->getApiVersion() . '/submit'; | ||
parent::__construct($service, $this->_endpoint, $this->_requiredFields); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
src/Adyen/Service/ResourceModel/Payout/ThirdParty/ConfirmThirdParty.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,20 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Payout\ThirdParty; | ||
|
||
class ConfirmThirdParty extends \Adyen\Service\AbstractResource | ||
{ | ||
protected $_requiredFields = array( | ||
'merchantAccount', | ||
'originalReference' | ||
); | ||
|
||
protected $_endpoint; | ||
|
||
public function __construct($service) | ||
{ | ||
$this->_endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Payout/' . $service->getClient()->getApiVersion() . '/confirmThirdParty'; | ||
parent::__construct($service, $this->_endpoint, $this->_requiredFields); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
src/Adyen/Service/ResourceModel/Payout/ThirdParty/DeclineThirdParty.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,20 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Payout\ThirdParty; | ||
|
||
class DeclineThirdParty extends \Adyen\Service\AbstractResource | ||
{ | ||
protected $_requiredFields = array( | ||
'merchantAccount', | ||
'originalReference' | ||
); | ||
|
||
protected $_endpoint; | ||
|
||
public function __construct($service) | ||
{ | ||
$this->_endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Payout/' . $service->getClient()->getApiVersion() . '/declineThirdParty'; | ||
parent::__construct($service, $this->_endpoint, $this->_requiredFields); | ||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
src/Adyen/Service/ResourceModel/Payout/ThirdParty/StoreDetailsAndSubmitThirdParty.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,28 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Payout\ThirdParty; | ||
|
||
class StoreDetailsAndSubmitThirdParty extends \Adyen\Service\AbstractResource | ||
{ | ||
protected $_requiredFields = array( | ||
'merchantAccount', | ||
'shopperEmail', | ||
'shopperReference', | ||
'reference', | ||
'recurring.contract', | ||
'amount.currency', | ||
'amount.value', | ||
'bank.iban', | ||
'bank.ownerName', | ||
'bank.countryCode' | ||
); | ||
|
||
protected $_endpoint; | ||
|
||
public function __construct($service) | ||
{ | ||
$this->_endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Payout/' . $service->getClient()->getApiVersion() . '/storeDetailAndSubmitThirdParty'; | ||
parent::__construct($service, $this->_endpoint, $this->_requiredFields); | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/Adyen/Service/ResourceModel/Payout/ThirdParty/SubmitThirdParty.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,26 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\Payout\ThirdParty; | ||
|
||
class SubmitThirdParty extends \Adyen\Service\AbstractResource | ||
{ | ||
protected $_requiredFields = array( | ||
'amount.currency', | ||
'amount.value', | ||
'merchantAccount', | ||
'recurring.contract', | ||
'reference', | ||
'shopperEmail', | ||
'shopperReference', | ||
'selectedRecurringDetailReference' | ||
); | ||
|
||
protected $_endpoint; | ||
|
||
public function __construct($service) | ||
{ | ||
$this->_endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Payout/' . $service->getClient()->getApiVersion() . '/submitThirdParty'; | ||
parent::__construct($service, $this->_endpoint, $this->_requiredFields); | ||
} | ||
|
||
} |
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
Oops, something went wrong.