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

Produce the module that is described in the readme #1

Closed
ogt opened this issue Mar 23, 2014 · 2 comments
Closed

Produce the module that is described in the readme #1

ogt opened this issue Mar 23, 2014 · 2 comments

Comments

@ogt
Copy link
Collaborator

ogt commented Mar 23, 2014

I'm offering $100.00 on oDesk for someone to do this task: https://www.odesk.com/jobs/~018bd754c57632c01c

Produce the module that is described in the readme

  • Make sure that you add a test. (not sure how this can be tested via travis... given that paypal does not provide facilties for public testing). Unless you find a way to use travis, your test should be using the paypal sandbox credentials.
  • Make sure that you follow the .jshintrc style - (if you have strong (different) preferences, feel free to adapt the .jshintrc file appropriately
  • You will need to do any necessary updates to the README.md

Budget : 100
Skills : node.js javascript github
Questions : 
  - Name two of the popular node modules for paypal
  - What is your github username
  - How many hours do you think this project is going to take
@anorsich
Copy link
Owner

As I know to pay to someones email you have to use paypal adaptive payments which is not yer supported by paypal rest. To achieve what you want you have to use paypal classic sdk -> https://github.com/Ideame/paypal-adaptive-sdk-nodejs.

Here is sample implementation:

var config = require('./../../config');
var Paypal = require('paypal-adaptive');

var paypalSdk = new Paypal({
    userId:    config.paypal.classicApi.userId,
    password:  config.paypal.classicApi.password,
    signature: config.paypal.classicApi.signature,
    sandbox:   config.paypal.classicApi.isSandbox
});

function withdraw(amount, userEmail, callback) {
    var payload = {
        requestEnvelope: {
            errorLanguage:  'en_US'
        },
        actionType:     'PAY',
        currencyCode:   'USD',
        feesPayer:      'EACHRECEIVER',
        memo:           'Memo goes here',
        cancelUrl:      "http://fake.com", //we no need cancel url for withdrawals from our account
        returnUrl:       "http://fake.com",//we no need return url for withdrawals from our account
        senderEmail:    config.paypal.email,
        receiverList: {
            receiver: [
                {
                    email:  userEmail,
                    amount: amount
                }
            ]
        }
    };

    paypalSdk.pay(payload, function (err, response) {
       callback(err, response);
    });
}

@ogt
Copy link
Collaborator Author

ogt commented Mar 23, 2014

Hi @anorsich , and thank you for your reply.
I guess there is not much difference between using the rest and the sdk modules... I liked the rest modules, because they didn't require the passing of userId/password as part of the setup - but using the classic sdk would be just fine as well (not sure what is the signature parameter that is required in the sample code you have pasted).

So, are you interested to do the project?

I understand that there is little to be done yet beyond the sample implementation you have pasted above, still if you are interested I can pay you $100, via the odesk contract, and you will do all the necesary work so as the corresponding module is "npm ready". (and answer any question I might have regarding its use)

Also, there are also a couple more similar node modules that I need, that I would rather someone owning the implementation - and I prefer to keeping them open source

Finally, how did you find this - I don't see you as a candidate in the odesk job...

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

No branches or pull requests

2 participants