All Projects → zold-io → java-api

zold-io / java-api

Licence: MIT license
Zold Java API

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to java-api

Interledger Rs
An easy-to-use, high-performance Interledger implementation written in Rust
Stars: ✭ 155 (+675%)
Mutual labels:  payment
Parbad
A free, open-source, integrated and extensible library which connects your web applications to online payment gateways. Gateways can be added or developed by you.
Stars: ✭ 194 (+870%)
Mutual labels:  payment
recurly
A Recurly API client written in golang. Actively maintained and unit tested. No external dependencies.
Stars: ✭ 40 (+100%)
Mutual labels:  payment
Commerce billing
A payment processing library for Elixir
Stars: ✭ 170 (+750%)
Mutual labels:  payment
Zold
An Experimental Non-Blockchain Cryptocurrency for Fast Micro Payments
Stars: ✭ 183 (+815%)
Mutual labels:  payment
Ach
ACH implements a reader, writer, and validator for Automated Clearing House (ACH) files. The HTTP server is available in a Docker image and the Go package is available.
Stars: ✭ 210 (+950%)
Mutual labels:  payment
Gopay
golang语言实现的支付模块,支持支付宝app,支付宝网页版,微信app,微信公众号支付
Stars: ✭ 151 (+655%)
Mutual labels:  payment
Chowder
Chowder for Android M-Pesa payments.
Stars: ✭ 31 (+55%)
Mutual labels:  payment
Tdtouchid
TDTouchID是一个封装好的指纹、FaceID验证库,可以用来做iOSAPP的登录/支付等验证。
Stars: ✭ 191 (+855%)
Mutual labels:  payment
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (+1145%)
Mutual labels:  payment
React Interactive Paycard
Interactive React Paycard
Stars: ✭ 2,129 (+10545%)
Mutual labels:  payment
React Credit Cards
Beautiful credit cards for your payment forms
Stars: ✭ 2,239 (+11095%)
Mutual labels:  payment
Easyupipayment Android
📱Android Library to implement UPI Payment integration easily in Android App 💳💸
Stars: ✭ 219 (+995%)
Mutual labels:  payment
Mollie Api Node
Official Mollie API client for Node
Stars: ✭ 158 (+690%)
Mutual labels:  payment
ng-payment-card
💳 Responsive credit card component for Angular.
Stars: ✭ 27 (+35%)
Mutual labels:  payment
Django School Management
Deployment Ready Developer to Developer Full-stack School Management System with payments, e-admission, result management, academic functionalities, and much more implemented in a simple way.
Stars: ✭ 151 (+655%)
Mutual labels:  payment
Payment
Payment是php版本的支付聚合第三方sdk,集成了微信支付、支付宝支付、招商一网通支付。提供统一的调用接口,方便快速接入各种支付、查询、退款、转账能力。服务端接入支付功能,方便、快捷。
Stars: ✭ 2,293 (+11365%)
Mutual labels:  payment
terms-dictionary
Simple definitions of terms, acronyms, abbreviations, companies, and projects related to financial services and Moov.
Stars: ✭ 48 (+140%)
Mutual labels:  payment
react-stripe-script-loader
A React Component that loads Stripe script if necessary and shows React Stripe Elements
Stars: ✭ 22 (+10%)
Mutual labels:  payment
Omnipay Pingpp
A Ping++ driver for the Omnipay PHP payment processing library. 一个聚合了支付宝(APP、Wap、PC、即时到账、扫码、企业付款),微信(APP、公众号、红包), 银联网关、银联企业网银、Apple Pay、QQ 钱包、易宝支付、百度钱包、京东支付、京东白条、招行一网通、分期支付等国内主流支付渠道的聚合支付网关(Ping++, also known as Pingpp/Pingxx/Pingplusplus)
Stars: ✭ 227 (+1035%)
Mutual labels:  payment

Donate via Zerocracy

EO principles respected here Managed by Zerocracy DevOps By Rultor.com We recommend IntelliJ IDEA

