2012-03-02 4 views
2

私は承認されたPaypal取引を持っています。私は、私は次のエラーを持っているrefundtransactionの.NETコードを使用して、それを返金します: You can not refund this type of transaction正当な取引を払い戻しする際のエラー10009

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 
+1

これは、コーディングエラーではありませんが、取引を行うにはもっと何かしていないところです。 PayPal加盟店テクニカルサービス(https://www.paypal.com/mts/) – Robert

答えて

1

私はPayPalアカウントにトランザクションを見つけ、それを見て助言します。おそらく、承認、注文、保留中のトランザクション、または他のタイプのトランザクションです。

*の代わりにAPIを送信しているアカウントに送信された、払い戻し済みの払い戻しのみが可能です。ユーザー名、パスワード、および署名/証明書と一緒にあなたのAPIのパラメータに「件名」を使用し


*

  1. サードパーティのAPI呼び出し、あなたはに代わってAPI呼び出しを送信しています被験者のアカウント
  2. ファーストパーティのAPI呼び出しを使用すると、件名を送って、そして唯一の独自のAPIのユーザーを使用して、パス、およびSIG/CERT
+0

にお問い合わせください。私の取引タイプはAuthority –

+1

です。払い戻しはできません。あなたはそれを無効にすることができますが、資金が取られていないので、買い手に資金を再払う必要はありません。バイヤーはすでに「資金提供」されています。ちょうど楽しみのために、 '' '' '' ''。 – SgtPooki

+0

@khs、私は正解として私の答えを受け入れることに感謝します。ありがとう。 – SgtPooki

関連する問題