Closed TiagoPortfolio closed 10 years ago
Hi!
Unfortunately I have very little time to look into this right now, but from taking a quick look at your code, the PROFILESTARTDATE
looks suspicious as its a date from the past which could cause the error. Take a look at the error
message and let me know what you find out.
Also, make sure that the unit tests pass in your environment to make sure that PayPal hasnt changed anything on their side.
Thank you!
I assigned startdate
to PROFILESTARTDATE
and everything is fine.
I'm using node-inspector to debug my code to try to figure out what error is catched but the only information i can get about the error is error ="true"
...
Dont know if it helps but data = null
Open the lib/Paypal.coffee
file and edit line 153 from:
return callback err ? true, null if response["ACK"] isnt "Success"
To:
return callback err ? true, response if response["ACK"] isnt "Success"
And let me know what is returned back to you when invoking the createSubscription
method.
First of all let me say that I am using nodejs
and I took your example.coffee
and converted it to example.js
and I run it with node example.js
. Hope there's no problem with that.
I edited Paypal.coffee
but im not sure I did what you wanted but here it is a screenshot with local variables:
Again: data = null
, err=true
Thanks for your help.
I just figured out what was wrong. I was doing bad ternary conditions because I translated all the Coffee-Script code into Javascript and that wasn't easy.
I have the source in Javascript, I think you should share the Javascript with Node.js version because, in my opinion, it is more popular than Coffee-Script. I can give you the code if you want! Anyway thanks for the support and good work!
Hi again,
Glad you got it working. It should be working out of the box without having to convert the source to pure javascript. Doesnt it?
In the meantime, please do share your working example file in pure Javascript and I'll include it as I am sure it will be helpful to more people out there.
Thanks!
Hi @jaybryant - firstly thanks for such a helpful package and even better docs! Saved me countless hours and I really do appreciate it.
I was just wondering why you wouldn't return the response
by default instead of null
? Wouldn't that be more intuitive? I'm quite new to all of this so this is more of a question to help me grasp the subject rather than telling you how you should be doing things :) Thanks in advance.
Hey, Here it is the piece of code where I am having trouble:
When I call paypal.createSubscription , error is always = true. Can you help me solve this problem?
Kudos, Tiago Sousa