Skip to content

paytrail/paytrail-java-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paytrail Java SDK

The goal for this project is to develop a Java SDK for the Paytrail payment service. The aim is to provide Java developers with an easier and more streamlined way to integrate our API into their applications.

The initial version of the Java SDK will be focused on basic payment handling and backend usage, specifically enabling communication with the Paytrail payment API. As such, it will not include any frontend functionalities, but we may provide examples for frontend implementation at a later stage.

Paytrail Payment Service

Paytrail is a payment gateway that offers 20+ payment methods for Finnish customers.

The payment gateway provides all the popular payment methods with one simple integration. The provided payment methods include, but are not limited to, credit cards, online banking and mobile payments.

To use the payment service, you need to sign up for a Paytrail account. Transaction fees will be charged for every transaction. Transaction cost may vary from merchant to merchant, based on what is agreed upon with Paytrail when negotiating your contract. For more information and registration, please visit our website or contact us directly.

Requirements

General requirements

  • Java 8 or later

Development requirements

  • JUnit - JUnit is the current generation of the JUnit testing framework, which provides a modern foundation for developer-side testing on the JVM. This includes focusing on Java 8 and above, as well as enabling many different styles of testing.

Usage

package io.paytrailpayment;

import io.paytrailpayment.dto.response.GetPaymentResponse;

public class Main {
    public static void main(String[] args) {
        PaytrailClient client = new PaytrailClient("xxx", "xxx", "xxx");
        private final String transactionId = "xxx";

        GetPaymentResponse res = client.getPaymentInfo(transactionId);

        System.out.println(res);
    }
}

Basic functionalities

The Paytrail JAVA-SDK supports most of the functionalities of the Paytrail Payment API.

Some of the key features are:

Payments and refunds

Methods

List of PaytrailClient::class methods

Method Description
createPayment() Create payment
getPaymentInfo() Get payment info
createRefundRequest() Create refund request

Testing

You can test our payment services in your online store before signing an agreement. Payments made using test credentials will not be processed.

With test credentials, you can test most of the payment methods included in Paytrail’s payment service. You can find the payment method specific credentials needed for testing in Paytrail’s documentation.


Disclaimer: This open source project is made available to assist coders in getting started with our API. However, we do not provide any warranty or guarantee that the code will work as intended and offer limited support for it. Use at your own risk.

About

Paytrail Java SDK

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages