paypal-webapi

0.1.0 • Public • Published

Paypal-webapi

这里获取了部分代码,然后进行了一些封装。

install

npm install paypal-webapi

How to use

var Paypal = require("paypal-webapp");
var paypal = new Paypal();
paypal.init(clientid,secret);
//{total:10,currency:"USD",detail:"megeg"}
paypal.createPayment(data,cb);//创建订单
paypal.checkPayment(data,cb);//check订单

Notices

only 4 linux

流程图

Client		Your Server					Paypal Server
	|			|							|
	|			|---- getAccessToken------->|
	|			|							|
	|			|<----------accessToken-----|
	|--buy----->|							|
	|			|-------createPayment------>|
	|			|							|
	|			|<------returPaymentinfo----|
	|<--payuri--|							|
	|			|							|
	|------------deal the payment---------->|
	|			|							|
	|			|<--------payment orderid---|
	|			|							|
	|			|-------check payment------>|
	|			|							|
	|			|<------payment info -------|

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.01latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.01
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.31
0.0.20
0.0.10
0.0.00

Package Sidebar

Install

npm i paypal-webapi

Weekly Downloads

2

Version

0.1.0

License

ISC

Last publish

Collaborators

  • cavacn