beckn / strapi-plugins

0 stars 1 forks source link

Implement cancel API in BPP adaptyer #15

Closed vishi24 closed 7 months ago

vishi24 commented 8 months ago

Description

Modify the cancel API based on the new approach that can handle new domains with configuration changes or minimal code-level changes.

Goals

Expected Outcome

Cancel API as per the new approach that works seamlessly with all the existing domains and should be able to accommodate new domains. It should be working correctly and cancel the order booked earlier.

Acceptance Criteria

Implementation Details

Add logic on the cancel endpoint to fetch data using the query engine. Add logic for mutation on the database to cancel an order. Create JSONata file for transforming the query response to BECKN format. Transform the query response to BECKN format using transformer and JSONata.

Mockups / Wireframes

NA


Product Name

Beckn

Project Name

strapi-plugin

Organization Name:

FIDE

Domain

NA

Tech Skills Needed:

Strapi Node

Complexity

Medium

Category

Feature

Sub Category

API

zoyaashik commented 7 months ago

Updating the discussion and expectations on Cancel Flow 1.Meta API to be implemented in future kept as backlog

  1. BAP will send either cancellation reason id or cancellation reason along with media in descriptor object
  2. If Cancellation reason id is available save it to ReturnCancellation table and update the order status in order table to "CANCELLED". Update Order fulfillment table with fulfillment status code as "order cancelled" and state value as "order cancelled by user" 4.If we have descriptor object, save them as json object(name,code,short dec,long desc) in reason column of ReturnCancellation table. Simulatneously add the media/image in to media tableand relate to r ReturnCancellation table and update the order status in order table to "CANCELLED". 4a.Update Order fulfillment table with fulfillment status code as "order cancelled" and state value as "order cancelled by user"