退还授权交易时出现错误 10009

Posted

技术标签:

【中文标题】退还授权交易时出现错误 10009【英文标题】:error 10009 when refunding an authorized transaction 【发布时间】:2012-03-20 13:11:18 【问题描述】:

我有一个经过授权然后被捕获的贝宝交易。我想使用refundtransaction 的.net 代码退款,我有以下错误: You can not refund this type of transaction

Public Function RefundTransactionCode(ByVal refundType__1 As String, ByVal transactionId As String, ByVal amount As String, ByVal note As String, ByRef resp As RefundTransactionResponseType) As AckCodeType
        Dim caller As New CallerServices()

        Dim profile As IAPIProfile = ProfileFactory.createSignatureAPIProfile()
        '
        '            WARNING: Do not embed plaintext credentials in your application code.
        '            Doing so is insecure and against best practices.
        '            Your API credentials must be handled securely. Please consider
        '            encrypting them for use in any production environment, and ensure
        '            that only authorized individuals may view or modify them.
        '            


        ' Set up your API credentials, PayPal end point, and API version.
        profile.APIUsername = AppSettings("APIUsername")
        profile.APIPassword = AppSettings("APIPassword")
        profile.APISignature = AppSettings("APISignature")
        profile.Environment = AppSettings("Environment")
        caller.APIProfile = profile
        ' Create the request object.
        Dim concreteRequest As New RefundTransactionRequestType()
        concreteRequest.Version = "51.0"

        ' Add request-specific fields to the request.
        ' If (amount IsNot Nothing AndAlso amount.Length > 0) AndAlso (refundType__1.Equals("Partial")) Then

        Dim amtType As New BasicAmountType()
        amtType.Value = amount
        amtType.currencyID = CurrencyCodeType.CAD
        concreteRequest.Amount = amtType
        concreteRequest.RefundType = RefundType.Full
        ' Else
        'MsgBox(0)
        'concreteRequest.RefundType = RefundType.Full
        ' End If
        concreteRequest.RefundTypeSpecified = True
        concreteRequest.TransactionID = transactionId
        concreteRequest.Memo = note

        ' Execute the API operation and obtain the response.
        '   Dim pp_response As New RefundTransactionResponseType()
        resp = DirectCast(caller.[Call]("RefundTransaction", concreteRequest), RefundTransactionResponseType)
        Return resp.Ack

    End Function

【问题讨论】:

这不是编码错误,更多的是与事务有关。我建议通过paypal.com/mts 联系 PayPal 商家技术服务 【参考方案1】:

我建议在您的 PayPal 帐户中查找交易并查看它。它可能是授权、订单、待处理交易或其他类型的交易。

您只能对已发送至您代表发送 API 的帐户*且尚未退款的捕获/销售进行退款。


*

    第三方 API 调用(您在 API 参数中使用“主题”以及用户名、密码和签名/证书)是代表“主题”帐户发送 API 调用。 第一方 API 调用是您不发送主题的地方,只使用您自己的 API 用户、通行证和 sig/cert

【讨论】:

我的交易类型是授权 您无法退还授权。您可以将其作废,但没有资金被占用,因此无需“重新”为买方提供资金;买家已经“获得资金”。只是为了好玩,''''''''。 @khs,我很高兴接受我的答案作为正确答案。谢谢。

以上是关于退还授权交易时出现错误 10009的主要内容,如果未能解决你的问题,请参考以下文章

密码更新时出现未经授权的错误

添加授权标头时出现CORS错误

尝试授权脚本时出现错误:未授权客户端

QuickBlox 有时会在登录时出现未经授权的错误。为啥?

将 iOS 版本上传到应用中心时出现 icloud 授权错误

使用 Fabric SDK 从 Twitter 授权中取消时出现授权错误