Payment solution need callback method

523 views Asked by At

I'm trying to implement a quickpay solution to my umbraco site.

But I have some problems getting the provider to call the callback function.

I don't know if there are any special way to do this?

    public void CheckPayment()
    {
       //do stuff 
    }

When i call it from the browser like this: http://domain/umbraco/surface/payment/CheckPayment

it works fine, but i can't get the payment provider (quickpay) to call the method.

So my question is. Is there a speciel markup i should use for this method? or should the above work?

1

There are 1 answers

0
Meet Patel On

You have to create call back API according to Documentation of particular that payment gateway , do like post API I have create call back API for XYZ payment gateway. . We Send call back url in our payment request API call(Where they can send us transaction call back). . Payment Gateway send us call back, for that they need POST API that accept json object.

This is My Model Class With json Property Name.

****public class PaymentVerifiedRequest {      
    [JsonPropertyName("Status")]
    public string Status { get; set; }
    [JsonPropertyName("order_id")]
    public string UniqueOrderId { get; set; }
    [JsonPropertyName("amount")]
    public string Amount { get; set; } }****

This Is my API structure that catch Jason response

[HttpPost(ActionsConsts.DeluxePay365Pay.PaymentVerified)]
    public async Task<IActionResult> VerifiedTransactions(
    [FromBody] PaymentVerifiedRequest request)
    {`enter code here`
    
        // Your database update code do here 
    }

When Payment Gateway call Live API Url you will get Response in this API and you can use response as per your need.

I hope this solution help on of you.