0

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?

Henrik S
  • 105
  • 1
  • 1
  • 6
  • 1
    Did you read their documentation about how to implement this functionality? – Steve Mar 25 '19 at 16:55
  • Yes, but there is nothing about how the method should be implementet. I have set the url in the control panel on the website, and all that stuff, so i'm pretty lost why it doesn't get called. – Henrik S Mar 25 '19 at 17:08
  • https://learn.quickpay.net/tech-talk/payments/form/ there is an example in NET and on that page there are other links to their API – Steve Mar 25 '19 at 17:21
  • Yeah, and I tried to follow that. That's why i'm posting this... i'm using the "link" solution from them. But i'm not sure if the callback method should have a special definition... That's my question... – Henrik S Mar 25 '19 at 17:35

1 Answers1

0

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.