Openbravo Issue Tracking System - Retail Modules
View Issue Details
0057189Retail ModulesGift cards and gift voucherspublic2024-11-19 16:532024-11-30 22:04
sofidossant 
Bimla_vm 
highminoralways
closedfixed 
5
pi 
 
No
0057189: Error Unexpected exception consuming the giftcard - API ConsumeGiftCard
When I want to consume a gift card through the api
/ws/org.openbravo.retail.api.giftcards.ImportService/ConsumeGiftCard
I can't do it, and the error is not informative.

We can not consume the gift card.
1 - Put the role The White Valley Group how default.
2 - Create the gift card with
/org.openbravo.api.ImportService/GiftCard

[
{
"client":"The White Valley Group",
"organization":"The White Valley Group",
"searchKey": "TEST-SERGI1",
"active": true,
"dateOrdered": "2024-10-22",
"businessPartner": "WVG/C0004",
"product": "WVG/GC0001",
"amount": 50,
"currentAmount": 50,
"type": "BasedOnCreditNote",
"expirationDate": "2025-09-23",
"creationOrganization": "The White Valley Group"
}
]
 
3- Use /ws/org.openbravo.retail.api.giftcards.ImportService/ConsumeGiftCard
https://livebuilds.openbravo.com/context/pos_modules_pgsql_pi_api/api?urls.primaryName=consumegiftcards#/ [^]

{
"client": "The White Valley Group",
"organization": "The White Valley Group",
"giftCardIdentifier": "TEST-SERGI1",
"newTransactionId": "6DF7EB4507BC4D628025987475AFC112",
"amount": 1.1
}

We see the error
{
  "data": {
    "errors": [
      {
        "status": 200,
        "title": "Unexpected exception consuming the giftcard"
      }
    ]
  },
  "links": null
}
No tags attached.
Issue History
2024-11-19 16:53sofidossantNew Issue
2024-11-19 16:53sofidossantAssigned To => Retail
2024-11-19 16:53sofidossantTriggers an Emergency Pack => No
2024-11-20 10:04guilleaerAssigned ToRetail => guilleaer
2024-11-20 10:04guilleaerStatusnew => acknowledged
2024-11-20 10:09Bimla_vmAssigned Toguilleaer => Bimla_vm
2024-11-20 10:09Bimla_vmStatusacknowledged => scheduled
2024-11-26 09:49hgbotNote Added: 0172575
2024-11-26 09:49hgbotNote Added: 0172576
2024-11-30 22:04hgbotResolutionopen => fixed
2024-11-30 22:04hgbotStatusscheduled => closed
2024-11-30 22:04hgbotNote Added: 0172822
2024-11-30 22:04hgbotNote Added: 0172823
2024-11-30 22:04hgbotNote Added: 0172824
2024-11-30 22:04hgbotNote Added: 0172825

Notes
(0172575)
hgbot   
2024-11-26 09:49   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards/-/merge_requests/47 [^]
(0172576)
hgbot   
2024-11-26 09:49   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/402 [^]
(0172822)
hgbot   
2024-11-30 22:04   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards [^]
Changeset: eef976824311fc8c5dee710eb60f5e9fd75fcee7
Author: Bimla Mayavan <b.mayavan@external.orisha.com>
Date: 26-11-2024 12:17:55
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards/-/commit/eef976824311fc8c5dee710eb60f5e9fd75fcee7 [^]

Fixed ISSUE-57189: Handled exception for consume giftcard API

---
M src/org/openbravo/retail/api/giftcards/service/ConsumeGiftCardApiImportWebService.java
---
(0172823)
hgbot   
2024-11-30 22:04   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards/-/merge_requests/47 [^]
(0172824)
hgbot   
2024-11-30 22:04   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: 1078c55f98eeb75e6a10ef10b753c5532e84e716
Author: Bimla Mayavan <b.mayavan@external.orisha.com>
Date: 26-11-2024 12:18:32
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/1078c55f98eeb75e6a10ef10b753c5532e84e716 [^]

Related to ISSUE-57189: Handled exception for consume giftcard API

---
M src/org/openbravo/retail/giftcards/ConsumeGiftCardAmount.java
---
(0172825)
hgbot   
2024-11-30 22:04   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/402 [^]