/springboot-transactional

Spring Boot order and payment using @Transactional

Primary LanguageJava

POST: http://localhost:9696/api/v1/orders

CREDIT :

Payload request :

{ "order": { "totalQunatity": 2, "shoppingCardId": 1, "totalPrice": 2000 }, "payment": { "type": "CREDIT", "cardName": "Dowlath Basha G", "cardNumber": "1234 1234 1234 1234", "expiryMonth": 2, "expiryYear": 2025, "cvc": 123 } }

Payload response : { "timestamp": "2024-05-08T15:03:06.140+00:00", "status": 500, "error": "Internal Server Error", "path": "/api/v1/orders" }

credit-transactional

DEBIT :

Payload request :

{ "order": { "totalQunatity": 2, "shoppingCardId": 1, "totalPrice": 2000 }, "payment": { "type": "DEBIT", "cardName": "Dowlath Basha G", "cardNumber": "1234 1234 1234 1234", "expiryMonth": 2, "expiryYear": 2025, "cvc": 123 } }

Payload response :

{ "status": "IN-PROGRESS", "message": "SUCCESS", "orderTrackingNumber": "211c496f-dc25-49bc-b1d8-e5bafa958ab3" }

debit-transactional