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

Extend webshop #105

Closed lebe1 closed 10 months ago

lebe1 commented 11 months ago

Type of change

Description

IMPORTANT TO KNOW

This PR would require a change in the frontend not calling /items/ anymore but /items/backoffice/ instead!!

First you have to comment these lines as a hack in dev mode to get the verify-response without verifying the order. image

Then start all your containers docker compose up -d

For this PR to review you then need to create an order with a JSON-Input such as in swagger

{
    "entries": [
        {
            "item": 1,
            "quantity": 2
        },
        {
            "item": 2,
            "quantity": 30
        }
    ],
    "vendorLicenseID": "fl-123"
}

After a successful redirection from VivaWallets demo instance you have to copy and paste transactionID and orderID into the /orders/verify GET-call.

Your sample response should look simliar to this one:

{
  "TimeStamp": "2023-10-31T14:42:36.814772Z",
  "FirstName": "firstname1",
  "PurchasedItems": [
    {
      "ID": 158,
      "Item": 1,
      "Quantity": 2,
      "Price": 300,
      "Sender": 3,
      "Receiver": 6,
      "SenderName": "UserAnon",
      "ReceiverName": "fl-123",
      "IsSale": true
    },
    {
      "ID": 159,
      "Item": 2,
      "Quantity": 30,
      "Price": 1,
      "Sender": 3,
      "Receiver": 6,
      "SenderName": "UserAnon",
      "ReceiverName": "fl-123",
      "IsSale": true
    }
  ],
  "TotalSum": 630
}

CHANGES

TODO

Checklist: