Skip to content

Commit

Permalink
Merge pull request #39 in DEV-MO/shopware5-module from release/5.3.1 …
Browse files Browse the repository at this point in the history
…to master

* commit '2d417126180a44d85b5a8779699e575e3498948c':
  [SHPWR-387] update readme-file and version-number
  [ETS-72] register subscriber on update
  [ETS-67] Fix incorrect tax-rate in credit/debit items
  [ETS-72] Catch exception when 0%-Finance profile loads
  • Loading branch information
eiriarte-mendez committed Nov 12, 2018
2 parents eb78233 + 2d41712 commit addf294
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
9 changes: 9 additions & 0 deletions Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ public function install()
*/
public function update($version)
{
$this->subscribeEvent(
'Enlight_Controller_Front_StartDispatch',
'onRegisterSubscriber'
);
$this->subscribeEvent(
'Shopware_Console_Add_Command',
'onRegisterSubscriber'
);

Logger::singleton()->info('UPDATE Plugin Bootstrap ' . $version);
$queue = [
new \RpayRatePay\Bootstrapping\FormsSetup($this),
Expand Down
13 changes: 10 additions & 3 deletions Component/Service/RatepayConfigWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,24 @@ public function truncateConfigTables()
*/
public function writeRatepayConfig($profileId, $securityCode, $shopId, $country, $backend = false)
{
//TODO: put factory in constructor so we can test this method
$factory = new \Shopware_Plugins_Frontend_RpayRatePay_Component_Mapper_ModelFactory(null, $backend);
$data = [
'profileId' => $profileId,
'securityCode' => $securityCode
];

$response = $factory->callProfileRequest($data);
try {
$response = $factory->callProfileRequest($data);
} catch (\Exception $e) {
Logger::singleton()->error(
'RatePAY: Profile_Request failed for profileId ' . $profileId
);
return false;
}

if (!is_array($response) || $response === false) {
Logger::singleton()->info('RatePAY: Profile_Request failed for profileId ' . $profileId);
Logger::singleton()
->info('RatePAY: Profile_Request for profileId ' . $profileId . ' was empty ');
return false;
}

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
|------|----------
|Author | Annegret Seufert
|Shop Version | `5.1.x` - `5.5.x`
|Version | `5.3.0`
|Version | `5.3.1`
|Link | http://www.ratepay.com
|Mail | integration@ratepay.com
|Full Documentation | https://ratepay.gitbook.io/shopware/
Expand All @@ -24,6 +24,10 @@

## Changelog

### Version 5.3.1 - Released 2018-11-12
* Fix unregistered templates/controllers after update
* Fix incorrect tax-id for debit/credit items

### Version 5.3.0 - Released 2018-11-07
* Improve client side dob validation
* Improve bidirectionality process
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ Ext.define('Shopware.apps.Order.view.detail.ratepaydelivery', {
handler: function () {
var randomnumber = Math.floor(Math.random() * 10001);
var creditname = 'Credit' + id + '-' + randomnumber;
var firstArticle = me.record.getPositions().data.items[0];
Ext.Ajax.request({
url: '{url controller=Order action=savePosition}',
method: 'POST',
Expand All @@ -174,7 +175,7 @@ Ext.define('Shopware.apps.Order.view.detail.ratepaydelivery', {
statusDescription: "",
statusId: 0,
taxDescription: "",
taxId: 1,
taxId: firstArticle.raw.taxId,
taxRate: 0,
total: 0,
changed: me.record.get('changed')
Expand Down Expand Up @@ -240,6 +241,7 @@ Ext.define('Shopware.apps.Order.view.detail.ratepaydelivery', {
handler: function () {
var randomnumber = Math.floor(Math.random() * 10001);
var debitname = 'Debit' + id + '+' + randomnumber;
var firstArticle = me.record.getPositions().data.items[0];
Ext.Ajax.request({
url: '{url controller=Order action=savePosition}',
method: 'POST',
Expand All @@ -257,7 +259,7 @@ Ext.define('Shopware.apps.Order.view.detail.ratepaydelivery', {
statusDescription: "",
statusId: 0,
taxDescription: "",
taxId: 1,
taxId: firstArticle.raw.taxId,
taxRate: 0,
total: 0,
changed: me.record.get('changed')
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"author": "RatePAY GmbH",
"supplier": "RatePAY GmbH",
"description": "<h2>RatePAY Payment plugin for Shopware Community Edition Version 5</h2><ul><li style='list-style: inherit;'>RatePAY Payment Module</li><li style='list-style: inherit;'>Payment means: Invoice, Direct Debit (ELV), Rate</li><li style='list-style: inherit;'>Cancellations, Returns, etc. can be created from an additional tab in the order detail view</li><li style='list-style: inherit;'>Integrated support for multishops</li><li style='list-style: inherit;'>Improved payment form with visual feedback for your customers</li><li style='list-style: inherit;'>Supported Languages: German, English</li><li style='list-style: inherit;'>Backend Log with custom View accessible from your shop backend</li></ul>",
"currentVersion": "5.3.0",
"currentVersion": "5.3.1",
"payment_confirm": true,
"compatibility": {
"minimumVersion": "5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sonar.projectKey=devmo-shopware5-module
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=DevMO Shopware5 Module
sonar.projectVersion=5.2.5
sonar.projectVersion=5.3.1

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
Expand Down

0 comments on commit addf294

Please sign in to comment.