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

Vivawallet verification process via webhook #38

Closed lebe1 closed 1 year ago

lebe1 commented 1 year ago

Type of change

Description

IMPORTANT

These webhooks can only be tested locally via ngrok. Try running my command to redirect these webhooks to your localhost:3000 port

ngrok http --domain=workable-credible-mole.ngrok-free.app 3000

CHANGES

  1. Three webhooks have been added
    • success webhook available via /api/webhooks/vivawallet/success/
      • logic has been added to this one for verification
    • failure webhook via /api/webhooks/vivawallet/failure/ -> add logic in next PR
    • price webhook for transaction fees via /api/webhooks/vivawallet/price/ -> add logic in next PR
  2. Unnecessary handlers have been deleted
    • Important for frontend to know that it has not call api/orders/verify/ anymore since backend verifies it on its own via webhook
  3. vivawallet_types.go has been added due to lots of type definitions
  4. CreatePaymentOrder() has been improved for checkout process listing item names and (for now) correct user data for 'AnonUser'

TODO

Checklist:

jofmi commented 1 year ago

Should I review already, or wait for a version where the tests are passing?