Closed ricardobrg closed 1 year ago
This is done by saving static data to the License, Payable, and making a request to the Postman echo, instead of the backend.
After tiki/tiki-shopify#6 the static data can be replaced by the app meta fields data and the /customer/discount endpoint will replace the Postman echo endpoint. which should be done in tiki/integrations#131.
Waiting on https://github.com/tiki/tiki-sdk-js/issues/100 for testing
Created the Title, License and Payable registries and prepared the request object in tiki/integrations#132
The JavaScript part of the code is done. tiki/tiki-shopify#9 will deal with the saving in the backend.
As a customer, I want that my discount is saved when accepting an offer so that I can get it when I buy something.
After the creation of the License, a Payable should be created with the discount ID as a reference and our API should be called to register that the user is allowed to use that discount.
This is going to be an unauthenticated request for now, but needs to be replaced by the authenticated one before merging.