Location>code7788 >text

Streamlining the Deployment Process: Rainbond Makes Jeepay Payment System Deployment Easier

Popularity:13 ℃/2024-10-08 17:16:53

In today's development environment, deploying a Java payment system like Jeepay often requires developers to deal with cumbersome configurations, dependency management, and high availability guarantees for the service, making manual deployment and operation and maintenance arduous and time-consuming. However, with a cloud-native PaaS platform like Rainbond, this process has never been easier. With Rainbond's point-and-click application management and O&M automation, developers can easily deploy the Jeepay system, greatly reducing the difficulty and complexity of traditional deployments and allowing you to focus on rapid business iteration and innovation.

In this article, we will introduce in detail how to deploy the Jeepay system through the Rainbond platform step by step, without complex configuration, just a simple operation can be completed to help developers quickly build a stable and secure payment system.

About Jeepay

Jeepay is a set of open source payment system suitable for Internet enterprises, supporting multi-channel service provider and general merchant mode. Already dockedWeChat PaymentAlipay, online payment platformcloudflash paymentOfficial interface, support aggregation code payment. jeepay useSpring Bootcap (a poem)Ant Design VueDevelopment, IntegrationSpring SecurityImplementation of rights management features , is a very practical web development framework .

Project Characteristics

  • Supports multi-channel docking and automatic routing of payment gateways
  • dockedmicrosoftService Provider and General Merchant interfaces that supportV2cap (a poem)V3connector
  • dockedAlipay, online payment platformService Provider and General Merchant interfaces with RSA and RSA2 signature support
  • dockedcloudflash paymentService provider interface with multiple payer options
  • Provide http form interface, provide various languagesdkRealization, easy docking
  • Interface request and response data using a signature mechanism to ensure safe and reliable transactions
  • System security, supportdistributedDeployment.highly concurrent
  • The management side includesOperating Platformcap (a poem)merchant system
  • Simple and easy-to-use management platform interface
  • Order notification from the payment platform to the merchant system is implemented using MQ, which ensures high availability and message reachability.
  • Automated generation of interface parameter configuration screens for payment channels
  • utilizationspring securityImplementation of rights management
  • Separate front-end and back-end architecture to facilitate secondary development
  • from the originalXxPayTeam development, with many years of experience in payment system development

Deploying Jeepay with the Rainbond Open Source App Store

First of all, you need to deploy Rainbond on your server, which can be done with a single command, for more information on how to deploy it seeRainbond Deployment Documentation

curl -o   && bash ./

Once deployed, go to the Rainbond platform, select Deploy via App Market, and search the open source app store for theJeepay and perform a one-click installation.

Wait for the color of the component in the topology map to turn green to access Jeepay by clicking the Access button.

  • Jeepay-ui-manager is the Jeepay operating platform, default account password:jeepay/jeepay123
  • Jeepay-ui-merchant is the Jeepay merchant system, the default account password: the account is created in the operation platform/the password isjeepay666

Deploying Jeepay with Rainbond Source Code

This section describes how to deploy Jeepay on Rainbond from source code.

Middleware deployment

Software Name releases clarification
Redis 3.2.8 Distributed caching, also supported in higher versions
MySQL 5.7 No less than 5.7, supports 8.0 high version
MQ ActiveMQ or RabbitMQ or RocketMQ message middleware

Middleware preparation:

  • Redis: Search and deploy through the Rainbond app store, any version will do.
  • MySQL: Search and deploy through the Rainbond App Store. Deploy version 8.0 or higher. After deployment, open the external port of the MySQL component and connect through the local tool.Initialize Jeepay SQL
  • MQ: Here you choose to deploy RabbitMQ in one of two ways:
    1. According to the Dockerfile provided by JeepayBuilding RabbitMQ and configured.
    2. Deploy the entire set of Jeepay down via the Rainbond app store, removing the rest and keeping only RabbitMQ (also from the Dockerfile build provided by Jeepay)

Deploying Jeepay back-end services

Modifications are required before deployment file to start RabbitMQ.jeepay-components/jeepay-components-mq/

