I have to implement a feature on my Winforms app that allow the user to do more stuff on the application. After they successfully made a payment in PayPal, so I have this code below that redirect the user to a PayPal payment page on browser:
private void PaypalPayment_Button(String TypeOf,String Pricing)
{
string url = "";
string business = "nfrealyt@gmail.com";
string country = "MY";
string currency = "USD";
url += "https://www.paypal.com/cgi-bin/webscr/" +
"?cmd=" + "_xclick" +
"&amount=" + Pricing +
"&business=" + business +
"&item_name=" + TypeOf;
System.Diagnostics.Process.Start(url);
// https://www.paypal.com/paypalme/flowstoragepaypal //https://www.paypal.com/cgi-bin/webscr
}
Everything's good now the main problem I'm dealing with is verifying whether if the user made the transaction or not, say if a transaction is made then execute certain code for example display a MessageBox on the Winforms application:
MessageBox.Show("Account Upgraded","Succeeded");
Is there a way to achieve this? I've done hundreds of googling but to no success.
bool paymentMade = false;
private void PaypalPayment_Button(String TypeOf,String Pricing)
{
string url = "";
string business = "mygmail@gmail.com";
string country = "MY";
string currency = "USD";
url += "https://www.paypal.com/cgi-bin/webscr/" +
"?cmd=" + "_xclick" +
"&amount=" + Pricing +
"&business=" + business +
"&item_name=" + TypeOf;
System.Diagnostics.Process.Start(url);
paymentMade = true;
if(paymentMade == true)
{
MessageBox.Show("Payment has made");
}
}
I was expecting for a MessageBox message to be display on the WinForms as soon the user has successfully made the payment.