我跟随Rest示例(PaymentWithCreditCard),我无法弄清楚如何获取实际的错误代码。
Payment pymnt = new Payment();
pymnt.intent = "sale";
pymnt.payer = payr;
pymnt.transactions = transactions;
try
{
APIContext apiContext = Configuration.GetAPIContext();
Payment createdPayment = pymnt.Create(apiContext);
catch (Exception Ex)
{
// how can I get the Error code??
}
如何将常规异常绑定到错误代码列表(https://developer.paypal.com/docs/classic/api/errorcodes/)?
感谢。