Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid TransactionID #14

Open
MarcDiprose67 opened this issue Sep 2, 2016 · 0 comments
Open

Invalid TransactionID #14

MarcDiprose67 opened this issue Sep 2, 2016 · 0 comments

Comments

@MarcDiprose67
Copy link

MarcDiprose67 commented Sep 2, 2016

OK, I have been referred here by technical support at paypal, the cannot help me - I am trying to make a chained payment and at first I was receiveng an error for missing trasnsactionID, paykey or trackingID - I dont have a paykey as this is my first call, to attempt to make the payment - herewith the details (I renamed my object to paypalAdaptive as I already have a paypal object in the app).

This is using test payloads from the Github page but I still keep getting the error about the trackingID - I must have the tracking ID in the correct place, as it is finding it and rejecting it.

I can't use PayKey for anything as I cant get that back until I get a correct response - unless I am missing something I should be doing before sending the payload? But the documentation doesnt show this.

I tried a more complex trackingId but still get this,

{"responseEnvelope":{"timestamp":"2016-08-30T07:48:01.180-07:00","ack":"Failure","correlationId":"e5e6d3cbf948","build":"24003818"},"error":[{"errorId":"579051","domain":"PLATFORM","subdomain":"Application","severity":"Error","category":"Application","message":"The trackingId Lesson_400_187106 is invalid","parameter":["Lesson_400_187106"]}],"httpStatusCode":200}

So this is my current code:

var PaypalAdaptive = require('paypal-adaptive');

var paypalSdk = new PaypalAdaptive({
userId: 'm._g',
password: '
__',
signature: '_****',
appId: 'APP-80W284485P519543T',
requestFormat: 'JSON',
sandbox: true //defaults to false
});

(no problem there now)

Then this code build the payload:

var payload = {
requestEnvelope: {
errorLanguage: 'en_US'
},
actionType: 'PAY',
currencyCode: 'USD',
trackingId: 'Lesson-400-'+Math.floor(100000+(Math.random()*100000)),
feesPayer: 'PRIMARYRECEIVER',
memo: 'Chained payment example',
cancelUrl: 'https://'+localSubdomain+'.'+req.topLevelDomain+'/cancelPayment',
returnUrl: 'https://'+localSubdomain+'.'+req.topLevelDomain+'/confirmPayment',
receiverList: {
receiver: [
{
email: '[email protected]',
amount: '2.00',
primary:'true'
},
{
email: '[email protected]',
amount: '8.00',
primary:'false'
}
]
}
};

PAYLOAD IS THEN:
{"requestEnvelope":{"errorLanguage":"en_US"},"actionType":"PAY","currencyCode":"USD","trackingId":"Lesson_400_191981","feesPayer":"PRIMARYRECEIVER","memo":"Chained payment example","cancelUrl":"https://_com/cancelPayment","returnUrl":"https://_.com/confirmPayment","receiverList":{"receiver":[{"email":"[email protected]","amount":"2.00","primary":"true"},{"email":"[email protected]","amount":"8.00","primary":"false"}]}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant