Skip to content

Commit

Permalink
Release 1.0.47
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Schurter committed Aug 16, 2019
1 parent 09cf645 commit 7ce246f
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 19 deletions.
10 changes: 10 additions & 0 deletions Components/ArrayBuilder/TransactionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public function build()
'failureReason' => $this->translate($this->transactionInfo->getFailureReason()),
'labels' => LabelGroupArrayBuilder::buildGrouped($this->container, $this->getLabelBuilders()),
'transactionUrl' => $this->getTransactionUrl(),
'customerUrl' => $this->getCustomerUrl(),
'lineItems' => $this->getLineItems(),
'lineItemTotalAmount' => $this->lineItemVersion != null ? $this->lineItemVersion->getAmount() : $this->transactionInfo->getAuthorizationAmount(),
'refundBaseLineItems' => RefundArrayBuilder::buildBaseLineItems($this->container, $this->invoice, $this->refunds),
Expand Down Expand Up @@ -205,6 +206,15 @@ private function getTransactionUrl()
{
return $this->container->getParameter('wallee_payment.base_gateway_url') . '/s/' . $this->transactionInfo->getSpaceId() . '/payment/transaction/view/' . $this->transactionInfo->getTransactionId();
}

/**
*
* @return string
*/
private function getCustomerUrl()
{
return $this->container->getParameter('wallee_payment.base_gateway_url') . '/s/' . $this->transactionInfo->getSpaceId() . '/payment/customer/transaction/view/' . $this->transactionInfo->getTransactionId();
}

