summaryrefslogtreecommitdiff
path: root/postgresqleu/adyen
AgeCommit message (Collapse)Author
2025-04-15Set expiresAt on Adyen payment linksMagnus Hagander
The default expiry is 24 hours. That means that if an invoice was due to be canceled in say 4 hours, and the user clicked the payment link they would be able to use that one past when the invoice was actually canceled, thereby causing errors. This happened at least once, where the user forwarded the Adyen link (instead of the invoice link) to the person who was supposed to do the payment, and that person made the payment after the invoice was expired. So, if the invoice is set to be canceled in <24 hours, we set the expiresAt flag when creating the payment link, so Adyen will reject that payment. Reviewed-By: Daniel Gustafsson
2024-07-01Allow comma directly after batch number when matching adyen payoutsMagnus Hagander
2023-07-25BREAKING CHANGE: Allow the currency format to be configurable.Dave Page
This change allows the currency format to be configured in the instance. This allows us to use alternate symbols (e.g. £), and to format amounts using the format required in different jurisdictions. The currency format is set to Euro by default. Note that this change requires an update to any Jinja templates that use the currency_format tag. This must be changed to format_currency.
2022-11-05Remove hardcoded values for Adyen merchant accountsMagnus Hagander
Replace them with an (inefficient) query, for the unusual cases where it has to be checked in the django admin interface.
2022-10-19Add merchantAccountCode as a filter for adyen notifications in django admMagnus Hagander
2022-10-10Fix django admin views for adyen transactions with multiple refundsMagnus Hagander
2022-10-10Add model change missing in previous commitMagnus Hagander
2022-10-10Allow multiple refunds of one transaction in Adyen providerMagnus Hagander
The system in general supports this but for some reason the Adyen record of the refund (which isn't really used anywhere other than for logging purposes) was limited to 1.
2022-10-04Fix copy/paste error in Adyen alert emailsMagnus Hagander
Seems the subject was copy/pasted without editing, and the actual contents of the email used the wrong term as well. Oops.
2022-09-12Use link instead of dropdown for notifications of adyen reportsMagnus Hagander
This generates a gigantic dropdown otherwise, now that there are many notifications. And it should never be changed anyway. Use the same pattern as for the other models referring to notifications.
2022-09-09Make it possible to filter Adyen reportsMagnus Hagander
Add filters based on Merchant Account and Report Type, to make it easier to scroll through very long lists of reports when debugging.
2022-09-08Fix incorrect string parameter referenceMagnus Hagander
In passing, clarify the error message if we have a re-settle of a transaction with a new amount.
2022-09-08Further, include a full traceback when failing the reportsMagnus Hagander
2022-09-08Add some more detailed output from failed Adyen report runsMagnus Hagander
2022-07-15Rename instances of variables "l"Magnus Hagander
This is complained about more loudly in newer versions of pycodestyle, and it's a bad idea in general. So rename them all to something more readable.
2022-01-05Re-implement Adyen payments using the Pay by Link systemMagnus Hagander
The current Hosted Payment Pages (HPP) system is deprecated by Adyen and will be removed in Oct 2022. So we replace the implementation with one using the Payment Link system. The big advantage of HPP vs the other options provided by Adyen is that *all* processing is handled at Adyen, thereby not requiring any PCI certification. And luckily the same applies for Payment Link, which is why it's picked over the other available options. The difference in functionality is that instead of encoding and signing the payment information as part of the URL of the page, and API call is made to Adyen to get a link (passing the information as a json object) and the user is redirected to the return URL. Once that part is done, the processesing is handled by Adyen. There is no longer an actual authorization result as part of the return url (something HPP had but we didn't use anyway), but as before we send the user in a refresh loop while we wait for the asynchronous notification to arrive. Payment Link also providers a generally more modern interface and works better on mobile for example, which while not necessary very important to our customers, is a nice touch. It may also open the door for some other payment methods in the future.
2022-01-05Rename views for adyen bank paymentsMagnus Hagander
It makes more sense that they're called bank payments than invoice payments, because all our payments are invoice payments.
2022-01-05Make the originalReference field optional in Adyen notificationsMagnus Hagander
This field is empty on AUTHORIZATION notifications and on some newer notifications it appears to then simply not be included.
2022-01-05Properly decode utf8 when storing AdyenRawNotificationMagnus Hagander
This was broken when we moved to python3, but the only result was the string was stored in the db with a b'' wrapper. The in-line processing used the original QueryDict and worked fine, but this broke later re-processingf of the noficiations.
2022-01-05Centralize creation of invoice return URLsMagnus Hagander
This code was copy/pasted between several different places, so centralize it into the InvoiceManager class to reduce the risk of furhter off-by-one mistakes when editing.
2021-10-08Fix error/warning messages for Adyen logs in non-csv formatMagnus Hagander
2021-09-12Ignore adyen reports in non-csv formatMagnus Hagander
It seems we get a notification into the system for PDF reports manually ordered in the interface as well (at least sometimes), which would then crash the download process as we try to store the results in a text field. Add a check for csv, and ignore all non-csv reports. We still store them in the list of report (and just pre-flag them as processed), so that we will have a record of which reports have been delivered if something changes down the line.
2020-07-13Remove unused importsMagnus Hagander
2020-04-01Specify on_delete for all ForeignKey and OneToOneFieldsMagnus Hagander
This was already done once in 8289e05cd but had not been properly maintained.
2020-03-29Remove date parameter to create_accounting_entryMagnus Hagander
This should always be set to todays date, so set it in the function instaed. This changes the behaviour of the paypal plugin to actually use todays date rather than a date parsed out from the notification. In theory this could change the accounting entry date in case the notification is so delayed it ends up on a different day, but either one could be argued to be equally correct in this case, and using the date of creation of the transaction makes tracking things a lot easier. While at it, clean up some imports that have been missed earlier.
2020-03-12Replace datetime.now() with timezone.now()Magnus Hagander
As a step on the way to better timezone support, use the django function timezone.now() instead of datetime.now(). As long as we haven't enabled timezones globally this becomes a no-op and does exactly what it did before, but once timezones are enabled it will generate datetimes that are aware of this. No functionality change but gets a lot of boiler-plate out of the way making the verification of the rest of the timezone work easier.
2020-01-31Fix typoDaniel Gustafsson
We dont want to lose things, but we dont mind loose things..
2020-01-08Style and minor fixes pointed out by newer version of pep8Magnus Hagander
2019-09-20Add support for new accounting entry type ReserveAdjustment from AdyenMagnus Hagander
2019-04-27Centralize invoice permisisons to the Invoice Managers groupMagnus Hagander
Previously some permisisons were directly controlled by the group and some were controlled by directly checking module permissions.
2019-02-09Update Adyen provider to register bank transactionsMagnus Hagander
If a managed bank account is specified as the payout account, the Adyen provider will now register a pending matcher for that account and leave the accounting entry open (to be closed when the payout actually happens).
2019-01-28Schedule existing django management commandsMagnus Hagander
This adds the scheduling metadata to all the existing management commands. In passing, also makes the description nicer on a couple of them, since it is now shown in the admin web.
2019-01-19Fix missing class prefixMagnus Hagander
2019-01-19Fix incorrect order of fields in status messageMagnus Hagander
2019-01-19Re-factor payment methods and move configuration to the databaseMagnus Hagander
This is a major refactoring of how the payment method integrates, with the intetion of making it more flexible and more easy to use. 1. Configuration now lives in the database instead of local_settings.py. 2. This configuration is edited through the /admin/ interface, which makes it a lot easier to add constraints (and instructions), thus preventing misconfiguration. 3. Invoice payment methods are now separate from invoice payment implementations. That means there can be multiple instances of the same payment method, such as multiple different paypal accounts, being managed. 4. All payment method implementations are now available in all installations, including Braintree and Trustly. This retires the x_ENABLED settings in local_settings.py. The code won't actually run unless there are any payment methods defined with them. 5. On migration, all payment methods that are marked as inactive and have never been used are removed. Any payment method that has been used is left around, since there are old invoices connected to it. Likewise, any payment method that is selected as available for any sponsorship level (past or future) is left in the system. XXXXXX manual action needed on production systems XXXXXX 1. Settings for payment methods should be migrated automatically, but should of course be verified! 2. The template for Manual Bank Transfer is *not* migrated, since it wasn't in settings.py, but in a template and overriden downstream. Migrate the contents of the template invoices/banktransfer.html to the database using the /admin/ interface. When this is done, the template can be removed. 3. Notification URLs in Adyen must be updated in the Adyen backoffice to include the payment method id in the url (adding a /n/ to the end of the URL, with n being the id of the payment method). 4. Notification URLs in Paypal must be updated the same way.
2019-01-10Fix adyen reporting Decimal parsingMagnus Hagander
This was never the right way to do it, but it randomly happened to work in the old one. To properly round off a decimal, we should be using quantize.
2019-01-10Fix a number of base64 and hashing related issuesMagnus Hagander
2019-01-10Replace __unicode__ with __str__Magnus Hagander
2to3 doesn't do this automatically, probably because weird things can happen if you had both. We know we didn't, so just do a straight replacement.
2019-01-10Import related fixes from 2to3Magnus Hagander
2019-01-10Generic changes for python3 from 2to3Magnus Hagander
2019-01-05Allow proper processing of Adyen notifications from test systemMagnus Hagander
Instead of never doing anything about them other than sending an email, add a setting for ADYEN_IS_TEST_SYSTEM. If this setting is True (default!) and the notification comes in from the adyen test environment, process it as normal. If it's False and the notification comes in frmo the live environment, process as normal. Only if there is a mismatch is the email generated. In passing, change the term "test system" to "test environment", to make it more clear.
2019-01-04Switch to using requests for http requestsMagnus Hagander
It's a lot cleaner API than urllib2, and will be easier once we port version. Hopefully this doesn't break something. Probably it does break encoding somewhere, because py2.
2019-01-04Fix sibling importsMagnus Hagander
Sibling imports should be prefixed with a period. Good idea in py2, will eventually become required in py3, so another small step.
2019-01-04Switch to new style try/except handlingMagnus Hagander
Python 2.6 introduced the better syntax, Python 3 removes the old one, so one small step towards py3.
2018-12-15Replace usage of has_key()Magnus Hagander
It has been deprecated, and instead we should use "in" and "not in", so make that change across the board.
2018-12-14Properly use "is" and "is not" for comparing with NoneMagnus Hagander
Embarassing mistakes for a database developer...
2018-12-14not x in y --> x not in yMagnus Hagander
2018-12-14Avoid multi-statement rowsMagnus Hagander
2018-12-14Fix blankline related warningsMagnus Hagander
2018-12-14Fix comment warningsMagnus Hagander
In passing remove some comments that were pointless