Updates
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -19,8 +19,11 @@ resilience4j:
|
||||
retry-exceptions:
|
||||
- org.springframework.web.reactive.function.client.WebClientRequestException
|
||||
- java.io.IOException
|
||||
- com.example.mpesa.exceptions.MpesaBusyException
|
||||
ignore-exceptions:
|
||||
- com.test.payment.exceptions.MpesaPermanentException
|
||||
- java.lang.IllegalArgumentException
|
||||
|
||||
|
||||
circuitbreaker:
|
||||
instances:
|
||||
@@ -30,11 +33,38 @@ resilience4j:
|
||||
failure-rate-threshold: 50
|
||||
wait-duration-in-open-state: 10s
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
||||
driverClassName: org.h2.Driver
|
||||
username: sa
|
||||
password: password
|
||||
platform: h2
|
||||
|
||||
|
||||
|
||||
|
||||
spring:
|
||||
r2dbc:
|
||||
url: r2dbc:h2:mem:///mpesa_db;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
||||
username: sa
|
||||
password:
|
||||
sql:
|
||||
init:
|
||||
mode: always
|
||||
schema-locations: classpath:schema.sql
|
||||
main:
|
||||
web-application-type: reactive
|
||||
|
||||
logging:
|
||||
level:
|
||||
org.springframework.data.r2dbc: DEBUG
|
||||
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
operationsSorter: method
|
||||
tagsSorter: alpha
|
||||
api-docs:
|
||||
path: /v3/api-docs
|
||||
packages-to-scan: com.test.payment.controller
|
||||
|
||||
mpesa:
|
||||
base-url: https://sandbox.safaricom.co.ke
|
||||
consumer-key: k6e7LtBNeVX7V8MPqB7P83FsZio8cRZD
|
||||
consumer-secret: cGwiWzhDGopC3dho
|
||||
business-short-code: 174379
|
||||
pass-key: bfb279f9aa9bdbcf158e97dd71a467cd2e0c893059b10f78e6b72ada1ed2c919
|
||||
8
build/resources/main/schema.sql
Normal file
8
build/resources/main/schema.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
CREATE TABLE IF NOT EXISTS transactions (
|
||||
id SERIAL PRIMARY KEY,
|
||||
mpesa_reference VARCHAR(255),
|
||||
checkout_request_id VARCHAR(255),
|
||||
status VARCHAR(50),
|
||||
amount DECIMAL(10,2),
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user