<dependency>
  <groupId></groupId>
  <artifactId>spring-boot-starter-amqp</artifactId>
-  <scope>provided</scope>
+  <!-- <scope>provided</scope> -->
</dependency>
  1. When you're done, select the source-based build component and fill in the Git information.

  1. Once the detection is complete go to the multi-module build, select the bootable module and create the

  1. Switch to edit mode and connect all back-end services to the middleware.

  1. Modify the backend service configuration file according to the template provided by Jeepay, just modify the information of the corresponding connection middleware. The reason for using environment variables here is thatOn Rainbond, when component A depends on component B, component B's environment variables will be injected into component A, so component A can flexibly connect to back-end services.
# /jeequan/jeepay/tree/master/conf
spring:
  datasource:
+ url: jdbc:mysql://${DB_HOST}:3306/${MYSQL_DATABASE}?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
    username: root
+ password: ${MYSQL_ROOT_PASSWORD}
  redis:
+ host: ${REDIS_HOST}
    port: 6379
    database: 2 #1storehouse:Operating Platform #2storehouse:merchant system #3storehouse:Payment Gateway
    timeout: 1000
    password:
  rabbitmq:
+ addresses: ${RABBITMQ_HOST}:5672
    username: admin
    password: admin
    dynamic: true
    virtual-host: jeepay
  mq:
+ vender: rabbitMQ

Environment variables can be viewed in the component's dependency information.

  1. Mount the configuration file for each component, under the environment configuration of the component, each service can mount its corresponding configuration file. Keep the mount paths the same./app/

Deploying Jeepay Front-End Services

Front-end service catalog structure

jeepay-ui
├── jeepay-ui-cashier -- aggregated cashier project
├── jeepay-ui-manager -- Operations platform web administrator
└── jeepay-ui-merchant -- merchant system web management terminal
  1. Deploy jeepay-ui-manager front-end project through source code, fill in relevant Git informationand subdirectories

  1. When the test is complete selectNodeJSStatic languages, as follows

  1. Node version selection16.20.0 Otherwise unchanged.

  1. Wait for the build to complete.jeepay-ui-merchant、jeepay-ui-cashierRepeat the above, modifying only the subdirectory paths.
  2. Create dependencies from front-end to back-end services.

  1. Add the front-end Nginx configuration file. All 3 front-end services need to mount the configuration file, just with different contents.

The following configuration files only need to be modifiedproxy_pass address, you can also use environment variables as above or fill in the internal address and port of the actual backend service.

# jeepay-ui-manager
server {
  listen 5000;
  
  location / {
      root /app/www;
      index ;
    try_files $uri $uri/ /;
  }
  location /api/{
    proxy_next_upstream http_502 http_504 error timeout invalid_header;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://${MANAGER_HOST}:9217;
    # enable supportwebsocketgrout
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }
}

# jeepay-ui-merchant
server {
  listen 5000;
  
  location / {
      root /app/www;
      index ;
      try_files $uri $uri/ /;
  }
  location /api/{
    proxy_next_upstream http_502 http_504 error timeout invalid_header;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://${MERCHANT_HOST}:9218;
    # enable supportwebsocketgrout
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }
}

# jeepay-ui-cashier
server {
  listen 5000;
  
  location / {
      root /app/www;
      index ;
      try_files $uri $uri/ /;
  }
  location /api/{
    proxy_next_upstream http_502 http_504 error timeout invalid_header;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://${PAYMENT_HOST}:9218;
    # enable supportwebsocketgrout
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }
}

Update the component after adding the configuration file.

To this point the deployment is complete, can be accessed through the external address of each front-end, such as problems can refer to theJeepay DocumentationConduct a lineup.

ultimate

With the above steps, we have successfully deployed Jeepay payment system on Rainbond platform. With Rainbond, we can deploy and develop applications very easily, so we don't need to care about deployment, just focus on the code. If it is the first time to contact Rainbond partners up to deploy Jeepay through the source code may be relatively ignorant, I expect that after the festival will record a deployment of Jeepay through the source code of the video, you can pay attention to!Rainbond B station accountDynamic.