Hi I develop one project and in that I have implemented the Paypal check out to have a payment. When the user makes the successful payment, the paypal return to my website with query string passing as successful transaction id, and then after I store that transaction Id to my database, that indicates that payment is successfully done.
Any how few days before the user has paid the payment but in transaction id does not fall in database so because of that application is showing that its unpaid.
I have searched for this and found that we need to implement the web-hook to resolve this issue. Can any one suggest how to implement web-hook in my code.
my paypal code is as below
Response.Write("<form action='" + ConfigurationManager.AppSettings["PayPalURL"].ToString() + "' method='post' name='buyCredits' id='buyCredits'>");
Response.Write("<input type='hidden' name='cmd' value='_xclick'>");
Response.Write("<input type='hidden' name='business' value='" + ConfigurationManager.AppSettings["BusinessURL"].ToString() + "'>");
Response.Write("<input type='hidden' name='currency_code' value='USD'>");
Response.Write("<input type='hidden' name='custom' value='"+lblorderno.Text+"'>");
Response.Write("<input type='hidden' name='item_name' value='" + ItemName + "'>");
Response.Write("<input type='hidden' name='item_number' value='" + Items + "'>");
Response.Write("<input type='hidden' name='amount' id='amount' value='" + Convert.ToString(Math.Round(price,2)) + "'>");
Response.Write("<input type='hidden' name='return' value='" + ConfigurationManager.AppSettings["SuccessURL"].ToString() + Convert.ToString(lblorderno.Text) + "'>");
Response.Write("<input type='hidden' name='cancel_return' value='" + ConfigurationManager.AppSettings["CancelURL"].ToString() + Convert.ToString(lblorderno.Text) + "'>");
Response.Write("</form>");
I never user webhook so can anyone call help me out on how to integrate webhook in paypal?
I also know I will get negative mark on this.
Hi all in my case IPN worked for me to get the actual code please review below links:
https://www.codeproject.com/Articles/19184/Use-of-the-PayPal-payment-system-in-ASP-NET
https://www.codeproject.com/Questions/856575/How-do-I-get-ipn-response-from-paypal-in-asp-net