Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #23 from heidelpay/develop
Browse files Browse the repository at this point in the history
PayPal Registration & Admin-Orders
  • Loading branch information
Sascha authored Aug 6, 2020
2 parents a101317 + 2f400fc commit 8c28ba5
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "heidelpay/shopware-6",
"description": "Heidelpay payment integration for Shopware 6",
"version": "v0.0.1",
"version": "0.0.1.1",
"type": "shopware-platform-plugin",
"license": "MIT",
"minimum-stability": "dev",
Expand All @@ -18,7 +18,7 @@
},
"require": {
"php": "^7.2",
"heidelpay/heidelpay-php": "~1.2.0",
"heidelpay/heidelpay-php": "~1.2.8.0",
"shopware/core": "*",
"shopware/administration": "*",
"shopware/storefront": "*"
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ Component.override('sw-order-create-details-footer', {
computed: {
paymentMethodCriteria() {
/** @var {Criteria} paymentCriteria */
const paymentCriteria = this.salesChannelCriteria;
const criteria = new Criteria();

paymentCriteria.addFilter(
if (this.salesChannelId) {
criteria.addFilter(Criteria.equals('salesChannels.id', this.salesChannelId));
}

criteria.addFilter(
Criteria.not('AND', [
Criteria.contains('handlerIdentifier', heidelPaymentHandler)
])
);

return paymentCriteria;
return criteria;
}
}
});

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/Resources/public/administration/js/heidel-payment6.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% block heidelpay_frame_paypal_account %}
{# PayPal with stored account #}
{% if page.extensions.heidelpayPayPal.displayPayPalAccountSelection and page.extensions.heidelpayPayPal.payPalAccounts|length > 0 %}
{% block heidelpay_checkout_confirm_frame_card_body_title %}
<div class="card-title">
Expand All @@ -9,7 +10,7 @@
<div class="heidelpay-paypal-account-wrapper"
data-heidelpay-paypal="true"
data-heidelpay-paypal-options='{
"hasSavedAccounts": {% if page.extensions.heidelpayPayPal.payPalAccounts|length > 0 %}true{% else %}false{% endif %}
"hasSavedAccounts": true
}'>
<div class="heidelpay-saved-accounts-wrapper">
<div class="heidelpay-saved-accounts--message">
Expand Down Expand Up @@ -42,5 +43,13 @@
{% endblock %}
</div>
</div>
{% else %}
{# PayPal without stored accounts #}
<div class="heidelpay-paypal-account-wrapper"
data-heidelpay-paypal="true"
data-heidelpay-paypal-options='{
"hasSavedAccounts": false
}'>
</div>
{% endif %}
{% endblock %}

0 comments on commit 8c28ba5

Please sign in to comment.