Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 1.25 KB

README.md

File metadata and controls

56 lines (41 loc) · 1.25 KB

webpay-java Build Status

WebPay Java (1.6 and later) bindings https://webpay.jp

Installation

Maven users

<dependency>
  <groupId>jp.webpay</groupId>
  <artifactId>webpay-java</artifactId>
  <version>1.1.2</version>
</dependency>

Gradle users

dependencies {
  compile 'jp.webpay:webpay-java:1.1.2'
}

Usage

WebPayClient client = new WebPayClient("test_secret_YOUR_TEST_API_KEY");

CardRequest card = new CardRequest()
  .number("4242-4242-4242-4242")
  .expMonth(11)
  .expYear(2014)
  .cvc(123)
  .name("YOUR NAME");

ChargeRequest request = new ChargeRequest()
  .amount(400)
  .currency("jpy")
  .card(card)
  .description("アイテムの購入 with Java");

client.charges.create(request)

See WebPay Java API Document for more details.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request