Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #33 from heidelpay/develop
Browse files Browse the repository at this point in the history
PR for Release 17.8.3
  • Loading branch information
stevenobird authored Aug 3, 2017
2 parents 9bf0ea9 + 3fb3f9d commit 035ab78
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 100 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

This project does not follow a versioning standard. Versions are crafted after the dates; for example, the version 17.7.25 was released on July, 25th in 2017

## 17.8.3

### Fixed
- A bug which thrown an exception when a language different from de_DE and en_US was used in Magento
- Removed canSendNewInvoiceEmail checks when just creating Invoices

## 17.7.25

### Added
Expand Down
14 changes: 6 additions & 8 deletions PaymentMethods/HeidelpayAbstractPaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -731,16 +731,14 @@ public function processingTransactionProcessing($data, &$order)

// if the order can be invoiced and is no Pre-Authorization,
// create one and save it into a transaction.
if ($this->salesHelper->canSendNewInvoiceEmail($order->getStore()->getId())) {
if ($order->canInvoice() && !$this->_paymentHelper->isPreAuthorization($data)) {
$invoice = $order->prepareInvoice();
if ($order->canInvoice() && !$this->_paymentHelper->isPreAuthorization($data)) {
$invoice = $order->prepareInvoice();

$invoice->setRequestedCaptureCase(Invoice::CAPTURE_ONLINE);
$invoice->setTransactionId($data['IDENTIFICATION_UNIQUEID']);
$invoice->register()->pay();
$invoice->setRequestedCaptureCase(Invoice::CAPTURE_ONLINE);
$invoice->setTransactionId($data['IDENTIFICATION_UNIQUEID']);
$invoice->register()->pay();

$this->_paymentHelper->saveTransaction($invoice);
}
$this->_paymentHelper->saveTransaction($invoice);
}

$order->getPayment()->addTransaction(Transaction::TYPE_CAPTURE, null, true);
Expand Down
18 changes: 8 additions & 10 deletions PaymentMethods/HeidelpayInvoicePaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,14 @@ public function pendingTransactionProcessing($data, &$order, $message = null)
$order->setTotalPaid(0.00)->setBaseTotalPaid(0.00);

// if the order can be invoiced, create one and save it into a transaction.
if ($this->salesHelper->canSendNewInvoiceEmail($order->getStore()->getId())) {
if ($order->canInvoice()) {
$invoice = $order->prepareInvoice();
$invoice->setRequestedCaptureCase(\Magento\Sales\Model\Order\Invoice::CAPTURE_ONLINE)
->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
->setIsPaid(false)
->register();

$this->_paymentHelper->saveTransaction($invoice);
}
if ($order->canInvoice()) {
$invoice = $order->prepareInvoice();
$invoice->setRequestedCaptureCase(\Magento\Sales\Model\Order\Invoice::CAPTURE_ONLINE)
->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
->setIsPaid(false)
->register();

$this->_paymentHelper->saveTransaction($invoice);
}
}
}
18 changes: 8 additions & 10 deletions PaymentMethods/HeidelpayInvoiceSecuredPaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,14 @@ public function pendingTransactionProcessing($data, &$order, $message = null)
$order->setTotalPaid(0.00)->setBaseTotalPaid(0.00);

// if the order can be invoiced, create one and save it into a transaction.
if ($this->salesHelper->canSendNewInvoiceEmail($order->getStore()->getId())) {
if ($order->canInvoice()) {
$invoice = $order->prepareInvoice();
$invoice->setRequestedCaptureCase(\Magento\Sales\Model\Order\Invoice::CAPTURE_ONLINE)
->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
->setIsPaid(false)
->register();

$this->_paymentHelper->saveTransaction($invoice);
}
if ($order->canInvoice()) {
$invoice = $order->prepareInvoice();
$invoice->setRequestedCaptureCase(\Magento\Sales\Model\Order\Invoice::CAPTURE_ONLINE)
->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
->setIsPaid(false)
->register();

$this->_paymentHelper->saveTransaction($invoice);
}
}
}
18 changes: 8 additions & 10 deletions PaymentMethods/HeidelpayPrepaymentPaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,14 @@ public function pendingTransactionProcessing($data, &$order, $message = null)
$order->setTotalPaid(0.00);

