33 * Copyright © Magento, Inc. All rights reserved.
44 * See COPYING.txt for license details.
55 */
6+ declare (strict_types=1 );
7+
68namespace Magento \Braintree \Block \Paypal ;
79
810use Magento \Braintree \Gateway \Config \PayPal \Config ;
@@ -49,8 +51,6 @@ class Button extends Template implements ShortcutInterface
4951 private $ payment ;
5052
5153 /**
52- * Constructor
53- *
5454 * @param Context $context
5555 * @param ResolverInterface $localeResolver
5656 * @param Session $checkoutSession
@@ -98,6 +98,8 @@ public function getAlias()
9898 }
9999
100100 /**
101+ * Returns container id.
102+ *
101103 * @return string
102104 */
103105 public function getContainerId ()
@@ -106,6 +108,8 @@ public function getContainerId()
106108 }
107109
108110 /**
111+ * Returns locale.
112+ *
109113 * @return string
110114 */
111115 public function getLocale ()
@@ -114,6 +118,8 @@ public function getLocale()
114118 }
115119
116120 /**
121+ * Returns currency.
122+ *
117123 * @return string
118124 */
119125 public function getCurrency ()
@@ -122,6 +128,8 @@ public function getCurrency()
122128 }
123129
124130 /**
131+ * Returns amount.
132+ *
125133 * @return float
126134 */
127135 public function getAmount ()
@@ -130,6 +138,8 @@ public function getAmount()
130138 }
131139
132140 /**
141+ * Returns if is active.
142+ *
133143 * @return bool
134144 */
135145 public function isActive ()
@@ -139,6 +149,8 @@ public function isActive()
139149 }
140150
141151 /**
152+ * Returns merchant name.
153+ *
142154 * @return string
143155 */
144156 public function getMerchantName ()
@@ -147,6 +159,8 @@ public function getMerchantName()
147159 }
148160
149161 /**
162+ * Returns client token.
163+ *
150164 * @return string|null
151165 */
152166 public function getClientToken ()
@@ -155,10 +169,22 @@ public function getClientToken()
155169 }
156170
157171 /**
172+ * Returns action success.
173+ *
158174 * @return string
159175 */
160176 public function getActionSuccess ()
161177 {
162178 return $ this ->getUrl (ConfigProvider::CODE . '/paypal/review ' , ['_secure ' => true ]);
163179 }
180+
181+ /**
182+ * Gets environment value.
183+ *
184+ * @return string
185+ */
186+ public function getEnvironment (): string
187+ {
188+ return $ this ->configProvider ->getConfig ()['payment ' ][ConfigProvider::CODE ]['environment ' ];
189+ }
164190}
0 commit comments