mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Fix phpcd
This commit is contained in:
parent
b161b8cfb5
commit
e3dc563a6f
5 changed files with 20 additions and 8 deletions
|
@ -208,7 +208,15 @@ class PaymentTokenEndpoint {
|
|||
return wp_remote_retrieve_response_code( $response ) === 204;
|
||||
}
|
||||
|
||||
public function delete_token_by_id(string $token_id): bool {
|
||||
/**
|
||||
* Deletes payment token by the given id.
|
||||
*
|
||||
* @param string $token_id Token id.
|
||||
* @return bool
|
||||
*
|
||||
* @throws RuntimeException If something goes wrong while deleting the token.
|
||||
*/
|
||||
public function delete_token_by_id( string $token_id ): bool {
|
||||
$bearer = $this->bearer->bearer();
|
||||
|
||||
$url = trailingslashit( $this->host ) . 'v2/vault/payment-tokens/' . $token_id;
|
||||
|
@ -226,7 +234,7 @@ class PaymentTokenEndpoint {
|
|||
$error = new RuntimeException(
|
||||
__( 'Could not delete payment token.', 'woocommerce-paypal-payments' )
|
||||
);
|
||||
$this->logger->warning($error->getMessage());
|
||||
$this->logger->warning( $error->getMessage() );
|
||||
|
||||
throw $error;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue