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 #145 from heidelpay/develop
Browse files Browse the repository at this point in the history
release 1.2.5.1
  • Loading branch information
Simon Gabriel authored Nov 26, 2019
2 parents 4dd38c0 + 3c165fa commit 9eecc31
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.2.5.1][1.2.5.1]

### Fix
* A bug which led to an error when trying to cancel the initial transaction of a charged invoice.

## [1.2.5.0][1.2.5.0]

### Added
Expand Down Expand Up @@ -332,3 +337,4 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
[1.2.3.0]: https://github.com/heidelpay/heidelpayPHP/compare/1.2.2.0..1.2.3.0
[1.2.4.0]: https://github.com/heidelpay/heidelpayPHP/compare/1.2.3.0..1.2.4.0
[1.2.5.0]: https://github.com/heidelpay/heidelpayPHP/compare/1.2.4.0..1.2.5.0
[1.2.5.1]: https://github.com/heidelpay/heidelpayPHP/compare/1.2.5.0..1.2.5.1
2 changes: 1 addition & 1 deletion src/Heidelpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Heidelpay implements HeidelpayParentInterface
const BASE_URL = 'api.heidelpay.com';
const API_VERSION = 'v1';
const SDK_TYPE = 'HeidelpayPHP';
const SDK_VERSION = '1.2.5.0';
const SDK_VERSION = '1.2.5.1';

/** @var string $key */
private $key;
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ public function cancelAmount(
} catch (HeidelpayApiException $e) {
$allowedErrors = [
ApiResponseCodes::API_ERROR_ALREADY_CANCELLED,
ApiResponseCodes::API_ERROR_ALREADY_CHARGED,
ApiResponseCodes::API_ERROR_ALREADY_CHARGED_BACK
];

Expand Down
3 changes: 2 additions & 1 deletion test/unit/Resources/PaymentCancelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ public function allowedErrorCodesDuringChargeCancel(): array
{
return [
'already cancelled' => [ApiResponseCodes::API_ERROR_ALREADY_CANCELLED, false],
'already chargedBack' => [ApiResponseCodes::API_ERROR_ALREADY_CANCELLED, false],
'already charged' => [ApiResponseCodes::API_ERROR_ALREADY_CHARGED, false],
'already chargedBack' => [ApiResponseCodes::API_ERROR_ALREADY_CHARGED_BACK, false],
'other' => [ApiResponseCodes::API_ERROR_BASKET_ITEM_IMAGE_INVALID_URL, true]
];
}
Expand Down

0 comments on commit 9eecc31

Please sign in to comment.