// if the order can be invoiced, create one and save it into a transaction.
if ($this->salesHelper->canSendNewInvoiceEmail($order->getStore()->getId())) {
if ($order->canInvoice()) {
$invoice = $order->prepareInvoice();
$invoice->setRequestedCaptureCase(\Magento\Sales\Model\Order\Invoice::CAPTURE_ONLINE)
->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
->setIsPaid(false)
->register();

$this->_paymentHelper->saveTransaction($invoice);
}
if ($order->canInvoice()) {
$invoice = $order->prepareInvoice();
$invoice->setRequestedCaptureCase(\Magento\Sales\Model\Order\Invoice::CAPTURE_ONLINE)
->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
->setIsPaid(false)
->register();

$this->_paymentHelper->saveTransaction($invoice);
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ All versions greater than 16.10.17 are based on the heidelpay php-api. (https://

### Install the heidelpay Magento 2 composer package

```composer require "heidelpay/magento2:17.7.25"```
```composer require "heidelpay/magento2:17.8.3"```

### Enable the extension in Magento 2

Expand Down
123 changes: 63 additions & 60 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,65 @@
{
"name" : "heidelpay/magento2",
"description" : "This extension for Magento 2 provides a direct integration of the Heidelpay payment methods to your Magento 2 shop.",
"require" : {
"php" : ">=5.6.0",
"magento/module-config" : "<100.2.0",
"magento/module-store" : "<100.2.0",
"magento/module-checkout" : "<100.2.0",
"magento/module-sales" : "<100.2.0",
"magento/module-quote" : "<100.2.0",
"magento/module-customer" : "<100.2.0",
"magento/module-payment" : "<100.2.0",
"magento/module-backend" : "<100.2.0",
"magento/framework" : "<100.2.0",
"heidelpay/php-api" : "~17.7.14",
"heidelpay/php-customer-messages": "~17.2.3"
},
"require-dev" : {
"magento/marketplace-eqp" : "2.0",
"heidelpay/phpdocumentor" : "2.9.1",
"friendsofphp/php-cs-fixer" : "2.1.0"
},
"suggest" : {
"magento/module-checkout-agreements" : "<100.2.0"
},
"repositories" : [{
"type" : "composer",
"url" : "https://repo.magento.com/"
}
],
"type" : "magento2-module",
"license" : "Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.",
"autoload" : {
"files" : [
"registration.php"
],
"psr-4" : {
"Heidelpay\\Gateway\\" : ""
}
},
"support" : {
"email" : "[email protected]"
},
"homepage" : "https://dev.heidelpay.de",
"authors" : [{
"name" : "Jens Richter",
"email" : "[email protected]",
"homepage" : "https://dev.heidelpay.de/magento2"
}, {
"name" : "Stephano Vogel",
"email" : "[email protected]",
"homepage" : "https://dev.heidelpay.de/magento2"
}
],
"keywords" : [
"magento",
"magento2",
"payment",
"php",
"payment-gateway"
]
"name": "heidelpay/magento2",
"description": "This extension for Magento 2 provides a direct integration of the Heidelpay payment methods to your Magento 2 shop.",
"require": {
"php": ">=5.6.0",
"magento/module-config": "<100.2.0",
"magento/module-store": "<100.2.0",
"magento/module-checkout": "<100.2.0",
"magento/module-sales": "<100.2.0",
"magento/module-quote": "<100.2.0",
"magento/module-customer": "<100.2.0",
"magento/module-payment": "<100.2.0",
"magento/module-backend": "<100.2.0",
"magento/framework": "<100.2.0",
"heidelpay/php-api": "~17.7.14",
"heidelpay/php-customer-messages": "~17.8.3"
},
"require-dev": {
"magento/marketplace-eqp": "2.0",
"heidelpay/phpdocumentor": "2.9.1",
"friendsofphp/php-cs-fixer": "2.1.0"
},
"suggest": {
"magento/module-checkout-agreements": "<100.2.0"
},
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
}
],
"type": "magento2-module",
"license": "Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.",
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Heidelpay\\Gateway\\": ""
}
},
"support": {
"email": "[email protected]"
},
"homepage": "https://dev.heidelpay.de",
"authors": [
{
"name": "Jens Richter",
"email": "[email protected]",
"homepage": "https://dev.heidelpay.de/magento2"
},
{
"name": "Stephano Vogel",
"email": "[email protected]",
"homepage": "https://dev.heidelpay.de/magento2"
}
],
"keywords": [
"magento",
"magento2",
"payment",
"php",
"payment-gateway"
]
}
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Heidelpay_Gateway" schema_version="17.7.25" setup_version="17.7.25">
<module name="Heidelpay_Gateway" schema_version="17.8.3" setup_version="17.8.3">
<sequence>
<module name="Magento_Sales" />
<module name="Magento_Payment" />
Expand Down

0 comments on commit 035ab78

Please sign in to comment.