Releases: remp2020/crm-payments-module
Releases · remp2020/crm-payments-module
3.6.0
- IMPORTANT - Added support for VAT modes (B2B, B2B reverse-charge and B2C modes), processed by
VatProcessor
class. remp/crm#3284- Payment VAT is be modified depending on a selected mode. VAT changes are applied just before saving or updating the payment in
PaymentsRepository
. - Current
VatProcessor
always selects B2C mode as a default mode. - To choose a different mode for the user, implement
VatModeDataProviderInterface
data provider. - When using
PaymentsModule
together with CRMInvoicesModule
, it implements this interface inVatModeDataProvider
class. Correct VAT mode is selected depending on user invoice address.
- Payment VAT is be modified depending on a selected mode. VAT changes are applied just before saving or updating the payment in
- Fixed type error when editing payment with items without link to subscription type item. remp/respekt#317
- Added anonymization of recurrent payments cid. remp/crm#3268
- Added handle anonymize cid-s in
RecurrentPaymentsUserDataProvider
. - Added
CancellableTokenInterface
which defines methods for payment gateways which support payment cid (external_token) anonymization. - Implemented
cancelToken
method inComfortpay
payment gateway.
- Added handle anonymize cid-s in
- Changed
PaymentItemsRepository
andChangePaymentSubscriptionTypeFormFactory
to use newDatabaseTransaction
API. remp/crm#3330 - Fixed possibly broken admin payments filter if the filter data provider joined the table with ambiguous column names. remp/crm#3351
- Changed type of
$amountFrom
and$amountTo
parameters inParsedMailLogsRepository::all
fromint
tofloat
to avoid losing the precision. remp/crm#3356 - Added command
payments:change_vat
to handle VAT rate change. remp/crm#3357
3.5.0
- BREAKING: Removed use of deprecated
IUserGetter
. UsingUserEventInterface
instead. remp/crm#3313 - BREAKING: Method
RecurrentPaymentsRepository::add(...)
was renamed to::addV1(...)
. Adjust your actual code to call this deprecated method or implement newer implementation of the method::add(...)
remp/crm#3221- IMPORTANT: Migration
migrate_payment_methods
could take time, depending on the size of yourrecurrent_payments
table. Consider to run it at off-peak times. - IMPORTANT: After the first deploy it's necessary to run
payments:migrate_payment_methods
command to make sure that all payment methods are correctly migrated.
- IMPORTANT: Migration
- DEPRECATED: Deprecated usage of
cid
column withinrecurrent_payments
table. Usepayment_method_id
reference withexternal_token
column instead. remp/crm#3221 - Fixed resolving next subscription type in
AttachRenewalPaymentEventHandler
. Handler should check for default subscription with same length and content access andsubscription_type->next_subscription_type_id
after. remp/helpdesk#2993 - Added ability to force
count
inDonationPaymentItem
. remp/crm#3272 - Added new
payment_methods
table to be able to manage payment methods apart of the recurrent payments. remp/crm#3221 - Refactored code which use deprecated
cid
within recurrent payments to use a new payment methods relation. remp/crm#3221 - Removed autologin functionality from
ReturnPresenter
, as login is already performed during the submission of the sales funnel payment window. remp/respekt#245 - Added new options to command
payments:calculate_averages
. remp/crm#3193- Option
--subscription_period
sets number of days in a single period for which the calculation is executed. Can be configured also in neon config - usesetSubscriptionPeriod(28)
in setup directive ofpaymentsCalculateAveragesCommand
. - Option
--minimal_subscription_length
sets minimal length of subscription types that will be included in calculation ofavg_month_payment
. Can be configured also in neon config - usesetMinimalSubscriptionLength(2)
in setup directive ofpaymentsCalculateAveragesCommand
. - Option
--calculation_period
sets number of days for which payments should be taken into account. Can be configured also in neon config - usesetCalculationPeriod(365)
in setup directive ofpaymentsCalculateAveragesCommand
. - Option
--segment_code
allows to calculate averages only for users from provided segment.
- Option
- Added ability to set renewal payment for subscription. remp/respekt#303
- Added option to filter payments by PayPal ID to universal search and payments filter. remp/crm#3259
- Fixed resolving next subscription type for recurrent trial periods. remp/helpdesk#3016
3.4.0
- BREAKING: Added
PaymentItemContainerFactory
, which can createPaymentItemContainer
from existing payment. remp/crm#3246- Each custom payment item type should register itself in container using
registerPaymentItemType
method. Otherwise, container with unregistered items is marked as unreliable, and will throw errors during processing.
- Each custom payment item type should register itself in container using
- BREAKING: Removed obsolete
tb_simple_*
configuration values from system. remp/crm#3099- Please replace them with following configurations:
tb_confirmation_host
,tb_confirmation_port
,tb_confirmation_username
,tb_confirmation_password
,tb_confirmation_processed_folder
.
- Please replace them with following configurations:
- BREAKING: Renamed enum
\Crm\PaymentsModule\Models\ParsedMailLog\State
toStateEnum
and changed naming convention of names to PascalCase. remp/crm#3243 - BREAKING: Added migration that changes type of
vat
column inpayments_items
table fromint
todecimal(10,2)
. remp/crm#3277- Migration might take a while (without locking the whole table). However, we recommended to run it in off-peak hours.
- BREAKING Changed
PaymentItemInterface#vat()
method return type to fromint
tofloat
. remp/crm#3277 - BREAKING Changed
PaymentItemInterface#forceVat()
-$vat
parameter type changed fromint
tofloat
. remp/crm#3277 - BREAKING: Changed
DonationPaymentItem
constructor -$vat
variable is now of typefloat
(previouslyint
). remp/crm#3277 - BREAKING: Renamed
addItemsFromPaymentToContainer
method ofPaymentItemContainerFactory
toaddItemsFromPayment
. remp/crm#3243 - DEPRECATED: Deprecated
PaymentsRepository::STATUS_*
constants. UsePayment\PaymentStatusEnum::*
enum instead. remp/crm#3261 - Changed
PaymentsRepository#copyPayment
internals. Method now it internally callsadd
method and supports One Stop Shop. remp/crm#3246- Method now emits
NewPaymentEvent
, previously not emitted. - Method now emits
new-payment
Hermes asynchronous event, previously not emitted.
- Method now emits
- Added OSS payment country resolution to
payments:single_charge
command. remp/crm#3191 - Added OSS payment country resolution to
AttachRenewalPaymentEventHandler
handler. remp/crm#3191 - Added OSS payment country resolution to
MethodsPresenter
, used for authorization payments for new card registrations. remp/crm#3191 - Added default country as OSS fallback country resolver. remp/crm#3191
- Added registration of scenario's generic event
attach_renewal_payment
. This was added in version 3.2.0 and accidentally registered in internal config. remp/crm#3231, remp/novydenik#1147 - Added
BeforeRecurrentPaymentExpiresEvent
which is fired by Scenarios before payment expires. remp/crm#3231 - Added scenario's generic event and handler for stopping recurrent payments from Scenarios. remp/crm#3231
- Added
payments.dataprovider.recurrent_payment_payment_item_container
data provider toRecurrentPaymentResolver
, adding ability to change logic of creation ofPaymentItemContainer
when creating recurrent payment. remp/respekt#257 - Fixed OSS VAT rates update when updating payment country of existing payment to default country. Previously, update to default country did not update VAT rates of payment items. remp/respekt#260
- Added the ability to transfer payments and recurrent payments while transferring subscriptions between users. remp/crm#3108
- Added ability to prevent payment gateway override with
BeforeBankTransferMailProcessingEvent
when bank transfer/mail payment is received. remp/crm#3147 - Added ability to prevent OSS VAT change on payment items in
PaymentItemContainer
. remp/crm#3273 - Reverted formatting from
price
back tonumber
inAvgSubscriptionPaymentWidget
. remp/crm#3212 - Added One Stop Shop implementation to admin payment form (implemented in
PaymentFormOneStopShopInputsFactory
). remp/crm#3191 - Added migration that changes type of
reduced
,ebook
andstandard
columns invat_rates
table fromfloat
todecimal(10,2)
. remp/crm#3277 - Changed
DonationPaymentItem
OSS default VAT rate to 0%. remp/crm#3283 - Added filter by source account number to parsed mails listing filter. remp/respekt#279
- Refactored
PaymentsRepository::STATUS_*
to separatedPayment\PaymentStatusEnum::*
enum. remp/crm#3261 - Fixed calling
PaymentsRepository::update
instead ofupdateStatus
method inPaymentRefundFormFactory
. remp/respekt#280 - Added option to allow zero total price in payment container. remp/crm#3300
3.3.0
- BREAKING: Removed unused parameter
charge
frompayments:charge
command. remp/respekt#87 - IMPORTANT: Added
payment_country_id
andpayment_country_resolution_reason
to thepayments
table, planned to be used for One Stop Shop.- Please be aware that migrations adding new columns can run for several minutes and are non-blocking.
- Added command
payments:resolve_payment_country
to resolve country of payment in case of future One Stop Shop use. remp/crm#3191 - Added parameter
recurrent_payment_ids
topayments:charge
command, useful for testing. remp/respekt#87 - Added rounding to two decimal places for the ARPU graph values. remp/crm#3212
- Changed the payment formatting to
price
inAvgSubscriptionPaymentWidget
. remp/crm#3212 - Refactored presenters and form factories. remp/crm#2925
- Rewritten to use promoted properties
- Implemented
SubscriptionTypesSelectItemsBuilder
or replacedSubscriptionTypeHelper
bySubscriptionTypesSelectItemsBuilder
- Changed CSOB mail parser to support new format of emails. remp/respekt#230
- Fixed ambiguous amount when searching parsed mail logs by amount. remp/crm#3219
- Fixed
clientIp
inCsobOneClick
requests. Validate IP before using it. remp/crm#2990 - Added additional requirements to display a bank transfer page. remp/crm#3066
- Added method
RecurrentPaymentsResolver#resolvePaymentData
, returningPaymentItemContainer
containing payment items of next recurrent payment. remp/respekt#87- Method internally emits new event
RecurrentPaymentItemContainerReadyEvent
, that adds ability to add custom items toPaymentItemContainer
.
- Method internally emits new event
- Added address copying when creating new payment from parent payment in
RecurrentPaymentsChargeCommand
. remp/respekt#87 - Added One Stop Shop related data to payment detail page. remp/crm#3235
- Added possibility to register data provider for custom vat rates. remp/crm#3234
3.2.0
- DEPRECATED: Deprecated state constants of
\Crm\PaymentsModule\Repositories\ParsedMailLogsRepository
. remp/respekt#189- Use
Crm\PaymentsModule\Models\ParsedMailLog\State
enum instead.
- Use
- Fixed attempt to get previous recurrent charge on never charged recurrent payment, in
RecurrentPaymentsResolver::resolveSubscriptionType
. remp/helpdesk#2566 - Added new
AttachRenewalPaymentGenericEvent
scenarios generic event, which firesAttachRenewalPaymentEvent
event. remp/novydenik#1147 - Added option to change payment data while copying payment in
PaymentsRepository::copyPayment
. remp/novydenik#1147 - Fixed script which populates a database with testing data. remp/crm#3125
- Fixed broken move of processed payment emails to the configured folder.
- Changed template variable
$user
to$userRow
, fixing type mismatch inPaymentsAdminPresenter
. remp/crm#3135 - Added
preventPaymentStatusUpdate
argument toPaymentProcessor::complete
method. respekt#150 - Fixed possibility of changing payment status to
fail
inConfirmCsobPaymentsCommand
. respekt#150 - Fixed link back to user of the payment from payment edit screen.
- Fixed obtaining
clientIp
from initial payment forCsobOneClick
payment gateway. remp/crm#2990 - Added extracted implementation of
RecurrentPaymentScenarioConditionModel
fromCrm\ScenariosModule\Events\ConditionCheckEventHandler
. remp/crm#1409 - Added ability to collect source bank account of parsed mail log and logging source bank account within
TatraBankaMailParser
andCsobMailParser
. remp/respekt#189 - Added ability to view source bank account and update state and note of parsed mail log. remp/respekt#189
3.1.0
- IMPORTANT: Method
PaymentsRepository::updateStatus
now emits payment change status event only if the payment was actually changed. remp/respekt#130- Previously, the event could be emitted even when the status didn't change and caller requested change from
paid
topaid
. This is no longer true and such request won't emit event anymore. Please verify that your code doesn't rely on the previously-incorrect behavior.
- Previously, the event could be emitted even when the status didn't change and caller requested change from
- Added form to handle complex refund process. remp/crm#2960
- Added feature to stop subscription during refund.
- Added feature to stop recurrent payment during refund.
- Added visual progressbar to display current subscription progress.
- Added
PaymentStatusDropdownMenuWidget
to unify selection of payment status in admin dropdowns. remp/crm#2960 - Added
PaymentRefundFormDataProviderInterface
to extendPaymentRefundFormFactory
via dataprovider. remp/crm#2960 - Updated
RecurrentPaymentsResolver::resolveSubscriptionType()
to handle newsubscription_type.trial_periods
. remp/crm#2938- Rules are described in PHPDoc of
RecurrentPaymentsResolver::resolveSubscriptionType()
. - If
subscription_type.next_subscription_type
is set, number of allowed trials is handled bysubscription_type.trial_periods
. - This is not a breaking change. Trial period for existing subscription types with
next_subscription_type
is set to 1.
- Rules are described in PHPDoc of
- Added the change of payment gateway for payments confirmed from
MailProcessor
if they are different from bank transfer. remp/respekt#130 - Fixed the possibility of lock timeout by the payment status change. Event emitting has been moved outside of lock. remp/respekt#130
- Fixed possible type error when editing payment containing
subscription_type
item withoutsubscription_type_item_id
reference. remp/respekt#158 - Fixed slow payment filtering via variable symbol on payments admin page. remp/crm#3104
- Added option to select between week or month payments partitioning in retention analysis. remp/crm#3083
- Added new rules to ČSOB mail parser to improve variable symbol lookup. remp/respekt#106
- Updated regexp to recognize email statements for foreign payments ("zahraniční transakce").
- Some foreign transactions contain variable symbol in payment purpose element which can be multiline. Added new rule.
- Added rule to search whole email statement for prefixed variable symbol. Customers tend to use prefixes
vs/VS/v.s./V.S.
. - Added rule to search receiver message for variable symbol without any prefix.
- Customers often forget to add prefix.
- Some banks provide variable symbol within receiver message in "Creditor Reference Information - SEPA XML format".
- Added rule to not use variable symbol set to 0.
- Foreign transfer from at least one bank comes with field "variable symbol" set to
0000000000
. Correct variable symbol is in receiver message with VS prefix.
- Foreign transfer from at least one bank comes with field "variable symbol" set to
- Updated regexp to recognize email statements for foreign payments ("zahraniční transakce").
- Fixed empty 'More actions' dropdown. remp/crm#3071
- Fixed in user payments listing.
- Fixed in payments listing.
- Added new subscription type and subscription type tag filters in retention analysis. remp/crm#3082
- Added ability to merge dropdown menu sections. remp/crm#3071
3.0.0
- BREAKING: Fixed class namespaces to follow PSR4 specification. remp/crm#2228
- Use package
remp/crm-rector:^3.0
to automatically fix these renames.
- Use package
- BREAKING: Changed return type of
PaymentItemsRepository->deletePaymentItem()
fromint
tobool
to be consistent with other delete methods. remp/crm#2988 - BREAKING: Fixed return type of
TransactionPayload->getCurrency()
fromstring
toint
. remp/crm#2988 - BREAKING: Fixed return types of
RecurrentPaymentInterface->getResultCode()
andRecurrentPaymentInterface->getResultCode()
to?string
. remp/crm#2988- Fixed return types of gateways
Comfortpay
,CsobOneClick
andPaypalReference
.
- Fixed return types of gateways
- Fixed errors reported by PHPStan (level 3). remp/crm#2988
- Fixed possibly incorrect VAT when copying payment for specific scenarios if the VAT changed. remp/novydenik#1192
- Fixed scenario when payment is confirmed manually in admin without a notification, and yet this signal wasn't correctly propagated to the scenario triggers. remp/respekt#124
- Fixed CSOB gateway not considering status
8
(settled) as successful. remp/respekt#129 - Added validation for
paid_at
field inPaymentFormFactory
that it cannot be set in the future. remp/crm#2201 - Fixed missing argument
sendMail
inRecurrentPaymentsProcessor->processChargedRecurrent
method. remp/helpdesk#2396
2.11.0
- Added
external_id
field to payment admin filter form. remp/crm#2932 - Added ability to switch CSOB gateway to purchase mode (instead of checkout) using
CsobOneClick#usePurchaseMode
method. - Added
payments:confirm_csob_payments
to confirm unfishined online payments made through CSOB payment gateways.
2.10.0
- BREAKING: Refactored payment confirmation commands. remp/crm#2878
- Removed redundant mail downloader classes (
CsobMailDownloader
,SkCsobMailDownloader
,TatraBankaMailDownloader
,TatraBankaStatementMailDownloader
) and moved logic directly to commands. - Abstracted direct dependency on
Tomaj\ImapMailDownloader\Downloader
toImapMailDownloader
. - Replaced direct dependency on
Tomaj\ImapMailDownloader\Downloader
withMailDownloaderInterface
in confirmation commands. - Added option to replace default mail downloader
ImapMailDownloader
(downloader must implement:MailDownloaderInterface
).
- Removed redundant mail downloader classes (
- Changed logging of CID change to only update recurrent payment note if the CID actually changed. remp/crm#2952
- Fixed recurring payment controls in customer zone if the recurrent payment was reactivated. remp/helpdesk#2061
- Fixed behaviour of
PaymentFormFactory::formSucceeded()
when updating payment. IfArrayHash
type is encountered, unset it.PaymentsRepository->update()
cannot store array type into database. remp/crm#2693- Can be utilized by data providers which can store components within containers which results in
$values['container_name']['component_name']
. See details and example inPaymentFormDataProviderInterface
.
- Can be utilized by data providers which can store components within containers which results in
- Added payment's detail page. remp/crm#2487
- Link:
/payments/payments-admin/show/{PAYMENT-ID}
. - Links to new screen added into lists of payments and subscriptions.
- Page contains widget placeholders (
admin.payments.show.*
) which can be used to extended detail as needed.
- Link:
- Changed the registration of events - module now uses
LazyEventEmitter
which supports lazy event listeners registration. remp/crm#2116
2.9.0
- Added payment ID into error log when update of payment's status failed. remp/crm#2933
- Added support for terminal settlement payments format to CsobMailParser, and ignore (do not process) terminal payments in
CsobMailConfirmationCommand
. remp/novydenik#1089 - Added support for calculating recurrent payment charge time for payments without subscription. (
charge_at
is calculated frompayment->paid_at
andsubscription_type->length
) remp/novydenik#1084