'PAYEE_ACCOUNT_INVALID' error code

UnArbreSauvage
Contributor
Contributor

Hi,

I'm trying to make an application to buy games online. And I'm currently working on the payment page. I've implimented a PayPal to PayPal transactions successfully and now i'm working on to make a Credit Card to PayPal transactions. So I've made a front end page with all the inputs that I've needed : Card Number, Expiration Date and CVV. And I want that when I press on the buy button, the client send the card number, expiration date and cvv to an express api. Then when in the api, I make the payment such like the PayPal to PayPal method that I've used.

 

Here is my code Server code :

paypal.payment.create({
    intent: 'sale',
    payer: {
        payment_method: 'credit_card',
        funding_instruments: [{
            credit_card: {
                number: number,
                type: 'visa',
                expire_month: expireMonth,
                expire_year: expireYear,
                cvv2: cvv2,
                first_name: "John",
                last_name: "Doe"
            }
        }]
    },
    transactions: [{
        amount: {
            total: product.child('Price').val(),
            currency: "USD"
        },
        description: 'Payment desc.'
    }]
}, function (error, payment) {
    if (error) {
        console.log(error.response);
    } else {
        console.log('LTETT');
    }
});
 
and every time I'm trying to pay, the app send me the following error : 
{
name: 'PAYEE_ACCOUNT_INVALID',
message: 'Payee account is invalid.',
information_link: 'https://developer.paypal.com/docs/api/payments/v1/#error-PAYEE_ACCOUNT_INVALID',
debug_id: 'cd64907fda648',
httpStatusCode: 400
}
 
Can someone please help with this ?
Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.