mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Fix phpcs
This commit is contained in:
parent
06c000b42b
commit
fbe13cb7dd
5 changed files with 13 additions and 10 deletions
|
@ -293,7 +293,7 @@ return array(
|
||||||
return new AxoScriptAttributes(
|
return new AxoScriptAttributes(
|
||||||
$container->get( 'button.request-data' ),
|
$container->get( 'button.request-data' ),
|
||||||
$container->get( 'woocommerce.logger.woocommerce' ),
|
$container->get( 'woocommerce.logger.woocommerce' ),
|
||||||
$container->get('api.sdk-client-token')
|
$container->get( 'api.sdk-client-token' )
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,9 @@ use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
||||||
use WooCommerce\PayPalCommerce\Button\Endpoint\EndpointInterface;
|
use WooCommerce\PayPalCommerce\Button\Endpoint\EndpointInterface;
|
||||||
use WooCommerce\PayPalCommerce\Button\Endpoint\RequestData;
|
use WooCommerce\PayPalCommerce\Button\Endpoint\RequestData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles the request for the PayPal Axo script attributes.
|
||||||
|
*/
|
||||||
class AxoScriptAttributes implements EndpointInterface {
|
class AxoScriptAttributes implements EndpointInterface {
|
||||||
|
|
||||||
const ENDPOINT = 'ppc-axo-script-attributes';
|
const ENDPOINT = 'ppc-axo-script-attributes';
|
||||||
|
@ -35,9 +38,9 @@ class AxoScriptAttributes implements EndpointInterface {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$token = $this->sdk_client_token->sdk_client_token();
|
$token = $this->sdk_client_token->sdk_client_token();
|
||||||
} catch (PayPalApiException $exception) {
|
} catch ( PayPalApiException $exception ) {
|
||||||
$this->logger->error($exception->getMessage());
|
$this->logger->error( $exception->getMessage() );
|
||||||
wp_send_json_error($exception->getMessage());
|
wp_send_json_error( $exception->getMessage() );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue