Sitelet https://github.com/tobyheighway/java-sdk
Skip to content
tobyheighwayPublic
forked from trolley/java-sdk

About

Trolley (previously Payment Rails) SDK in Java for v1 REST APIs

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

54 Commits

Folders and files

Repository files navigation

Trolley Java SDK (Previously Payment Rails1)

A native Java SDK for Trolley

Installation

For Java

To install the reference:

Maven

Add this dependency to your project's POM:

<dependency>
    <groupId>com.trolley</groupId>
    <artifactId>java-sdk</artifactId>
    <version>1.0.1</version>
</dependency>

The library's source is hosted at https://github.com/paymentRails/java-sdk

The library can be found at: https://central.sonatype.com/artifact/com.trolley/java-sdk/1.0

Getting Started

import com.trolley.java-sdk.*;
import com.trolley.Exceptions.*;

public class PaymentRailsExample {
    public static void main(String[] args) {

       Gateway client = new Gateway(new Configuration("YOUR_PUBLIC_KEY","YOUR_PRIVATE_KEY","production"));

        try {
            Recipient recipient = client.recipient.find("R-1a2B3c4D5e6F7g8H9i0J1k");
            System.out.println(recipient.getId());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Usage

Methods should all have Java Doc comments to help you understand their usage. As mentioned the full API documentation is the best source of information about the API.

For more information please read the Java API docs is available. The best starting point is:

Data Type SDK Documentation
Batch API Docs for Batch
Payment API Docs for Payment
Recipient API Docs for Recipient
Recipient Account API Docs for Recipient Account

merchantKey

  • Type: Authorization
  • Authorization parts: Access code, Secret code
  • Location: HTTP header

Footnotes

  1. Payment Rails is now Trolley. We're in the process of updating our SDKs to support the new domain. In this transition phase, you might still see "PaymentRails" at some places. ↩

About

Trolley (previously Payment Rails) SDK in Java for v1 REST APIs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages