PayPal.Api.Payment.Get C# (CSharp) Method

Get() public static method

Shows details for a payment, by ID.
public static Get ( APIContext apiContext, string paymentId ) : Payment
apiContext APIContext APIContext used for the API call.
paymentId string The ID of the payment for which to show details.
return Payment
        public static Payment Get(APIContext apiContext, string paymentId)
        {
            // Validate the arguments to be used in the request
            ArgumentValidator.ValidateAndSetupAPIContext(apiContext);
            ArgumentValidator.Validate(paymentId, "paymentId");

            // Configure and send the request
            var pattern = "v1/payments/payment/{0}";
            var resourcePath = SDKUtil.FormatURIPath(pattern, new object[] { paymentId });
            return PayPalResource.ConfigureAndExecute<Payment>(apiContext, HttpMethod.GET, resourcePath);
        }