Skip to content

Commit

Permalink
Add delete card function in CardClient
Browse files Browse the repository at this point in the history
  • Loading branch information
kaelmoreno-cp authored Mar 5, 2025
1 parent 9861bc4 commit f85203e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Clients/Vault/CardClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
}
}

0 comments on commit f85203e

Please sign in to comment.