From efc20c390d51eac93dd49d5061b3065963cd24dd Mon Sep 17 00:00:00 2001 From: Emili Castells Guasch Date: Mon, 8 Apr 2024 13:38:18 +0200 Subject: [PATCH] Rename method --- .../src/Endpoint/PaymentMethodTokensEndpoint.php | 2 +- .../src/Endpoint/CreatePaymentToken.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ppcp-api-client/src/Endpoint/PaymentMethodTokensEndpoint.php b/modules/ppcp-api-client/src/Endpoint/PaymentMethodTokensEndpoint.php index ab8d5473b..1b547a11e 100644 --- a/modules/ppcp-api-client/src/Endpoint/PaymentMethodTokensEndpoint.php +++ b/modules/ppcp-api-client/src/Endpoint/PaymentMethodTokensEndpoint.php @@ -115,7 +115,7 @@ class PaymentMethodTokensEndpoint { * @throws RuntimeException When something when wrong with the request. * @throws PayPalApiException When something when wrong setting up the token. */ - public function payment_tokens( PaymentSource $payment_source ): stdClass { + public function create_payment_token(PaymentSource $payment_source ): stdClass { $data = array( 'payment_source' => array( $payment_source->name() => $payment_source->properties(), diff --git a/modules/ppcp-save-payment-methods/src/Endpoint/CreatePaymentToken.php b/modules/ppcp-save-payment-methods/src/Endpoint/CreatePaymentToken.php index ca4839372..4fea1f188 100644 --- a/modules/ppcp-save-payment-methods/src/Endpoint/CreatePaymentToken.php +++ b/modules/ppcp-save-payment-methods/src/Endpoint/CreatePaymentToken.php @@ -94,7 +94,7 @@ class CreatePaymentToken implements EndpointInterface { ) ); - $result = $this->payment_method_tokens_endpoint->payment_tokens( $payment_source ); + $result = $this->payment_method_tokens_endpoint->create_payment_token( $payment_source ); if ( is_user_logged_in() && isset( $result->customer->id ) ) { $current_user_id = get_current_user_id();