/**
*
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ This repository contains the Shopware plugin that enables to process payments wi

## Documentation

* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-composer/1.0.46/docs/en/documentation.html)
* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-composer/1.0.47/docs/en/documentation.html)

## License

Please see the [license file](https://github.com/wallee-payment/shopware-composer/blob/1.0.46/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/shopware-composer/blob/1.0.47/LICENSE) for more information.
4 changes: 4 additions & 0 deletions Resources/snippets/backend/wallee_payment/main.ini
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ synchronize/message/config_incomplete = "The configuration is incomplete."
synchronize/messages/no_permission = "You do not have the permission to synchronize"
synchronize/messages/success = "Synchronization successful"
transaction/button/complete = "Complete"
transaction/button/customer_link = "View in wallee"
transaction/button/delivery_indication_accept = "Accept"
transaction/button/delivery_indication_deny = "Deny"
transaction/button/download_invoice = "Download Invoice"
Expand All @@ -72,6 +73,7 @@ transaction/button/update = "Update"
transaction/button/void = "Void"
transaction/field/authorization_amount = "Authorization Amount"
transaction/field/currency = "Currency"
transaction/field/customer = "Customer"
transaction/field/failure_reason = "Failure Reason"
transaction/field/invoice = "Invoice"
transaction/field/packing_slip = "Packing Slip"
Expand Down Expand Up @@ -162,6 +164,7 @@ synchronize/message/config_incomplete = "Die Konfiguration ist unvollständig."
synchronize/messages/no_permission = "Die Berechtigungen zum Synchronisieren fehlen."
synchronize/messages/success = "Synchronisation erfolgreich"
transaction/button/complete = "Verbuchen"
transaction/button/customer_link = "In wallee anzeigen"
transaction/button/delivery_indication_accept = "Akzeptieren"
transaction/button/delivery_indication_deny = "Ablehnen"
transaction/button/download_invoice = "Rechnung herunterladen"
Expand All @@ -171,6 +174,7 @@ transaction/button/update = "Aktualisieren"
transaction/button/void = "Annulieren"
transaction/field/authorization_amount = "Autorisationsbetrag"
transaction/field/currency = "Währung"
transaction/field/customer = "Kunde"
transaction/field/failure_reason = "Fehlerursache"
transaction/field/invoice = "Rechnung"
transaction/field/packing_slip = "Lieferschein"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Ext.define('Shopware.apps.WalleePaymentTransaction.model.Transaction', {
{ name: 'failureReason', type: 'string' },
{ name: 'paymentMethod', type: 'object' },
{ name: 'transactionUrl', type: 'string' },
{ name: 'customerUrl', type: 'string' },
{ name: 'currencyDecimals', type: 'int' },
{ name: 'lineItemTotalAmount', type: 'float' },
{ name: 'canDownloadInvoice', type: 'boolean' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Ext.define('Shopware.apps.WalleePaymentTransaction.view.transaction.Details', {
currency: '{s name=transaction/field/currency}Currency{/s}',
amount: '{s name=transaction/field/authorization_amount}Authorization Amount{/s}',
transaction: '{s name=transaction/field/transaction}Transaction{/s}',
customer: '{s name=transaction/field/customer}Customer{/s}',
invoice: '{s name=transaction/field/invoice}Invoice{/s}',
packingSlip: '{s name=transaction/field/packing_slip}Packing Slip{/s}'
},
Expand All @@ -53,6 +54,7 @@ Ext.define('Shopware.apps.WalleePaymentTransaction.view.transaction.Details', {
deny: '{s name=transaction/button/delivery_indication_deny}Deny{/s}',
accept: '{s name=transaction/button/delivery_indication_accept}Accept{/s}',
transaction: '{s name=transaction/button/transaction_link}View in wallee{/s}',
customer: '{s name=transaction/button/customer_link}View in wallee{/s}',
update: '{s name=transaction/button/update}Update{/s}',
}
},
Expand Down Expand Up @@ -141,6 +143,14 @@ Ext.define('Shopware.apps.WalleePaymentTransaction.view.transaction.Details', {
html: '<a href="' + me.record.get('transactionUrl') + '" target="_blank">' + me.snippets.button.transaction + '</a>'
}
});
fields.push({
xtype: 'fieldcontainer',
fieldLabel: me.snippets.field.customer,
items: {
xtype: 'container',
html: '<a href="' + me.record.get('customerUrl') + '" target="_blank">' + me.snippets.button.customer + '</a>'
}
});

var buttons = [];
if (me.record.get('canDownloadInvoice')) {
Expand Down
15 changes: 2 additions & 13 deletions WalleePayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@
use Shopware\Models\Widget\Widget;
use Shopware\Components\Plugin\Context\ActivateContext;

require_once dirname(__FILE__) . '/vendor/autoload.php';

class WalleePayment extends Plugin
{
public static function getSubscribedEvents()
{
return [
'Enlight_Controller_Front_StartDispatch' => 'onStartDispatch'
];
}

public function install(InstallContext $context)
{
Expand Down Expand Up @@ -65,13 +61,6 @@ public function build(ContainerBuilder $container)
parent::build($container);
}

public function onStartDispatch()
{
if (file_exists($this->getPath() . '/vendor/autoload.php')) {
require_once $this->getPath() . '/vendor/autoload.php';
}
}

private function getModelClasses()
{
return [
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
}
],
"type": "shopware-plugin",
"version" : "1.0.46",
"version" : "1.0.47",
"require": {
"wallee/sdk": "1.1.15"
"wallee/sdk": "1.1.16"
},
"extra": {
"installer-name": "WalleePayment"
Expand Down
2 changes: 1 addition & 1 deletion docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/wallee-payment/shopware-composer/releases/tag/1.0.46/">
<a href="https://github.com/wallee-payment/shopware-composer/releases/tag/1.0.47/">
Source
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<label lang="de">wallee Payment</label>
<label lang="en">wallee Payment</label>

<version>1.0.46</version>
<version>1.0.47</version>
<copyright>(c) by customweb ltd.</copyright>
<license>ASL 2.0</license>
<link>https://www.wallee.com</link>
Expand Down

0 comments on commit 7ce246f

Please sign in to comment.