# online-payment-api

OnlinePaymentApi - JavaScript client for online-payment-api
\u5728\u7EBF\u652F\u4ED8
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-04-26T05:43:01.891Z
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/),
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install online-payment-api --save
```

#### git
#
If the library is hosted at a git repository, e.g.
https://github.com/YOUR_USERNAME/online-payment-api
then install it via:

```shell
npm install YOUR_USERNAME/online-payment-api --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var OnlinePaymentApi = require('online-payment-api');

var api = new OnlinePaymentApi.ToPayApi()

var token = "token_example"; // {String} \u7528\u6237\u4EE4\u724C.

var payChannel = "payChannel_example"; // {String} \u652F\u4ED8\u6E20\u9053 1:\u5FAE\u4FE1 2:\u652F\u4ED8\u5B9D 3:\u94F6\u8054.

var payType = "payType_example"; // {String} \u652F\u4ED8\u7C7B\u578B 1:web 2:app 3:wap.

var subject = "subject_example"; // {String} \u5546\u54C1\u63CF\u8FF0.

var payFee = "payFee_example"; // {String} \u652F\u4ED8\u91D1\u989D.

var notifyUrl = "notifyUrl_example"; // {String} \u652F\u4ED8\u5F02\u6B65\u901A\u77E5\u5730\u5740(\u901A\u77E5\u56DE\u8C03\u5730\u5740\u4E0D\u80FD\u643A\u5E26\u53C2\u6570).

var opts = { 
  'openid': "openid_example", // {String} \u5FAE\u4FE1openid.
  'ip': "ip_example", // {String} \u7528\u6237IP\u5FAE\u4FE1\u652F\u4ED8\u65F6\u5FC5\u586B.
  'returnUrl': "returnUrl_example" // {String} \u652F\u4ED8\u540C\u6B65\u901A\u77E5\u5730\u5740(\u901A\u77E5\u56DE\u8C03\u5730\u5740\u4E0D\u80FD\u643A\u5E26\u53C2\u6570).
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.onlinePaymentToPayPost(token, payChannel, payType, subject, payFee, notifyUrl, opts, callback);

```

## Documentation for API Endpoints

All URIs are relative to *http://115.159.113.37:15400/*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*OnlinePaymentApi.ToPayApi* | [**onlinePaymentToPayPost**](docs/ToPayApi.md#onlinePaymentToPayPost) | **POST** /onlinePayment/toPay | \u8C03\u7528\u652F\u4ED8
*OnlinePaymentApi.ToQueryApi* | [**onlinePaymentToQueryPost**](docs/ToQueryApi.md#onlinePaymentToQueryPost) | **POST** /onlinePayment/toQuery | \u67E5\u8BE2\u8BA2\u5355
*OnlinePaymentApi.ToRfundApi* | [**onlinePaymentToRefundPost**](docs/ToRfundApi.md#onlinePaymentToRefundPost) | **POST** /onlinePayment/toRefund | \u8C03\u7528\u9000\u6B3E


## Documentation for Models

 - [OnlinePaymentApi.ToPay](docs/ToPay.md)
 - [OnlinePaymentApi.ToQuery](docs/ToQuery.md)
 - [OnlinePaymentApi.ToRefund](docs/ToRefund.md)


## Documentation for Authorization

 All endpoints do not require authorization.

