Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
paypal-ece
Advanced tools
Readme
A simple API wrapper for PayPal's Express Checkout.
A simple API wrapper which assists you through all the payment processes. This specific version was modified to allow PayPal's Express Checkout.
Checkout package.json
for dependencies.
Install paypal-ec through npm
npm install paypal-ece
Require the module before using
var PayPalEC = require( 'paypal-ece' );
Create a new PayPalEC object.
cred
type: Object
desc: the credential required to make an API call.
opts
type: Object
desc: the options like sandbox and version.
Make a SetExpressCheckout
API call to PayPal.
params
type: Object
desc: Contains all the payment information.
callback
type: Function
desc: Callback function to get called when done.
Make a GetExpressCheckoutDetails
API call to PayPal.
params
type: Object
desc: Contains the token for the payment.
callback
type: Function
desc: Callback function to get called when done.
Make a DoExpressCheckoutPayment
API call to PayPal.
params
type: Object
desc: Contains the token and all the payment information.
callback
type: Function
desc: Callback function to get called when done.
Make a DoCapture
API call to PayPal.
params
type: Object
desc: Contains the token and all the payment information.
callback
type: Function
desc: Callback function to get called when done.
Make a DoVoid
API call to PayPal.
params
type: Object
desc: Contains the token and all the payment information.
callback
type: Function
desc: Callback function to get called when done.
Make a DoReauthorization
API call to PayPal.
params
type: Object
desc: Contains the token and all the payment information.
callback
type: Function
desc: Callback function to get called when done.
Make a DoAuthorization
API call to PayPal.
params
type: Object
desc: Contains the token and all the payment information.
callback
type: Function
desc: Callback function to get called when done.
var cred = {
username : 'seller_1339472528_biz_api1.gmail.com',
password : '1339472553',
signature : 'AFcWxV21C7fd0v3bYYYRCpSSRl31Af-aECo8vsiP1HospgIyBCFncbx3'
};
var opts = {
sandbox : true,
version : '78.0'
};
var PayPalEC = require( 'paypal-ec' );
var ec = new PayPalEC( cred, opts );
var params = {
returnUrl : 'http://localhost:3000/confirm',
cancelUrl : 'http://localhost:3000/cancel',
SOLUTIONTYPE : 'sole',
PAYMENTREQUEST_0_AMT : '10.0',
PAYMENTREQUEST_0_DESC : 'Something',
PAYMENTREQUEST_0_CURRENCYCODE : 'USD',
PAYMENTREQUEST_0_PAYMENTACTION : 'Sale',
};
ec.set( params, function ( err, data ){
// data[ 'PAYMENTURL' ] is the payment url which
// you should redirect your user to
});
// NOTE: you must set another `params` with the token
// you just get from PayPal
ec.get_details( params, function ( err, data ){
// data contains all the payment details, let your
// user confirm this information
});
// NOTE: set the `params` to contain both the token
// and all the payment information
ec.do_payment( params, function ( err, data ){
// really charge the user for the payment
});
Make a DoCapture
API call to PayPal.
params
type: Object
desc: Contains the authorization id and capture information.
callback
type: Function
desc: Callback function to get called when done.
Checkout the
example
folder for the example app.
(The MIT License)
Copyright (c) 2012 dreamerslab <mason@dreamerslab.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
An API wrapper for PayPal's Express Checkout with checkoutnow.
The npm package paypal-ece receives a total of 0 weekly downloads. As such, paypal-ece popularity was classified as not popular.
We found that paypal-ece demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.