Git Product home page Git Product logo

payzen-soapwebservice-java-example-1's Introduction

payzen-soapwebservice-java-example

This is an example of a web application that performs Payzen payments using Web Services and Java.

It uses the Java Payzen SDK which facilitates the use of Payzen Web Services v5 interface:

https://www.en.payzen.eu/wp-content/uploads/integration/Technical_Implementation_Guide_Webservice_V5_PayZen_v1.5.pdf

How to launch this example

The easiest way to launch this example is usen Maven: https://maven.apache.org/install.html

Once Maven is installed, you can clone this repository using Git or just download the project as a Zip.

Configuration

The first thing to do in the project is to set the configuration for the site.

The configuration file is called payzen-config.properties and it is placed in /src/main/resources directory. You will have to set the following parameters:

shopId=[shop identifier]
shopKey=[shop private key]
mode=[mode TEST or PRODUCTION]
endpointHost=[the name of the host. Ex: secure.payzen.eu]

Generation and installation

Then, we have to execute this command from the root path of the project:

mvn install

This will create a /target directory which includes a .war file.

We only have to take the .war file and place it into the deployment folder of out favourite application server/servlet container (Tomcat, Jetty, Jboss, WebSphere...).

The application will be accesible from a context root with the name of the .war file. For example, if the war file was renamed to ExamplePz.war, we will find the application in the url http://[serverhost]/ExamplePz/

Note about Java version (must read if you use Java < 8)

This example uses Java 8 and lambda expressions, but if you use an older version of java, it can be easily adapted.

To do that, you only have to change the callback style and use anonymous classes instead of lamda expressions.

For example, instead of this:

(result) -> {
	ResponseUtils.processResponse(request, response, result);
}

You can just use this:

new ResponseHandler() {
    @Override
	public void handle(ServiceResult result) throws Exception {
    	ResponseUtils.processResponse(request, response, result);
    }
}

For more examples and infomation, please check the page of SDK project:

https://github.com/profesorfalken/PayzenWebServicesSDK

payzen-soapwebservice-java-example-1's People

Contributors

moabi avatar profesorfalken avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.