Skip to content

Commit 4a872f1

Browse files
authored
Merge pull request #36 from zipMoney/feature/remove_product_selector-IN-912
Remove Product Selector from admin
2 parents d4b6d09 + c2f54d8 commit 4a872f1

File tree

6 files changed

+5
-44
lines changed

6 files changed

+5
-44
lines changed

Model/Config.php

+4-12
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class Config implements ConfigInterface
146146
*
147147
* @const
148148
*/
149-
const PAYMENT_METHOD_LOGO_ZIP = "https://static.zipmoney.com.au/logo/25px/";
149+
const PAYMENT_METHOD_LOGO_ZIP = "https://static.zipmoney.com.au/logo/25px/zip.png";
150150

151151
/**
152152
* Error Codes Map
@@ -295,18 +295,10 @@ public function getEnvironment()
295295
*/
296296
public function getMethodLogo()
297297
{
298-
return self::PAYMENT_METHOD_LOGO_ZIP.strtolower($this->getProduct()).".png";
298+
return self::PAYMENT_METHOD_LOGO_ZIP;
299299
}
300300

301-
/**
302-
* Returns Product
303-
*
304-
* @return string
305-
*/
306-
public function getProduct()
307-
{
308-
return $this->getConfigData(self::PAYMENT_ZIPMONEY_PRODUCT);
309-
}
301+
310302

311303
/**
312304
* Check if in-context checkout is active
@@ -477,7 +469,7 @@ public function setStoreId($storeId)
477469
*/
478470
public function getPaymentAcceptanceMarkSrc()
479471
{
480-
return self::PAYMENT_METHOD_LOGO_ZIP.$this->getProduct().".png";
472+
return self::PAYMENT_METHOD_LOGO_ZIP;
481473
}
482474

483475
/**

Model/Config/Source/Product.php

-25
This file was deleted.

Model/Ui/ConfigProvider.php

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public function getConfig()
8989
"checkoutUri" => $this->_config->getCheckoutUrl(),
9090
"redirectUri" => $this->_config->getRedirectUrl(),
9191
"environment" => $this->_config->getEnvironment(),
92-
"product" => $this->_config->getProduct(),
9392
"title" => $this->_config->getTitle(),
9493
"inContextCheckoutEnabled" => (bool)$this->_config->isInContextCheckout()
9594
];

etc/adminhtml/system.xml

-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
<label>Merchant Public Key</label>
3535
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
3636
</field>
37-
<field id="product" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0">
38-
<label>Product Type</label>
39-
<source_model>ZipMoney\ZipMoneyPayment\Model\Config\Source\Product</source_model>
40-
</field>
4137
<field id="payment_action" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0">
4238
<label>Payment Action</label>
4339
<source_model>ZipMoney\ZipMoneyPayment\Model\Config\Source\PaymentAction</source_model>

view/frontend/web/js/view/payment/method-renderer/zipmoney-zipmoneypayment.js

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ define(
7676
},
7777
getContinueText:function(){
7878
return "Continue";
79-
//window.checkoutConfig.payment.zipmoneypayment.product == "zipPay" ? "Continue to zipPay" : "Continue to zipMoney";
8079
},
8180
getCode: function() {
8281
return window.checkoutConfig.payment.zipmoneypayment.code;

view/frontend/web/template/payment/zipmoney.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
77
<label data-bind="attr: {'for': getCode()}" class="label">
88
<!-- zipMoney Logo -->
9-
<img style="width:90px" data-bind="attr: {src: getPaymentAcceptanceMarkSrc(), alt: $t('zipMoney Acceptance Mark')}"
9+
<img style="height:26px" data-bind="attr: {src: getPaymentAcceptanceMarkSrc(), alt: $t('zipMoney Acceptance Mark')}"
1010
class="payment-icon"/>
1111
<!-- zipMoney Logo -->
1212
<span data-bind="text: getTitle()"></span>

0 commit comments

Comments
 (0)