@@ -12,13 +12,13 @@ final class MoneiBizumBlocksSupport extends AbstractPaymentMethodType {
1212
1313 private $ gateway ;
1414 protected $ name = 'monei_bizum ' ;
15- protected $ handler ;
16- protected SubscriptionService $ subscriptions_service ;
15+ protected $ handler ;
16+ protected SubscriptionService $ subscriptions_service ;
1717
18- public function __construct ( WCMoneiPaymentGateway $ gateway , SubscriptionService $ subscriptionService ) {
19- $ this ->gateway = $ gateway ;
20- $ this ->subscriptions_service = $ subscriptionService ;
21- $ this ->handler = $ this ->subscriptions_service ->getHandler ();
18+ public function __construct ( WCMoneiPaymentGateway $ gateway , SubscriptionService $ subscriptionService ) {
19+ $ this ->gateway = $ gateway ;
20+ $ this ->subscriptions_service = $ subscriptionService ;
21+ $ this ->handler = $ this ->subscriptions_service ->getHandler ();
2222 }
2323
2424 public function initialize () {
@@ -65,24 +65,24 @@ public function is_active() {
6565 }
6666
6767 public function get_payment_method_data () {
68- $ total = isset ( WC ()->cart ) ? WC ()->cart ->get_total ( false ) : 0 ;
69- $ cart_has_subscription = $ this ->handler ? $ this ->handler ->cart_has_subscription (): false ;
70- $ data = array (
71-
72- 'title ' => $ this ->gateway ->title ,
73- 'description ' => $ this ->gateway ->description ,
74- 'logo ' => WC_Monei ()->plugin_url () . '/public/images/bizum-logo.svg ' ,
75- 'supports ' => $ this ->get_supported_features (),
76- 'currency ' => get_woocommerce_currency (),
77- 'total ' => $ total ,
78- 'language ' => locale_iso_639_1_code (),
68+ $ total = isset ( WC ()->cart ) ? WC ()->cart ->get_total ( false ) : 0 ;
69+ $ cart_has_subscription = $ this ->handler ? $ this ->handler ->cart_has_subscription () : false ;
70+ $ data = array (
71+
72+ 'title ' => $ this ->gateway ->title ,
73+ 'description ' => $ this ->gateway ->description ,
74+ 'logo ' => WC_Monei ()->plugin_url () . '/public/images/bizum-logo.svg ' ,
75+ 'supports ' => $ this ->get_supported_features (),
76+ 'currency ' => get_woocommerce_currency (),
77+ 'total ' => $ total ,
78+ 'language ' => locale_iso_639_1_code (),
7979
8080 // yes: test mode.
8181 // no: live,
82- 'test_mode ' => $ this ->gateway ->getTestmode () ?? false ,
83- 'accountId ' => $ this ->gateway ->getAccountId () ?? false ,
84- 'sessionId ' => ( wc ()->session ) ? wc ()->session ->get_customer_id () : '' ,
85- 'cart_has_subscription ' => $ cart_has_subscription ,
82+ 'test_mode ' => $ this ->gateway ->getTestmode () ?? false ,
83+ 'accountId ' => $ this ->gateway ->getAccountId () ?? false ,
84+ 'sessionId ' => ( wc ()->session ) ? wc ()->session ->get_customer_id () : '' ,
85+ 'cart_has_subscription ' => $ cart_has_subscription ,
8686 );
8787
8888 if ( 'yes ' === $ this ->get_setting ( 'hide_logo ' ) ?? 'no ' ) {
0 commit comments