Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #18 from mollie/reseller-disconnect-account
Browse files Browse the repository at this point in the history
Reseller disconnect account Fixes #17
  • Loading branch information
Willem Stuursma-Ruwen authored Apr 30, 2018
2 parents 9fc949a + 37677d6 commit 8725af3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions php/src/mollie/reseller.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,23 @@ public function bankAccountEdit($username, $password, $id, array $fields)
);
}

/**
* @param string $username
* @param string $password
* @param string $partner_id_customer
*
* @throws Mollie_Exception
* @return SimpleXMLElement
*/
public function disconnectAccount($username, $password, $partner_id_customer)
{
return $this->performRequest(
self::METHOD_POST,
sprintf('/api/reseller/v%d/disconnect-account', self::API_VERSION),
["username" => $username, "password" => $password, "partner_id_customer" => $partner_id_customer]
);
}

/**
* @param string $username
* @param string $password
Expand Down
8 changes: 8 additions & 0 deletions php/tests/mollie/resellerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ public function dpApiCalls ()
['availablePaymentMethodsByPartnerId', [
'partner_id_customer' => '555',
]],
['disconnectAccount', [
'username' => 'john',
'password' => '123456',
'partner_id_customer' => '555',
]],
];
}

Expand All @@ -151,6 +156,9 @@ public function testApiCalls ($method, array $params)
case 'availablePaymentMethodsByPartnerId':
$actual_method = 'availablePaymentMethods';
break;
case 'disconnectAccount':
$actual_method = 'disconnect-account';
break;
default:
$actual_method = $method;
}
Expand Down

0 comments on commit 8725af3

Please sign in to comment.