This is how I create PayPal payment.
var apiContext = GetApiContext(clientId, clientSecret); CreditCard creditCard = new CreditCard(); creditCard.number = "4877274905927862"; creditCard.type = "visa"; creditCard.expire_month = 11; creditCard.expire_year = 2018; creditCard.cvv2 = "874"; creditCard.first_name = firstName; creditCard.last_name = lastName; Amount amount = new Amount(); amount.total = "7.47"; amount.currency = "USD"; Transaction transaction = new Transaction(); transaction.amount = amount; transaction.description = "This is the payment transaction description."; List<Transaction> transactions = new List<Transaction>(); transactions.Add(transaction); FundingInstrument fundingInstrument = new FundingInstrument(); fundingInstrument.credit_card = creditCard; List<FundingInstrument> fundingInstruments = new List<FundingInstrument>(); fundingInstruments.Add(fundingInstrument); Payer payer = new Payer(); payer.funding_instruments = fundingInstruments; payer.payment_method = "credit_card"; Payment payment = new Payment(); payment.intent = "sale"; payment.payer = payer; payment.transactions = transactions; Payment createdPayment = payment.Create(apiContext); For payment.execute I need Payment Id and Payer Id. But payer id getting null Can you please tell me, How can I get payer Id? am I missing something?
credit cardsalerequest, you should already get a result fromCreate. IINMExecuteis forpaypalpayments.