C# 试用期贝宝定期付款
我正在尝试使用以下功能实现PayPal订阅系统: 第一个月的应用服务将是完全免费的,之后用户将支付每月金额。 我编写了如下代码:C# 试用期贝宝定期付款,c#,asp.net,security,paypal,trial,C#,Asp.net,Security,Paypal,Trial,我正在尝试使用以下功能实现PayPal订阅系统: 第一个月的应用服务将是完全免费的,之后用户将支付每月金额。 我编写了如下代码: BillingPeriodType periodType = BillingPeriodType.MONTH; switch (subs) { case("Month"): period
BillingPeriodType periodType = BillingPeriodType.MONTH;
switch (subs)
{
case("Month"):
periodType = BillingPeriodType.MONTH;
break;
case("Year"):
periodType = BillingPeriodType.YEAR;
break;
}
BasicAmountType paymentAmount = new BasicAmountType((CurrencyCodeType)EnumUtils.GetValue("USD", typeof(CurrencyCodeType)), subType.Price);
BillingPeriodType period = periodType;
BillingPeriodDetailsType paymentPeriod = new BillingPeriodDetailsType(period, 1, paymentAmount);
ScheduleDetailsType scheduleDetails = new ScheduleDetailsType();
/*Free trial period of 1 month for monthly sub*/
if (periodType == BillingPeriodType.MONTH)
{
scheduleDetails.TrialPeriod = new BillingPeriodDetailsType(BillingPeriodType.MONTH,1, new BasicAmountType((CurrencyCodeType)EnumUtils.GetValue("USD", typeof(CurrencyCodeType)), "0.01"));
scheduleDetails.TrialPeriod.TotalBillingCycles = 1;
}
else if (periodType == BillingPeriodType.YEAR)
{
scheduleDetails.TrialPeriod = new BillingPeriodDetailsType(BillingPeriodType.YEAR, 1, new BasicAmountType((CurrencyCodeType)EnumUtils.GetValue("USD", typeof(CurrencyCodeType)), "0.01"));
}
scheduleDetails.Description = "//Some description"
scheduleDetails.PaymentPeriod = paymentPeriod;
createRPProfileRequest.CreateRecurringPaymentsProfileRequestDetails.ScheduleDetails = scheduleDetails;
CreateRecurringPaymentsProfileReq createRPProfileReq = new CreateRecurringPaymentsProfileReq();
createRPProfileReq.CreateRecurringPaymentsProfileRequest = createRPProfileRequest;
这给我带来了巨大的安全隐患
So let's suppose user subscribes for monthly subscription and get 1 month for free...
This way, nothing stops the user to cancel the subscription the last day and then to re-subscribe once again and re-use the 1 month trial period for free...
目前,PayPal上的用户信息中,我只将ProfileID信息存储到数据库中
有没有什么有效的方法来查看用户是否在我的网站上使用了免费试用期
Also another security concern to me is that user can simply re-register with new account and subscribe once again under completely different ProfileID
你们怎么解决这个问题 我只是希望我没有误解你的问题: 为什么不将用户的PayPal电子邮件地址链接到注册帐户?在这种情况下,用户必须使用不同的paypal帐户,因此更容易避开这样的人
在用户注册时,用户应已提供其账单信息。包括他的PayPal电子邮件地址。Phillip,说得好,但如果用户向他的PayPal帐户添加多个电子邮件地址并将新地址更改为主地址,这是可能的吗=哦,我想那是不可能的。PayPal API没有提供唯一的用户信息吗?我相信是的,然后我必须检查他的名字和姓氏以及之前存在的订阅配置文件,看看他是否有试用期,没有?\如果你有唯一的用户标识,你可以很容易地避免他创建另一个帐户,在同一个帐户上,当然不可能进行第二次尝试。应该只有一个帐户具有相同的paypal用户标识。查看我的IPN日志,我看到payer_id,这是一个13位数的paypal id,我认为除了创建一个新的paypal帐户之外,它是无法更改的。如果他们打算为您的免费试用创建一个新的paypal帐户,我想您可以放心地知道您的服务真的很好: