diff --git a/src/Clients/Vault/CardClient.php b/src/Clients/Vault/CardClient.php index b554063..74adf61 100644 --- a/src/Clients/Vault/CardClient.php +++ b/src/Clients/Vault/CardClient.php @@ -65,4 +65,17 @@ public function put(string $customerId, string $cardToken, bool $isDefault) ['json' => compact('isDefault')] ); } + + /** + * @param string $customerId + * @param string $cardToken + * @return ResponseInterface + * @throws ClientException + */ + public function delete(string $customerId, string $cardToken) + { + return $this->payMayaClient + ->getClientWithSecretKey() + ->delete("/payments/v1/customers/{$customerId}/cards/{$cardToken}"); + } } diff --git a/tests/PayMayaClientTest.php b/tests/PayMayaClientTest.php index 82e4951..7266a94 100644 --- a/tests/PayMayaClientTest.php +++ b/tests/PayMayaClientTest.php @@ -32,7 +32,7 @@ public function testCreateClient($environment, $baseUri) public static function environmentProvider() { return [ - 'production' => ['production', 'https://pg.paymaya.com'], + 'production' => ['production', 'https://pg.maya.ph'], 'sandbox' => ['sandbox', 'https://pg-sandbox.paymaya.com'], ]; }