PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, November 11, 2022

[FIXED] How to re-call gateway API from catch statement after certain minutes when payment gateway is down?

 November 11, 2022     c#, exception, payment-gateway, webapi     No comments   

Issue

I would like to know is there is any way in c# if payment gateway is down we get exception in catch , can we again re-call payment gateway API from catch after some milliseconds in c#


Solution

You could try using the Polly framework (https://github.com/App-vNext/Polly). It provides a fault-handling library. You could define your own retry policy (eg: when calls to payment gateway throw a 502/500 etc) and it would retry in a time that is also configurable.



Answered By - Sharath N S
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing