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

Commit

Permalink
Merge pull request #10 from heidelpay/develop
Browse files Browse the repository at this point in the history
Release Version 1.1.1
  • Loading branch information
xBlack-Shadow authored Jan 2, 2019
2 parents bb8151c + 2ddb183 commit c22b0a9
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,19 @@ Diese Erweiterung integriert die heidelpay Zahlarten in Ihren Plentymarkets Shop
This extension provides an integration of the heidelpay payment methods for your plentymarkets shop.\
* [User Guide](meta/documents/user_guide_en.md)
* [Changelog](meta/documents/changelog_en.md)
* [Support Contacts](meta/documents/support_contact_en.md)
* [Support Contacts](meta/documents/support_contact_en.md)

## Support
For any issues or questions please get in touch with our support.

#### Web page
https://dev.heidelpay.com/

#### Email
[email protected]

#### Phone
+49 (0)6221/6471-100

#### Twitter
@devHeidelpay
15 changes: 14 additions & 1 deletion meta/documents/changelog_de.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# heidelpay Payment Gateway Changelog

## [1.1.1][1.1.1]

### Change
- Logos ausgetauscht.
- Diverse Codingstyle-Fehler behoben.
- .gitignore aktualisiert
- Readme um Support Informationen ergänzt

### Fixed
- Support Telefonnummer korrigiert.
- MwSt wird nun bei Auslandsgeschäften nicht mit einbezogen

## [1.1.0][1.1.0]

### Removed
Expand All @@ -20,4 +32,5 @@
- Erste Implementation.
- Zahlarten Kreditkarte, Debitkarte, Sofort und Lastschrift hinzugefügt.

[1.1.0]: https://github.com/heidelpay/plentymarkets-gateway/tree/1.1.0
[1.1.0]: https://github.com/heidelpay/plentymarkets-gateway/tree/1.1.0
[1.1.1]: https://github.com/heidelpay/plentymarkets-gateway/compare/1.1.0..1.1.1
15 changes: 14 additions & 1 deletion meta/documents/changelog_en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# heidelpay Payment Gateway Changelog

## [1.1.1][1.1.1]

### Change
- Replace images.
- Resolve codingstyle violations.
- Update .gitignore
- Add support information to readme

### Fixed
- Fix support phone number.
- Fix incorrect VAT for internaational customer

## [1.1.0][1.1.0]

### Removed
Expand All @@ -20,4 +32,5 @@
- Initial implementation.
- Added payment methods credit card, debit card, Sofort and direct debit.

[1.1.0]: https://github.com/heidelpay/plentymarkets-gateway/tree/1.1.0
[1.1.0]: https://github.com/heidelpay/plentymarkets-gateway/tree/1.1.0
[1.1.1]: https://github.com/heidelpay/plentymarkets-gateway/compare/1.1.0..1.1.1
2 changes: 1 addition & 1 deletion meta/documents/support_contact_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ https://dev.heidelpay.de/plentymarkets/
[email protected]

## Phone
+49 (0)6221/6471-200
+49 (0)6221/6471-100

