Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
Merge 1.5.1 release
  • Loading branch information
avidas committed Mar 3, 2015
2 parents dabe423 + c75f788 commit cd3072f
Show file tree
Hide file tree
Showing 26 changed files with 497 additions and 47 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ lib-cov
*.out
*.pid
*.gz
*.tmp

pids
logs
Expand Down
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ node_js:
- "0.6"
after_script:
- mocha -t 60000 --require blanket --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
after_success:
- if [ $TRAVIS_NODE_VERSION = '0.10' ] && [ $TRAVIS_BRANCH = 'master' ] && [ $TRAVIS_PULL_REQUEST = 'false' ]; then sh generate-doc.sh; fi
matrix:
allow_failures:
- node_js: "0.10"
- node_js: "0.8"
- node_js: "0.6"
env:
global:
secure: DRZ5WrdkT0dWqdk9snXGqTBjlbwxaBS/m8O9YQoGgFGu8UnZ3Cuy8FymOKUCTukMxfzDRG/7srg/03Ife9IsIMYv/rQ8kRZA0OBqrWgxy6ZSyY+qtUKZjyqKKgjnmgzvZtoGJo6ZHKks/GcaWzLeWs9znZ+ZsKV2CvArxBd1Fn4=
14 changes: 13 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,29 @@ module.exports = function (grunt) {
all: {
src: 'test/*.js'
}
},
jsdoc : {
dist : {
src: ['lib/*'],
jsdoc: './node_modules/.bin/jsdoc',
options: {
destination: 'docs/jsdoc/',
configure: './node_modules/jsdoc/conf.json',
template: './node_modules/ink-docstrap/template'
}
}
}
});

// Load grunt tasks from npm packages
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-jsdoc');

// Test task
grunt.registerTask("test", ["simplemocha"]);

