Phone pe payments with rest-api
-
Hello Bagisto Team,
I am using rest-api to server my application. I want to use PhonePe as a payment gateway in my application. While working with all checkout APIs, I found that there is the only API to save the order which is
/api/v1/customer/checkout/save-order
But this API do not accept any data related to transaction id and transaction data.
Can you please guide me on what I need to do in terms of doing so? I want to save the transaction related to the order while saving the order.
Thank you
-
Hello @marshalbagisto,
As we check the
save-order
API, the API will get only ID as a parameter for now. If you need to pass more parameters as per your need, you can just override the function in your package/module and use the function as you wanted.You can take a reference to override the function.
Blog Link : https://bagisto.com/en/how-to-override-controller-in-bagisto/ -
@amit-webkul Thank you for the reply.
I'll do as advised. Can you please help me with the create transaction api. As we do not have the create transaction api in the module, I want to create that for my own as I am using another payment gateway and I want to save related data. Can you help me with how the order process works?
For example: I'll save the order which will return order id, I already have the transaction Id from phone pe. How can I save the transaction data using the rest-api?Thank you