SpringBoot integration for Moip payment gateway

Moip payment gateway integration for spring-boot applications

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

com.marcosbarbero.boot
ArtifactId

ArtifactId

spring-boot-moip-integration
Last Version

Last Version

1.0.0.RELEASE
Release Date

Release Date

Type

Type

jar
Description

Description

SpringBoot integration for Moip payment gateway
Moip payment gateway integration for spring-boot applications
Project URL

Project URL

https://github.com/marcosbarbero/spring-boot-moip-integration
Source Code Management

Source Code Management

https://github.com/marcosbarbero/spring-boot-moip-integration

Download spring-boot-moip-integration

How to add to project

<!-- https://jarcasting.com/artifacts/com.marcosbarbero.boot/spring-boot-moip-integration/ -->
<dependency>
    <groupId>com.marcosbarbero.boot</groupId>
    <artifactId>spring-boot-moip-integration</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/com.marcosbarbero.boot/spring-boot-moip-integration/
implementation 'com.marcosbarbero.boot:spring-boot-moip-integration:1.0.0.RELEASE'
// https://jarcasting.com/artifacts/com.marcosbarbero.boot/spring-boot-moip-integration/
implementation ("com.marcosbarbero.boot:spring-boot-moip-integration:1.0.0.RELEASE")
'com.marcosbarbero.boot:spring-boot-moip-integration:jar:1.0.0.RELEASE'
<dependency org="com.marcosbarbero.boot" name="spring-boot-moip-integration" rev="1.0.0.RELEASE">
  <artifact name="spring-boot-moip-integration" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.marcosbarbero.boot', module='spring-boot-moip-integration', version='1.0.0.RELEASE')
)
libraryDependencies += "com.marcosbarbero.boot" % "spring-boot-moip-integration" % "1.0.0.RELEASE"
[com.marcosbarbero.boot/spring-boot-moip-integration "1.0.0.RELEASE"]

Dependencies

compile (4)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-web jar
org.springframework.boot : spring-boot-starter-actuator Optional jar
org.springframework.boot : spring-boot-configuration-processor Optional jar
org.projectlombok : lombok jar

provided (1)

Group / Artifact Type Version
br.com.moip : java-sdk jar 2.0.0-RC6

test (1)

Group / Artifact Type Version
junit : junit jar

Project Modules

There are no modules declared in this project.

Moip integration SDK for spring-boot applications

Module to integrate Moip SDK on spring boot apps

Adding Project Lombok Agent

This project uses Project Lombok to generate getters and setters etc. Compiling from the command line this shouldn't cause any problems, but in an IDE you need to add an agent to the JVM. Full instructions can be found in the Lombok website. The sign that you need to do this is a lot of compiler errors to do with missing methods and fields.

Usage

This project is available on maven central

Add the dependency on pom.xml

<dependency>
    <groupId>com.marcosbarbero.boot</groupId>
    <artifactId>spring-boot-moip-integration</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>

Sample configuration for Basic Authentication

moip:
  health-indicator-enabled: true # Default false
  security:
    basic:
      token: # Basic auth token
      key: # Basic auth key
  environment: production #default value sandbox

Sample configuration for OAuth Authentication

moip:
  health-indicator-enabled: true # Default false
  security:
    oauth:
      access-token: # AccessToken provided by moip
  environment: production #default value sandbox

Note 1: All the security keys are provided by Moip.
Note 2: The available values for moip.environment property are production or sandbox having the last as default value.

Health Check testing

In order to enabled heal check for Moip services will be needed to turn this flag on:

moip.health-indicator-enabled: true #default false

Also there's a need to add the actuator dependency on the project:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
In the code
@Autowired
private br.com.moip.API api;

Contributing

Spring Boot Moip Integration is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below.

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

Footnote

Any doubt open an issue. Any fix send me a Pull Request.

Versions

Version
1.0.0.RELEASE