// Default task.
grunt.registerTask("default", ["jshint", "simplemocha"]);

};
};
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ To write an app using the SDK
})
```

* For creating [Subscription Payments](https://developer.paypal.com/docs/integration/direct/create-billing-plan/), check out the [samples](/samples/subscription) for creating planned sets of future recurring payments at periodic intervals.

* To create [Future Payments](https://developer.paypal.com/docs/integration/mobile/make-future-payment/), check out this [sample](/samples/payment/create_future_payment.js) for executing future payments for a customer who has granted consent on a mobile device.

* For [exploring additional payment capabilites](https://developer.paypal.com/docs/integration/direct/explore-payment-capabilities/), such as handling discounts, insurance, soft_descriptor and invoice_number, have a look at this [example](/samples/payment/create_with_paypal_further_capabilities.js). These bring REST payment functionality closer to parity with older Merchant APIs.

* Customizing a [PayPal payment experience](https://developer.paypal.com/webapps/developer/docs/integration/direct/rest-experience-overview/) is available as of version 1.1.0 enabling merchants to provide a customized experience to consumers from the merchant’s website to the PayPal payment. Get started with the [supported rest methods](https://developer.paypal.com/webapps/developer/docs/api/#payment-experience) and [samples](/samples/payment_experience/web_profile).

* For creating and managing [Orders](https://developer.paypal.com/webapps/developer/docs/integration/direct/create-process-order/#create-the-order), i.e. getting consent from buyer for a purchase but only placing the funds on hold when the merchant is ready to fulfill the [order](https://developer.paypal.com/webapps/developer/docs/api/#orders), have a look at [samples](/samples/order).

* For creating [batch and single payouts](https://developer.paypal.com/webapps/developer/docs/integration/direct/payouts-overview/), check out the samples for [payouts](/samples/payout) and [payout items](/samples/payout_item). The [Payouts feature](https://developer.paypal.com/webapps/developer/docs/api/#payouts) enables you to make PayPal payments to multiple PayPal accounts in a single API call.

* For [Invoicing](https://developer.paypal.com/webapps/developer/docs/api/#invoicing), check out the [samples](/samples/invoice/) to see how you can use the node sdk to create, send and manage invoices.

* To receive [notifications from PayPal about Payment events](https://developer.paypal.com/webapps/developer/docs/api/#notifications) on your server, webhook support is now available as of version 1.2.0. For creating and managing [Webhook and Webhook Events](https://developer.paypal.com/webapps/developer/docs/integration/direct/rest-webhooks-overview/), check out the [samples](/samples/notifications/) to see how you can use the node sdk to manage webhooks, webhook events and [verify](/samples/notifications/webhook-events/webhook_payload_verify.js) that the response unaltered and is really from PayPal.

* To use OpenID Connect

```js
Expand Down Expand Up @@ -89,26 +105,11 @@ To write an app using the SDK
// Logout url
paypal.openIdConnect.logoutUrl("Replace with tokeninfo.id_token");
```
* For creating [Subscription Payments](https://developer.paypal.com/docs/integration/direct/create-billing-plan/), check out the [samples](/samples/subscription) for creating planned sets of future recurring payments at periodic intervals.

* To create [Future Payments](https://developer.paypal.com/docs/integration/mobile/make-future-payment/), check out this [sample](/samples/payment/create_future_payment.js) for executing future payments for a customer who has granted consent on a mobile device.

* For [exploring additional payment capabilites](https://developer.paypal.com/docs/integration/direct/explore-payment-capabilities/), such as handling discounts, insurance, soft_descriptor and invoice_number, have a look at this [example](/samples/payment/create_with_paypal_further_capabilities.js). These bring REST payment functionality closer to parity with older Merchant APIs.

* Customizing a [PayPal payment experience](https://developer.paypal.com/webapps/developer/docs/integration/direct/rest-experience-overview/) is available as of version 1.1.0 enabling merchants to provide a customized experience to consumers from the merchant’s website to the PayPal payment. Get started with the [supported rest methods](https://developer.paypal.com/webapps/developer/docs/api/#payment-experience) and [samples](/samples/payment_experience/web_profile).

* For creating and managing [Orders](https://developer.paypal.com/webapps/developer/docs/integration/direct/create-process-order/#create-the-order), i.e. getting consent from buyer for a purchase but only placing the funds on hold when the merchant is ready to fulfill the [order](https://developer.paypal.com/webapps/developer/docs/api/#orders), have a look at [samples](/samples/order).

* For creating [batch and single payouts](https://developer.paypal.com/webapps/developer/docs/integration/direct/payouts-overview/), check out the samples for [payouts](/samples/payout) and [payout items](/samples/payout_item). The [Payouts feature](https://developer.paypal.com/webapps/developer/docs/api/#payouts) enables you to make PayPal payments to multiple PayPal accounts in a single API call.

* For [Invoicing](https://developer.paypal.com/webapps/developer/docs/api/#invoicing), check out the [samples](/samples/invoice/) to see how you can use the node sdk to create, send and manage invoices.

* To receive [notifications from PayPal about Payment events](https://developer.paypal.com/webapps/developer/docs/api/#notifications) on your server, webhook support is now available as of version 1.2.0. For creating and managing [Webhook and Webhook Events](https://developer.paypal.com/webapps/developer/docs/integration/direct/rest-webhooks-overview/), check out the [samples](/samples/notifications/) to see how you can use the node sdk to manage webhooks, webhook events and [verify](/samples/notifications/webhook-events/webhook_payload_verify.js) that the response unaltered and is really from PayPal.

## Running Samples
Instructions for running samples are located in the [sample directory](https://github.com/Runnable/PayPal-node-SDK/tree/master/samples). Try these samples in a live sandbox environment:
Instructions for running samples are located in the [sample directory](/samples). Try these samples in a live sandbox environment:

<a href="https://runnable.com/paypal" target="_blank"><img src="https://runnable.com/external/styles/assets/runnablebtn.png" style="width:67px;height:25px;"></a>
<a href="http://runnable.com/paypal" target="_blank"><img src="http://runnable.com/external/styles/assets/runnablebtn.png" style="width:67px;height:25px;"></a>

## Running Tests
To run the test suite first invoke the following command within the repo
Expand Down
26 changes: 26 additions & 0 deletions docs/conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"tags": {
"allowUnknownTags": true
},
"source": {
"includePattern": ".+\\.js(doc)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"plugins": [],
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"outputSourceFiles": true
},
"systemName" : "PayPal Node SDK",
"footer" : "",
"copyright" : "PayPal Copyright © 2013-2015",
"navType" : "inline",
"theme" : "yeti",
"outputSourceFiles": true,
"linenums" : true,
"collapseSymbols" : false,
"inverseNav" : true
}
}
118 changes: 118 additions & 0 deletions docs/cover.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}

body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}

.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}

/* Footer
--------------------------------------------------- */
.footer-links, .footer-links li {
display: inline-block;
font-size: 110%;
padding-left: 0;
padding-right: 0;
}

.footer-links li {
padding-top: 5px;
padding-left: 5px;
}

.footer-links a {
color: #428bca;
}

/* Custom CSS
--------------------------------------------------- */
.body-content {
margin: 0;
padding: 0;
}

body {
font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
background: #fff url("https://www.paypalobjects.com/webstatic/developer/banners/Braintree_desktop_BG_2X.jpg") repeat-y top right;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

.content {
margin-top: 30px;
}

.content .col-md-4 .well {
min-height: 175px;
background-color: #FDFDFD;
border: 1px solid;
}

.content .col-md-4 .sprite {
width: 60px;
height: 70px;
}
.content .col-md-4 .sprite {
float: left;
margin: 0 5px 0 0;
}

.content .col-md-4 .box {
float: left;
width: 75%;
}
.content .col-md-4 .box h3 {
color: #428bca;
font-size: 24px;
margin: 5px;
}

.content a:hover .col-md-4 .box h3{
color: #23527c;
}

.content a:hover .col-md-4 .well{
background-color: #f5f5f5;
}

.content .col-md-4 .box hr {
margin: 0;
}


.content a:hover {
text-decoration: none
}

.content a:hover .mobile {
background-position: -90px -124px
}

.content a:hover .api {
background-position: -90px -234px
}

.content a:hover .sandbox {
background-position: -90px -344px
}

.content .col-md-4 .box p {
margin: 5px;
color: #666;
display: block;
}
128 changes: 128 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="https://www.paypalobjects.com/webstatic/icon/favicon.ico">
<title>PayPal Node SDK - Welcome</title>
<!-- Bootstrap core CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<!-- Custom styles for this template -->
<link href="cover.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body>
<div class="container-fluid body-content">
<div class="row-fluid header">
<img src="https://raw.githubusercontent.com/wiki/paypal/PayPal-PHP-SDK/images/homepage.jpg"
class="img-responsive">
</div>
<div class="container content">
<div class="row-fluid">
<h2>// PayPal Node SDK <a href="https://github.com/paypal/PayPal-Node-SDK" title="Github Repository"><i class="fa fa-github"></i></a></h2><hr />
<p class="lead">
PayPal Node SDK is our official Open-Source Node.js SDK for supporting PayPal Rest APIs. Checkout all the supporting documents, samples, codebase from the following links
</p>
</div><br /><br />
<div class="row-fluid">
<a href="https://github.com/paypal/PayPal-node-SDK/issues">
<div class="col-md-4">
<div class="well clearfix">
<div class="sprite"><i class="fa fa-exclamation-triangle fa-4x"></i></div>
<div class="box"><h3>Node SDK Issues</h3>
<hr/>
<p> Report any issues you are having with SDK and view past issues</p>
</div>
</div>
</div>
</a>
<a href="http://paypal.github.io/PayPal-node-SDK/jsdoc/global.html">
<div class="col-md-4">
<div class="well clearfix">
<div class="sprite"><i class="fa fa-code fa-4x"></i></div>
<div class="box"><h3>Node JsDoc</h3>
<hr/>
<p> Check out Node Source Documentation, to see the internals of Node SDK. </p></div>
</div>
</div>
</a>
<a href="https://github.com/paypal/PayPal-node-SDK/tree/master/samples">
<div class="col-md-4">
<div class="well clearfix">
<div class="sprite"><i class="fa fa-terminal fa-4x"></i></div>
<div class="box"><h3>Sample Codes</h3>
<hr/>
<p> Check out the sample code for using SDKs to call all PayPal APIs. </p></div>
</div>
</div>
</a>
</div>
<div class="row-fluid clearfix">
<a href="https://developer.paypal.com/webapps/developer/docs/api/">
<div class="col-md-4">
<div class="well clearfix">
<div class="sprite"><i class="fa fa-paypal fa-4x"></i></div>
<div class="box"><h3>PayPal API Reference</h3>
<hr/>
<p> Checkout the Official PayPal REST API Reference, explaining all API Models</p></div>
</div>
</div>
</a>
<a href="https://github.com/paypal/PayPal-Node-SDK/releases">
<div class="col-md-4">
<div class="well clearfix">
<div class="sprite"><i class="fa fa-tags fa-4x"></i></div>
<div class="box"><h3>Node SDK Releases</h3>
<hr/>
<p>Download the latest Node SDK Release</p></div>
</div>
</div>
</a>
<a href="https://github.com/paypal/rest-api-sample-app-nodejs">
<div class="col-md-4">
<div class="well clearfix">
<div class="sprite"><i class="fa fa-shopping-cart fa-4x"></i></div>
<div class="box"><h3>Sample Application</h3>
<hr/>
<p>Explore a Pizza Store developed using PayPal Node SDK</p></div>
</div>
</div>
</a>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="footer-div">
<ul class="footer-links">
<li>
<a href="https://github.com/paypal/PayPal-Node-SDK" target="_blank"><i
class="fa fa-github"></i>
Github</a></li>
<li>
<a href="https://developer.paypal.com/webapps/developer/docs/api/" target="_blank"><i
class="fa fa-book"></i> REST API Reference</a>
</li>

</ul>
</div>
</div>
</footer>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
</body>
</html>
Loading

0 comments on commit cd3072f

Please sign in to comment.