Skip to content

Commit

Permalink
refs #43170 get seller status call
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan202 committed Nov 20, 2023
1 parent 1d0dbf7 commit e952863
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions classes/MethodEC.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

use PaypalAddons\classes\AbstractMethodPaypal;
use PaypalAddons\classes\API\PaypalApiManager;
use PaypalAddons\classes\API\Response\ResponseGetSellerStatus;
use PaypalAddons\classes\WhiteList\WhiteListService;

if (!defined('_PS_VERSION_')) {
Expand Down Expand Up @@ -320,6 +321,13 @@ public function getMerchantId()

public function getSellerStatus()
{
if (empty($this->getMerchantId())) {
$response = new ResponseGetSellerStatus();
$response->setSuccess(false);

return $response;
}

return $this->paypalApiManager->getSellerStatusRequest()->execute();
}
}
8 changes: 8 additions & 0 deletions classes/MethodPPP.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

use PaypalAddons\classes\AbstractMethodPaypal;
use PaypalAddons\classes\API\PaypalApiManager;
use PaypalAddons\classes\API\Response\ResponseGetSellerStatus;
use PaypalAddons\classes\PUI\DataUserForm;
use PaypalAddons\classes\PuiMethodInterface;
use PaypalAddons\classes\WhiteList\WhiteListService;
Expand Down Expand Up @@ -364,6 +365,13 @@ public function setPuiDataUser(DataUserForm $data)

public function getSellerStatus()
{
if (empty($this->getMerchantId())) {
$response = new ResponseGetSellerStatus();
$response->setSuccess(false);

return $response;
}

return $this->paypalApiManager->getSellerStatusRequest()->execute();
}

Expand Down

0 comments on commit e952863

Please sign in to comment.