Introduction

The module’s integration lets you incorporate payment processing into your website, using PayPal.

Business

Development

Core

Entity Definitions

PaypalPaymentInfoEntityDefinition

The PaypalPaymentInfoEntityDefinition adds the PayPal-attributes to the general PaymentInfoEntityDefinition. The inheritance goes further to the AbstractEntityDefinition:

asciidoctor diagram PaypalPaymentInfoEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

paypalUsername

stores the PayPal username

paypalPayerId

stores the PayPal payer id

paypalTransactionId

stores the PayPal transaction id

Spring Data JPA Repositories

PaypalPaymentInfoRepository

The PaypalPaymentInfoRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the PaypalPaymentInfoEntityDefinition:

asciidoctor diagram PaypalPaymentInfoRepository

Facade

MapperFactoryConfigurers

PaypalPaymentInfoMapperFactoryConfigurer

The PaypalPaymentInfoMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the PaypalPaymentInfoEntityDefinition to PaypalPaymentInfoDtoDefinition:

asciidoctor diagram PaypalPaymentInfoMapperFactoryConfigurer

The conversion is customized.

Dto definitions

PaypalPaymentInfoDtoDefinition

The PaypalPaymentInfoDtoDefinition extends the PaymentInfoDtoDefinition:

asciidoctor diagram PaypalPaymentInfoDtoDefinition

This is the corresponding Dto object for the PaypalPaymentInfoEntityDefinition.

Storefront

PaypalCheckoutController

The PaypalCheckoutController handles the communication with the PayPal servers. There are several HTTP Endpoints defined here, respectively:

  • /payment/paypal/express-checkout/set,

  • /payment/paypal/express-checkout/success and

  • /payment/paypal/express-checkout/do

For more details, please, refer to the PayPal documentation

Configuration

Name Type Description

nemesis.payment.paypal.account-id

java.lang.String

The paypal business account id.

nemesis.payment.paypal.client-id

java.lang.String

Paypal REST api client id.

nemesis.payment.paypal.client-secret

java.lang.String

Paypal REST api client secret.

nemesis.payment.paypal.cpp-cart-border-color

java.lang.String

Specifies the HEX of a color to be used in paypal.

nemesis.payment.paypal.cpp-logo-image

java.lang.String

Specifies the URL for a logo image to be used in paypal.

nemesis.payment.paypal.express-checkout-ipn-url

java.lang.String

Specifies the URL for the IPN callback. If not specified the URL from the merchant’s paypal account is used.

nemesis.payment.paypal.properties

java.util.Map<java.lang.String,java.lang.String>

Additional properties used to configure the paypal sdk.