Skip to content

Releases: remp2020/crm-payments-module

3.6.0

28 Nov 09:12
Compare
Choose a tag to compare
  • 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 CRM InvoicesModule, it implements this interface in VatModeDataProvider class. Correct VAT mode is selected depending on user invoice address.
  • 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 in Comfortpay payment gateway.
  • Changed PaymentItemsRepository and ChangePaymentSubscriptionTypeFormFactory to use new DatabaseTransaction 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 in ParsedMailLogsRepository::all from int to float to avoid losing the precision. remp/crm#3356
  • Added command payments:change_vat to handle VAT rate change. remp/crm#3357

3.5.0

25 Oct 12:20
Compare
Choose a tag to compare
  • BREAKING: Removed use of deprecated IUserGetter. Using UserEventInterface 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 your recurrent_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.
  • DEPRECATED: Deprecated usage of cid column within recurrent_payments table. Use payment_method_id reference with external_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 and subscription_type->next_subscription_type_id after. remp/helpdesk#2993
  • Added ability to force count in DonationPaymentItem. 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 - use setSubscriptionPeriod(28) in setup directive of paymentsCalculateAveragesCommand.
    • Option --minimal_subscription_length sets minimal length of subscription types that will be included in calculation of avg_month_payment. Can be configured also in neon config - use setMinimalSubscriptionLength(2) in setup directive of paymentsCalculateAveragesCommand.
    • Option --calculation_period sets number of days for which payments should be taken into account. Can be configured also in neon config - use setCalculationPeriod(365) in setup directive of paymentsCalculateAveragesCommand.
    • Option --segment_code allows to calculate averages only for users from provided segment.
  • 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

20 Sep 12:59
Compare
Choose a tag to compare
  • BREAKING: Added PaymentItemContainerFactory, which can create PaymentItemContainer 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.
  • 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.
  • BREAKING: Renamed enum \Crm\PaymentsModule\Models\ParsedMailLog\State to StateEnum and changed naming convention of names to PascalCase. remp/crm#3243
  • BREAKING: Added migration that changes type of vat column in payments_items table from int to decimal(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 from int to float. remp/crm#3277
  • BREAKING Changed PaymentItemInterface#forceVat() - $vat parameter type changed from int to float. remp/crm#3277
  • BREAKING: Changed DonationPaymentItem constructor - $vat variable is now of type float (previously int). remp/crm#3277
  • BREAKING: Renamed addItemsFromPaymentToContainer method of PaymentItemContainerFactory to addItemsFromPayment. remp/crm#3243
  • DEPRECATED: Deprecated PaymentsRepository::STATUS_* constants. Use Payment\PaymentStatusEnum::* enum instead. remp/crm#3261
  • Changed PaymentsRepository#copyPayment internals. Method now it internally calls add 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.
  • 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 to RecurrentPaymentResolver, adding ability to change logic of creation of PaymentItemContainer 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 to number in AvgSubscriptionPaymentWidget. 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 and standard columns in vat_rates table from float to decimal(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 separated Payment\PaymentStatusEnum::* enum. remp/crm#3261
  • Fixed calling PaymentsRepository::update instead of updateStatus method in PaymentRefundFormFactory. remp/respekt#280
  • Added option to allow zero total price in payment container. remp/crm#3300

3.3.0

12 Jul 11:15
Compare
Choose a tag to compare
  • BREAKING: Removed unused parameter charge from payments:charge command. remp/respekt#87
  • IMPORTANT: Added payment_country_id and payment_country_resolution_reason to the payments 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 to payments: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 in AvgSubscriptionPaymentWidget. remp/crm#3212
  • Refactored presenters and form factories. remp/crm#2925
    • Rewritten to use promoted properties
    • Implemented SubscriptionTypesSelectItemsBuilder or replaced SubscriptionTypeHelper by SubscriptionTypesSelectItemsBuilder
  • 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 in CsobOneClick 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, returning PaymentItemContainer containing payment items of next recurrent payment. remp/respekt#87
    • Method internally emits new event RecurrentPaymentItemContainerReadyEvent, that adds ability to add custom items to PaymentItemContainer.
  • 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

24 May 10:24
Compare
Choose a tag to compare
  • DEPRECATED: Deprecated state constants of \Crm\PaymentsModule\Repositories\ParsedMailLogsRepository. remp/respekt#189
    • Use Crm\PaymentsModule\Models\ParsedMailLog\State enum instead.
  • 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 fires AttachRenewalPaymentEvent 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 in PaymentsAdminPresenter. remp/crm#3135
  • Added preventPaymentStatusUpdate argument to PaymentProcessor::complete method. respekt#150
  • Fixed possibility of changing payment status to fail in ConfirmCsobPaymentsCommand. respekt#150
  • Fixed link back to user of the payment from payment edit screen.
  • Fixed obtaining clientIp from initial payment for CsobOneClick payment gateway. remp/crm#2990
  • Added extracted implementation of RecurrentPaymentScenarioConditionModel from Crm\ScenariosModule\Events\ConditionCheckEventHandler. remp/crm#1409
  • Added ability to collect source bank account of parsed mail log and logging source bank account within TatraBankaMailParser and CsobMailParser. 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

13 Mar 11:15
Compare
Choose a tag to compare
  • 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 to paid. 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.
  • 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 extend PaymentRefundFormFactory via dataprovider. remp/crm#2960
  • Updated RecurrentPaymentsResolver::resolveSubscriptionType() to handle new subscription_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 by subscription_type.trial_periods.
    • This is not a breaking change. Trial period for existing subscription types with next_subscription_type is set to 1.
  • 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 without subscription_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.
  • 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

22 Jan 20:55
Compare
Choose a tag to compare
  • BREAKING: Fixed class namespaces to follow PSR4 specification. remp/crm#2228
    • Use package remp/crm-rector:^3.0 to automatically fix these renames.
  • BREAKING: Changed return type of PaymentItemsRepository->deletePaymentItem() from int to bool to be consistent with other delete methods. remp/crm#2988
  • BREAKING: Fixed return type of TransactionPayload->getCurrency() from string to int. remp/crm#2988
  • BREAKING: Fixed return types of RecurrentPaymentInterface->getResultCode() and RecurrentPaymentInterface->getResultCode() to ?string. remp/crm#2988
    • Fixed return types of gateways Comfortpay, CsobOneClick and PaypalReference.
  • 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 in PaymentFormFactory that it cannot be set in the future. remp/crm#2201
  • Fixed missing argument sendMail in RecurrentPaymentsProcessor->processChargedRecurrent method. remp/helpdesk#2396

2.11.0

21 Nov 12:16
Compare
Choose a tag to compare
  • 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

03 Oct 10:58
Compare
Choose a tag to compare
  • 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 to ImapMailDownloader.
    • Replaced direct dependency on Tomaj\ImapMailDownloader\Downloader with MailDownloaderInterface in confirmation commands.
    • Added option to replace default mail downloader ImapMailDownloader (downloader must implement: MailDownloaderInterface).
  • 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. If ArrayHash 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 in PaymentFormDataProviderInterface.
  • 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.
  • Changed the registration of events - module now uses LazyEventEmitter which supports lazy event listeners registration. remp/crm#2116

2.9.0

24 Aug 15:30
Compare
Choose a tag to compare
  • 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 from payment->paid_at and subscription_type->length) remp/novydenik#1084