SDKとAPIのヘルプページに基づいて、Payments.Create()
エンドポイントに送信するトランザクションのinvoice_number
プロパティを利用します。この取引は、PayPalからの返品返品の一部となります。つまり、OrderNumber(現在はinvoice_numberと呼ばれています)をAPIから取得することができます。
以下の行を見つけます。invoice_number = YOUR_ORDER_NUMBER
あなたのPayPalの要求:(taken from SDK Samples)
var apiContext = Configuration.GetAPIContext();
// A transaction defines the contract of a payment - what is the payment for and who is fulfilling it.
var transaction = new Transaction()
{
amount = new Amount(){...},
description = "This is the payment transaction description.",
item_list = new ItemList(){...},
//SET YOUR ORDER NUMBER HERE
invoice_number = YOUR_ORDER_NUMBER
};
// A resource representing a Payer that funds a payment.
var payer = new Payer(){...};
// A Payment resource; create one using the above types and intent as `sale` or `authorize`
var payment = new Payment()
{
intent = "sale",
payer = payer,
transactions = new List<Transaction>() { transaction }
};
this.flow.AddNewRequest("Create credit card payment", payment);
// Create a payment using a valid APIContext
var createdPayment = payment.Create(apiContext);
ペイパルからの応答(Taken From Here):