augustin-wien / augustina-backend

An open-source web shop designed for selling magazines on the street.
GNU Affero General Public License v3.0
4 stars 0 forks source link

feat: add customer email to order, fix order tests, use native funct… #142

Closed nanu-c closed 9 months ago

nanu-c commented 9 months ago

…ions in ListPayments and allow empty strings for subpayment.ReceiverName, Avoid using DB outside the current connection in VerifyOrderAndCreatePayments

Type of change

Description

This is a first step for the digital license backend customer part. But actually it's fixing a lot of things that have to be solved on the way.

IMPORTANT TO KNOW

When i was enabling the order tests again, it took forever, because the requests were blocking themself. So i replaced the calls to the database without a pgx.Tx to one with pgx.Tx and i had to change the get payments, too.

There is still the code missing to create the customer in keycloak, because we don't have the keycloak group the user should be added to for the current newspaper number in order to give access in wordpress. Also I think this pr is already quite complex to review so i will solve the other problems with customers in a follow up pr.

CHANGES

to think on The order code for orders in the tests shouldn't be 0 for all orders. We need a way to distinguish them in order to start parallel/fast tests.

TODO

Checklist: