mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
downgrade plugin to php 7.0
This commit is contained in:
parent
5e011b4f95
commit
c5899d915c
61 changed files with 419 additions and 368 deletions
|
@ -26,7 +26,7 @@ use Inpsyde\PayPalCommerce\Onboarding\Environment;
|
|||
use Inpsyde\PayPalCommerce\Onboarding\State;
|
||||
|
||||
return array(
|
||||
'button.client_id' => static function ( ContainerInterface $container ): string {
|
||||
'button.client_id' => static function ( $container ): string {
|
||||
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
$client_id = $settings->has( 'client_id' ) ? $settings->get( 'client_id' ) : '';
|
||||
|
@ -47,7 +47,7 @@ return array(
|
|||
return $env->current_environment_is( Environment::SANDBOX ) ?
|
||||
'AQB97CzMsd58-It1vxbcDAGvMuXNCXRD9le_XUaMlHB_U7XsU9IiItBwGQOtZv9sEeD6xs2vlIrL4NiD' : '';
|
||||
},
|
||||
'button.smart-button' => static function ( ContainerInterface $container ): SmartButtonInterface {
|
||||
'button.smart-button' => static function ( $container ): SmartButtonInterface {
|
||||
|
||||
$state = $container->get( 'onboarding.state' );
|
||||
/**
|
||||
|
@ -86,16 +86,16 @@ return array(
|
|||
$messages_apply
|
||||
);
|
||||
},
|
||||
'button.url' => static function ( ContainerInterface $container ): string {
|
||||
'button.url' => static function ( $container ): string {
|
||||
return plugins_url(
|
||||
'/modules/ppcp-button/',
|
||||
dirname( __FILE__, 3 ) . '/woocommerce-paypal-commerce-gateway.php'
|
||||
);
|
||||
},
|
||||
'button.request-data' => static function ( ContainerInterface $container ): RequestData {
|
||||
'button.request-data' => static function ( $container ): RequestData {
|
||||
return new RequestData();
|
||||
},
|
||||
'button.endpoint.change-cart' => static function ( ContainerInterface $container ): ChangeCartEndpoint {
|
||||
'button.endpoint.change-cart' => static function ( $container ): ChangeCartEndpoint {
|
||||
if ( ! \WC()->cart ) {
|
||||
throw new RuntimeException( 'cant initialize endpoint at this moment' );
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ return array(
|
|||
$data_store = \WC_Data_Store::load( 'product' );
|
||||
return new ChangeCartEndpoint( $cart, $shipping, $request_data, $repository, $data_store );
|
||||
},
|
||||
'button.endpoint.create-order' => static function ( ContainerInterface $container ): CreateOrderEndpoint {
|
||||
'button.endpoint.create-order' => static function ( $container ): CreateOrderEndpoint {
|
||||
$request_data = $container->get( 'button.request-data' );
|
||||
$repository = $container->get( 'api.repository.cart' );
|
||||
$order_endpoint = $container->get( 'api.endpoint.order' );
|
||||
|
@ -124,7 +124,7 @@ return array(
|
|||
$early_order_handler
|
||||
);
|
||||
},
|
||||
'button.helper.early-order-handler' => static function ( ContainerInterface $container ) : EarlyOrderHandler {
|
||||
'button.helper.early-order-handler' => static function ( $container ) : EarlyOrderHandler {
|
||||
|
||||
$state = $container->get( 'onboarding.state' );
|
||||
$order_processor = $container->get( 'wcgateway.order-processor' );
|
||||
|
@ -132,14 +132,14 @@ return array(
|
|||
$prefix = $container->get( 'api.prefix' );
|
||||
return new EarlyOrderHandler( $state, $order_processor, $session_handler, $prefix );
|
||||
},
|
||||
'button.endpoint.approve-order' => static function ( ContainerInterface $container ): ApproveOrderEndpoint {
|
||||
'button.endpoint.approve-order' => static function ( $container ): ApproveOrderEndpoint {
|
||||
$request_data = $container->get( 'button.request-data' );
|
||||
$order_endpoint = $container->get( 'api.endpoint.order' );
|
||||
$session_handler = $container->get( 'session.handler' );
|
||||
$three_d_secure = $container->get( 'button.helper.three-d-secure' );
|
||||
return new ApproveOrderEndpoint( $request_data, $order_endpoint, $session_handler, $three_d_secure );
|
||||
},
|
||||
'button.endpoint.data-client-id' => static function( ContainerInterface $container ) : DataClientIdEndpoint {
|
||||
'button.endpoint.data-client-id' => static function( $container ) : DataClientIdEndpoint {
|
||||
$request_data = $container->get( 'button.request-data' );
|
||||
$identity_token = $container->get( 'api.endpoint.identity-token' );
|
||||
return new DataClientIdEndpoint(
|
||||
|
@ -147,10 +147,10 @@ return array(
|
|||
$identity_token
|
||||
);
|
||||
},
|
||||
'button.helper.three-d-secure' => static function ( ContainerInterface $container ): ThreeDSecure {
|
||||
'button.helper.three-d-secure' => static function ( $container ): ThreeDSecure {
|
||||
return new ThreeDSecure();
|
||||
},
|
||||
'button.helper.messages-apply' => static function ( ContainerInterface $container ): MessagesApply {
|
||||
'button.helper.messages-apply' => static function ( $container ): MessagesApply {
|
||||
return new MessagesApply();
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue