ccConfig = $ccConfig; } /** * Get Payment configuration status * * @return bool */ public function isActive() { return (bool) $this->getValue(self::KEY_ACTIVE); } /** * @return bool */ public function isDisplayShoppingCart() { return (bool) $this->getValue(self::KEY_DISPLAY_ON_SHOPPING_CART); } /** * Is shipping address can be editable on PayPal side * * @return bool */ public function isAllowToEditShippingAddress() { return (bool) $this->getValue(self::KEY_ALLOW_TO_EDIT_SHIPPING_ADDRESS); } /** * Get merchant name to display in PayPal popup * * @return string */ public function getMerchantName() { return $this->getValue(self::KEY_MERCHANT_NAME_OVERRIDE); } /** * Is billing address can be required * * @return string */ public function isRequiredBillingAddress() { return $this->getValue(self::KEY_REQUIRE_BILLING_ADDRESS); } /** * Get title of payment * * @return string */ public function getTitle() { return $this->getValue(self::KEY_TITLE); } /** * Is need to skip order review * @return bool */ public function isSkipOrderReview() { return (bool) $this->getValue('skip_order_review'); } /** * Get PayPal icon * @return array */ public function getPayPalIcon() { if (empty($this->icon)) { $asset = $this->ccConfig->createAsset('Magento_Braintree::images/paypal.png'); list($width, $height) = getimagesize($asset->getSourceFile()); $this->icon = [ 'url' => $asset->getUrl(), 'width' => $width, 'height' => $height ]; } return $this->icon; } }