Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
imaun authored Mar 14, 2024
1 parent 86e0509 commit 89c822a
Showing 1 changed file with 8 additions and 30 deletions.
38 changes: 8 additions & 30 deletions samples/Paymun.Samples.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,7 @@ static Task Main(string[] args) {
writer.WriteLine(mellatPay.Message);
writer.Flush();
writer.Close();

//var payment = getPaymentResult(host.Services);

//System.Console.WriteLine($"Payment link created: {payment.PaymentPageUrl}");
//System.Console.WriteLine("Enter verify when you pay the link.");

//var command = System.Console.ReadLine();

//if(command.ToUpper() == "VERIFY") {
// System.Console.WriteLine("Enter Authority:");
// var authority = System.Console.ReadLine();
// var verify = getVerifyResult(host.Services, authority);
// System.Console.WriteLine($"RefId: {verify.ReferenceId}");
// System.Console.WriteLine($"Status: {verify.StatusCode}");
// System.Console.WriteLine($"Msg: {verify.Message}");
//}


return host.RunAsync();
}

Expand Down Expand Up @@ -76,12 +60,12 @@ static PaymentRequestResult getMellatPayment(IServiceProvider services) {
var request = new PaymentRequest
{
Amount = 200000,
CallbackUrl = "http://crypto.bitibon.com",
Email = "imun22@gmail.com",
Mobile = "989120781451",
CallbackUrl = "http://sample.com",
Email = "dd@gmail.com",
Mobile = "989121234567",
OrderId = 123233,
TrackingNumber = 1234232,
Description = "خرید تستی بیتی بن"
Description = "Test"
};

var result = mellat.CreatePaymentAsync(request).GetAwaiter().GetResult();
Expand Down Expand Up @@ -111,16 +95,10 @@ static IHostBuilder CreateHostBuilder(string[] args) =>
services.AddZarinpalServices(merchantId: _MERCHANT_ID)
.AddMellatPaymentGateway(_=> {
_.Name = "Mellat";
_.UserName = "ganjineh19";
_.Password = "38296172";
_.TerminalId = 6227237;
_.UserName = "userName";
_.Password = "******";
_.TerminalId = 100000;
})
//.AddMellatPaymentGateway(new MellatGatewayOptions {
// Name = "Mellat",
// TerminalId = 111111,
// UserName = "user",
// Password = "pass"
//})
);

}
Expand Down

0 comments on commit 89c822a

Please sign in to comment.