You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
554 B
22 lines
554 B
using System;
|
|
|
|
namespace AIK.ViewModels.Integral
|
|
{
|
|
public static class PaymentLaunchHelper
|
|
{
|
|
public static string BuildPaypalLaunchUrl(string tokenOrUrl)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(tokenOrUrl))
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
if (Uri.TryCreate(tokenOrUrl, UriKind.Absolute, out var absoluteUri))
|
|
{
|
|
return absoluteUri.ToString();
|
|
}
|
|
|
|
return $"https://www.paypal.com/checkoutnow?token={tokenOrUrl}";
|
|
}
|
|
}
|
|
}
|
|
|