Loyalty Card Buy

Facilitates the card purchase process by interfacing with a payment gateway. First, it checks if the loyalty card has a purchase value greater than zero; if not, it returns an error message. It constructs a return URL for handling payment gateway responses. Next, it associates the payment with the merchant leader and the user, sets the card's purchase amount, and initiates the payment process via the payment gateway. It returns an array containing a flag indicating whether to redirect the user to the payment gateway, the response from the payment gateway, and the ID of the loyalty card payment.

Language
Credentials
Header
Click Try It! to start a request and see the response here!