Build Status Javadoc PDD status Maven Central License

Test Coverage SonarQube

Hits-of-Code

Java API for Zold. Ruby API is in zold-io/zold.

All you need is this:

<dependency>
  <groupId>io.zold</groupId>
  <artifactId>java-api</artifactId>
  <version><!-- Get it here: https://github.com/zold-io/java-api/releases --></version>
</dependency>

Java version required: 1.8+.

We recommend you read the Zold whitepaper in order to understand the concepts behind this API.

First, you find a wallet in a directory of wallets:

final Wallets wallets = new WalletsIn(new File("/tmp/wallets"));
final Wallet wallet = new Filtered<>(
    w -> "9999888877776666".equals(w.id()),
    wallets
).iterator().next();

Then, you pull the network's version of the wallet and merge it into yours:

final Wallet merged = wallet.merge(
    network.pull(wallet.id())
);

Then, you make a payment:

final long amount = 1999L;  //zents
final char bnf = (char) 12345; //beneficiary wallet's ID
wallet.pay(amount, bnf);

Finally, you push it:

network.push(wallet);

That's it.

How to contribute?

Just fork the repo and send us a pull request.

Make sure your branch builds without any warnings/issues:

mvn clean install -Pqulice

License (MIT)

Copyright (c) 2018 Yegor Bugayenko

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 NON-INFRINGEMENT. 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.

Requirements

These are the requirements for this API.

Note: The original whitepaper on zold can be found here. The whitepaper and the documentation found at www.zold.io serve as the highest authority on the subject of zold. The following requirements are condensed versions of the points expressed in the aforementioned docs as they relate to the scope of this project:

  • Maintain a wallet in structured textual format, within which is a ledger that contains transactions for that wallet.
  • Make payments:
    • Taxes according to fixed formula
    • Payments to other wallets
    • Sign with RSA key
    • Push to network
  • Receive payments:
    • Pull the paying wallet from the network
    • Merge the copies of the paying wallet with our own copy
  • We need to refresh our local database of network nodes by querying the network.
  • We must implement with Java 8
  • Non-functional requirements were not made, but we expect
    • Flawless concurrency
    • "Decent" performance
    • Design must respect the principles of elegant objects
    • Design must resemble the design of the original ruby API

Decisions and Alternatives

  • javax-json is a Java API that can parse and also write JSON. As part of the EE7 spec, it is stable, well established, and is the standard. We can use it to write to our local database file. Alternatives are google's gson, JSON-java, jackson-databind, and many others.
  • The standard java.security package contains everything we need to import keystores and sign/encrypt messages with RSA keys. There are lots of examples on the internet on how to use it. I am not aware of any other popular alternative out there.
  • cactoos-http is a new object-oriented HTTP API under current development as part of project cactoos in Zerocracy. It is expected to be ready by the time this API goes to production. Other alternatives are Apache's http client (not object-oriented), jcabi-http (too many dependencies), and many others.
  • Our API will consist of our core classes that will communicate with the network using cactoos-http + javax.json, a local storage (nodes.json) for persistence of remote node data, will use the java.security package when signing the transactions, and will expect wallet files to have the .z extension (discuss) and conform to the format specified in the whitepaper:

architecture

Concerns

  • cactoos-http is designed according to the principles of EO, although it still has mayor hurdles to overcome (eg. see #62).
  • javax.json will parse data from the zold network and write our local database file in structured JSON format. Its usage is very simple, although we will probably have to be careful with regards to concurrent access to the file.
  • java.security runtimes can handle RSA and MD5 on all platforms.

Assumptions

  • cactoos-http will reach the maturity level necessary to support our requirements
  • We can flawlessly manage synchronized access to our local database file

Risks

  • The cactoos-http project might not obtain the resources to reach maturity, or may not reach maturity for some other reason.
  • Our bottleneck will be reading/writing our local database file. We might not be able to manage a "heavy" throughput.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].