## Twitter
@devHeidelpay
Binary file modified meta/images/icon_author_md.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified meta/images/icon_author_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified meta/images/icon_author_xs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified meta/images/icon_plugin_md.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified meta/images/icon_plugin_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified meta/images/icon_plugin_xs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"categories": ["3519"],
"keywords": ["heidelpay", "plentymarkets", "plugin", "payment", "payment method", "credit card", "debit card", "sofort", "direct debit"],
"version": "1.1.0",
"version": "1.1.1",
"license": "Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.",
"price": 0.00,
"author": "heidelpay GmbH",
Expand Down
2 changes: 1 addition & 1 deletion src/Constants/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ class Plugin
{
const KEY = 'heidelpay';
const NAME = 'Heidelpay';
const VERSION = '1.1.0';
const VERSION = '1.1.1';
}
31 changes: 24 additions & 7 deletions src/Services/PaymentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ public function executePayment(string $paymentMethod, ExecutePayment $event): ar
* @param array $parameters
*
* @return array
* @throws \RuntimeException
*/
public function sendPaymentRequest(
Basket $basket,
Expand Down Expand Up @@ -270,7 +271,12 @@ public function getPaymentMethodContent(

if ($methodInstance->hasToBeInitialized()) {
try {
$result = $this->sendPaymentRequest($basket, $paymentMethod, $methodInstance->getTransactionType(), $mopId);
$result = $this->sendPaymentRequest(
$basket,
$paymentMethod,
$methodInstance->getTransactionType(),
$mopId
);
$value = $this->handleSyncResponse($type, $result);
} catch (\RuntimeException $e) {
$this->notification->error($clientErrorMessage, __METHOD__, [$type, $e->getMessage()], true);
Expand All @@ -292,9 +298,12 @@ public function getPaymentMethodContent(
* @param string $paymentMethod
* @param int $mopId
* @param string $transactionId
* @throws \RuntimeException
*/
private function prepareRequest(Basket $basket, string $paymentMethod, int $mopId, string $transactionId)
{
$basketArray = $basket->toArray();

/** @var BasketService $basketService */
$basketService = pluginApp(BasketService::class);

Expand All @@ -307,7 +316,7 @@ private function prepareRequest(Basket $basket, string $paymentMethod, int $mopI

// set customer personal information & address data
$addresses = $this->getCustomerAddressData($basket);
$this->heidelpayRequest['IDENTIFICATION_SHOPPERID'] = $basket->customerId;
$this->heidelpayRequest['IDENTIFICATION_SHOPPERID'] = $basketArray['customerId'];
$this->heidelpayRequest['NAME_GIVEN'] = $addresses['billing']->firstName;
$this->heidelpayRequest['NAME_FAMILY'] = $addresses['billing']->lastName;
$this->heidelpayRequest['CONTACT_EMAIL'] = $addresses['billing']->email;
Expand All @@ -325,9 +334,16 @@ private function prepareRequest(Basket $basket, string $paymentMethod, int $mopI

$this->heidelpayRequest['IDENTIFICATION_TRANSACTIONID'] = $transactionId;

// set amount to net if showNetPrice === true
if ($this->sessionStorageFactory->getCustomer()->showNetPrice) {
$basketArray['itemSum'] = $basketArray['itemSumNet'];
$basketArray['basketAmount'] = $basketArray['basketAmountNet'];
$basketArray['shippingAmount'] = $basketArray['shippingAmountNet'];
}

// set basket information (amount, currency, orderId, ...)
$this->heidelpayRequest['PRESENTATION_AMOUNT'] = $basket->basketAmount;
$this->heidelpayRequest['PRESENTATION_CURRENCY'] = $basket->currency;
$this->heidelpayRequest['PRESENTATION_AMOUNT'] = $basketArray['basketAmount'];
$this->heidelpayRequest['PRESENTATION_CURRENCY'] = $basketArray['currency'];

$this->heidelpayRequest['FRONTEND_ENABLED'] = 'TRUE';
$this->heidelpayRequest['FRONTEND_LANGUAGE'] = $this->sessionStorageFactory->getLocaleSettings()->language;
Expand Down Expand Up @@ -355,9 +371,9 @@ private function prepareRequest(Basket $basket, string $paymentMethod, int $mopI
$this->heidelpayRequest['CRITERION_MOP'] = $mopId;
$this->heidelpayRequest['CRITERION_SHOP_TYPE'] = 'plentymarkets 7';
$this->heidelpayRequest['CRITERION_SHOPMODULE_VERSION'] = Plugin::VERSION;
$this->heidelpayRequest['CRITERION_BASKET_ID'] = $basket->id;
$this->heidelpayRequest['CRITERION_ORDER_ID'] = $basket->orderId;
$this->heidelpayRequest['CRITERION_ORDER_TIMESTAMP'] = $basket->orderTimestamp;
$this->heidelpayRequest['CRITERION_BASKET_ID'] = $basketArray['id'];
$this->heidelpayRequest['CRITERION_ORDER_ID'] = $basketArray['orderId'];
$this->heidelpayRequest['CRITERION_ORDER_TIMESTAMP'] = $basketArray['orderTimestamp'];
$this->heidelpayRequest['CRITERION_PUSH_URL'] =
$this->paymentHelper->getDomain() . '/' . Routes::PUSH_NOTIFICATION_URL;

Expand Down Expand Up @@ -528,6 +544,7 @@ public function createOrGetPlentyPayment(Transaction $txnData): Payment
*
* @param Payment $payment
* @param int $orderId
* @throws \RuntimeException
*/
public function assignPlentyPayment(Payment $payment, int $orderId)
{
Expand Down

0 comments on commit c22b0a9

Please sign in to comment.