简体   繁体   English

付款错误:PayPal错误:请求无效。查看详细信息。 (VALIDATION_ERROR)Paypal

[英]Payment error: PayPal error: Invalid request. See details. (VALIDATION_ERROR) Paypal

I'm working with PayPal recurring payments in my project. 我在我的项目中使用PayPal定期付款。 And I want to give one free trial for some amount of time period, and initial order total should be zero, once free trial has completed the actual amount of order will be deducted from account. 而且我想在一段时间内给予一次免费试用,初始订单总数应该为零,一旦免费试用完成,实际的订单金额将从账户中扣除。

For instance, user purchase one product($100 USD) and apply discount code for free trial then first order should be placed with $0 USD, once trial over, $100 USD cycle will running up. 例如,用户购买一个产品(100美元)并应用折扣代码免费试用,然后第一个订单应该以0美元,一旦试用结束,100美元周期将运行。

For that I'm passing "0" to setup_fee in MerchantPreferences : 为此我在MerchantPreferences setup_fee “0”传递给setup_fee

merchant_preferences = new MerchantPreferences
{
    return_url = url,
    cancel_url = url,
    auto_bill_amount = "YES",
    setup_fee = new PayPal.Api.Currency
    {
        currency = currency != null ? currency.CurrencyCode : null,
        value = "0.00"
    }
}

But it gives me an error: 但它给了我一个错误:

Payment error: PayPal error: Invalid request. 付款错误:PayPal错误:请求无效。 See details. 查看详细信息。 (VALIDATION_ERROR) (VALIDATION_ERROR)
Payment error: note Note is missing from the request or Note length is too long 付款错误:注意请求中缺少注释或注释长度太长
Payment error: amount.currency Required field is missing. 付款错误:amount.currency缺少必填字段。

If I pass some values instead of 0.00 it's working properly, but I want to send zero as initial amount. 如果我传递一些值而不是0.00它正常工作,但我想发送零作为初始量。

Can anyone tell me what's wrong with my code? 谁能告诉我我的代码有什么问题?

The errors describe a missing 'Note' parameter and an invalid 'currency'. 错误描述了缺少的“Note”参数和无效的“货币”。 Have you checked that you are not sending a null value for currency , or skipping sending the Note parameter, when the value is 0 ? 您是否检查过您没有为currency发送null值,或者当值为0时跳过发送Note参数? It seems possible from your code, that if either currency is null or currency.CurrencyCode is null , you are sending a null value where PayPal does not allow this. 从您的代码中可以看出,如果任一currencynullcurrency.CurrencyCodenull ,则您发送的null值为PayPal不允许的值。

On a side note, I know that many financially driven sites work with a deposit value of ~1 cent, rather than 0, to verify that money is properly transferred. 另一方面,我知道许多财务驱动的网站使用的存款价值约为1美分而不是0美元,以验证资金是否正确转移。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:PayPal:必须提供支持:付款 - ERROR: PayPal: Prop is required: payment Paypal定期付款交易错误:11502:令牌无效 - Paypal Recurring Payment Transaction Error: 11502 : Token is invalid 无法获得REST请求响应的实际错误。 Fiddler向我展示了更多错误细节。 在.NET中,我得到的是500 - 内部服务器错误 - Can't get actual error in response for REST request. Fiddler shows me more error details. In .NET all I get is 500 - Internal Server Error 使用PayPal执行直接付款接收错误 - Using PayPal Do Direct Payment recieving error 贝宝:创建付款时发生内部服务器错误 - PayPal: Internal Server Error on Create Payment 数据实体错误“更新条目时出错。 有关详细信息,请参阅内部异常。” - Data Entity error “An error occurred while updating the entries. See the inner exception for details.” 将json参数传递给WCF函数,并给出错误消息“服务器在处理请求时遇到错误。 请参阅服务器日志以获取更多详细信息” - passing json parameters to WCF function giving error “The server encountered an error processing the request. See server logs for more details” 更新条目时发生错误。 有关详细信息,请参阅内部异常 - Linq to Entity - An error occurred while updating the entries. See the inner exception for details. - Linq to Entity '执行命令定义时出错。 有关详细信息,请参阅内部异常。 - 'An error occurred while executing the command definition. See the inner exception for details.' 更新数据库“更新条目时发生错误。有关详细信息,请参阅内部异常。” - Update-database "An error occurred while updating the entries. See the inner exception for details."
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM