apiVersion: v1
kind: ConfigMap
metadata:
  name: bidv-minipos-configmap
  namespace: smartshop-logs # Thay đổi namespace nếu cần
data:
  application.properties: |

    server.self-url=https://miniapp-api-logs.tingee.vn
    server.port=8080
    server.forward-headers-strategy=native
    spring.application.name=${modules}
    spring.docker.compose.enabled=false

    grpc.port=9090
    grpc.notification-service.host=bidv-notification-be-service
    grpc.notification-service.port=9090

    grpc.pos-service.host=bidv-pos-be-service
    grpc.pos-service.port=9090

    grpc.host-service.host=bidv-host-be-service
    grpc.host-service.port=9090

    grpc.auth-service.host=bidv-auth-be-service
    grpc.auth-service.port=9090

    grpc.clients.pos.host=bidv-pos-be-service
    grpc.clients.pos.port=9090
    grpc.clients.auth.host=bidv-auth-be-service
    grpc.clients.auth.port=9090
    grpc.clients.notification.host=bidv-notification-be-service
    grpc.clients.notification.port=9090
    grpc.clients.category.host=bidv-pos-be-service
    grpc.clients.category.port=9090

    # Dev tools
    spring.devtools.restart.enabled=true
    spring.devtools.restart.additional-exclude=static/**
    spring.devtools.livereload.enabled=false

    # Jackson
    spring.jackson.serialization.indent-output=true

    # Datasource
    spring.datasource.url=jdbc:oracle:thin:@//10.6.0.5:1521/NHS10PDB
    spring.datasource.username=MINIAPP_UAT
    spring.datasource.password=Bidv2025
    spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
    spring.datasource.hikari.maximum-pool-size=10
    spring.datasource.hikari.minimum-idle=5
    spring.datasource.hikari.idle-timeout=30000
    spring.datasource.hikari.max-lifetime=1800000
    spring.datasource.hikari.connection-timeout=30000
    spring.datasource.hikari.pool-name=HikariOraclePool

    # Messages
    spring.messages.cache-duration=PT1S
    spring.messages.basename=i18n/messages,i18n/move-stock,i18n/messages_vn,i18n/move-stock_vn

    # JPA
    spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
    spring.jpa.show-sql=true
    spring.jpa.properties.hibernate.format_sql=true
    spring.jpa.properties.hibernate.multiTenancy=DISCRIMINATOR
    spring.jpa.properties.hibernate.tenant_identifier_resolver=com.ord.core.entity.multitenant.TenantIdentifierResolver
    spring.jpa.properties.hibernate.connection.provider_disables_autocommit=false
    spring.jpa.open-in-view=false

    # Mail
    spring.mail.host=smtp.example.com
    spring.mail.port=587
    spring.mail.username=your-email@example.com
    spring.mail.password=your-email-password
    spring.mail.properties.mail.smtp.auth=true
    spring.mail.properties.mail.smtp.starttls.enable=true
    # MyBatis
    mybatis.config-location=classpath:mybatis/mybatis-config.xml
    mybatis.mapper-locations=classpath*:mybatis/mappers/*.xml

    # File upload
    spring.servlet.multipart.enabled=true
    spring.servlet.multipart.max-file-size=100MB
    spring.servlet.multipart.max-request-size=100MB

    # App URLs & Tools
    application.web-app-url=http://localhost:5173
    application.convert-pdf-gotenberg-url=https://doc2pdf.tingee.vn
    application.convert-pdf-gotenberg-username=tingedu
    application.convert-pdf-gotenberg-password=RZPM7IASO7HK1qK8lfQp
    application.seaweedfs-master-url=http://192.168.1.17:9333
    application.default-password-admin=ENC(aWSb4Xy8vKOT7AZiao9nhtml6qJaiIo922AwJts6vHdREZiu7VEB1idewyBKWEQE)
    jasypt.encryptor.password=rxftLvn0HIWDcMegDfskVLcIzGdDA9Gc
    jasypt.encryptor.algorithm=PBEWITHHMACSHA512ANDAES_256
    jasypt.encryptor.iv-generator-classname=org.jasypt.iv.RandomIvGenerator

    # Redis cache
    jhipster.cache.redis.expiration=3600
    jhipster.cache.redis.server=redis://10.6.0.4:7579
    jhipster.cache.redis.cluster=false

    # SpringDoc
    springdoc.api-docs.resolve-schema-properties=true

    # CORS
    jhipster.cors.allowed-origins=http://localhost:8100,https://localhost:8100,http://localhost:9000,https://localhost:9000,http://localhost:5173,http://localhost:5174,https://mini-api-bidv-uat.tingee.vn,https://miniapp-logs.tingee.vn,http://localhost:3000,https://smartshop-uat.tingee.vn
    jhipster.cors.allowed-origin-patterns=https://*.githubpreview.dev
    jhipster.cors.allowed-methods=*
    jhipster.cors.allowed-headers=*
    jhipster.clientApp.name=bivdMinipos
    jhipster.cors.exposed-headers=Authorization,Link,X-Total-Count,X-${jhipster.clientApp.name}-alert,X-${jhipster.clientApp.name}-error,X-${jhipster.clientApp.name}-params
    jhipster.cors.allow-credentials=true
    jhipster.cors.max-age=1800

    # JWT
    jhipster.security.authentication.jwt.base64-secret=ZDk0MWQ0MDJjNWY0NzA5ODExNzExNGIzYTQ4ZTU5NzJhMjZjODM0ZWMyYTM2MzhmN2U4NWJkMmE4YTdmYzQ0ZDRkODk2ZDhiOTEzZDU2YzM2ZmJiZmQ2ODMxNDIwNWY1YmM2MDdiMzFjYjRjYTE4ZTYwYzZmMmI2NzdhMDk1MmU=
    jhipster.security.authentication.jwt.token-validity-in-seconds=86400
    jhipster.security.authentication.jwt.token-validity-in-seconds-for-remember-me=2592000

    logging.level.org.hibernate.SQL=DEBUG
    logging.level.javax.management.remote.rmi=OFF
    logging.level.org.springframework.jdbc=DEBUG
    spring.liquibase.enabled=false
    spring.threads.virtual.enabled=true

    # Minio
    application.minio.endpoint=https://s3.minio.orenda.vn
    application.minio.access-key=admin
    application.minio.secret-key=Nothing123$
    application.minio.bucket-name=mini-pos

    #Bỏ qua gọi API ngân hàng khi ở không ở bên môi trường BIDV
    application.disableSmartBankingApi=true
    application.disableCoreBankingApi=true
    application.disablePaygateApi=true
    application.disableNotifyHubApi=true
    application.disableUploadFileECM=true

    # Jodconverter
    jodconverter.local.enabled=true
    jodconverter.local.office-home=/usr/lib/libreoffice
    jodconverter.local.keep-alive-on-shutdown=true
    jodconverter.local.port-numbers=2002

    # SoundBox
    domain=https://miniapp-logs.tingee.vn/
    urlSuccessShopPackageRegistrationSoundBox =admin/shop-package-registration-sound-box
    urlFailureShopPackageRegistrationSoundBox =admin/shop-package-registration-sound-box
    tingee.read-code-url=https://uat-open-api.tingee.vn/v1/device/read-security-code
    tingee.read-amount-url=https://uat-open-api.tingee.vn/v1/device/read-amount

    #Smart AutoPayment
    bidv.esb.base-url=http://uatesbrestful-uat-esbrestful.apps.openshift.ldapudtest.com/esb
    bidv.esb.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjMyMSwiY2xpZW50aWQiOjIsInBsYW5pZCI6MTIzM30.WFtugbsjthy6yE4LVSKg2in3az2gQHFIsl5yPIePmLo
    bidv.esb.app-code=OMNI
    bidv.esb.username=OMNI
    bidv.esb.password=#!zIy5heYgbdoPNWI59nE5VvLjfr4hLG2HLa/ZVBW/gNc=
    bidv.esb.endpoints.update-auto-payment=/PaygateChannelOmni/global/vn/paygate/omni/updateAutoPayment/v1
    bidv.esb.endpoints.register-auto-payment=/PaygateChannelOmni/global/vn/paygate/omni/registerAutoPayment/v1

    #Smart Paygate
    paygate.baseUrl=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com
    paygate.viewAutoPaymentUrl=/esb/PaygateChannelOmni/register/viewAutoPaymentStatus/v1
    paygate.appToken=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM1MDd9.9CEtBaOiw-gdMz86QpHd5D7G-HIqOnwAJdi8xQs7Z-c
    paygate.appCode=OMNI
    paygate.username=OMNI
    paygate.password=#!zIy5heYgbdoPNWI59nE5VvLjfr4hLG2HLa/ZVBW/gNc=

    #Smart Send mail
    bidv.email.send-mail-url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/api/v1/external/message/email/send
    bidv.email.connect-timeout=30000
    bidv.email.read-timeout=30000
    bidv.email.mail-from=guimailud1@ldapudtest.com
    bidv.email.mail-to=guimailud2@ldapudtest.com
    bidv.email.app-code=SMART_SHOP_21df6780-e8cf-4883-978c-7fbfd19b6e86
    bidv.email.access-token=U44pABWkBK29gWXnY666NBzT7M3YV2WYIPtnzzvsEqQ=
    bidv.email.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM0OTV9.65-qalKaQDA5pQyipKTn1O1ZEC8WTcBwSJLco1Anu_I

    #QRcode
    gateway.directory.logo=src/main/resources/images/
    app.security.secretCode=M2kQvE3qQbZrC5UuT9oPlc1RhzSn3V_YeF7dJXgQ6pI
    # openai
    openai.api.key=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
    openai.api.url=https://api.openai.com/v1/chat/completions
    openai.api.model=gpt-5
    openai.api.content=Hãy trích xuất các sản phẩm trong ảnh ra mảng như sau [{name: text, price: decimal (Nếu text là 10K thì nghĩa giá trị là 10000)}], không có thì trả về mảng rỗng. Kết quả chỉ trả về mảng!

    #soa
    soa.config.active= false
    soa.ems.url= tcp://10.53.114.32:10222
    soa.ems.user= tthdol
    soa.ems.password= tthdol
    soa.ems.timeout= 25000
    soa.ems.queue.acctlist= vn.acctlist.1.0

    #smb
    smb.verify.userDataKey=t3GGn3ilQFkHXkwuK5OhhqJkOfXQmu27MJTYmEjRxUc=
    smb.verify.url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/bankapi/sdk-cusInfo
    smb.verify.username=sdk_miniapp
    smb.verify.password=59bae91d924aef5cada705a384b20100b80785460e1d14f82fcab342a8109b22
    smb.verify.partnerCode=210825001
    smb.verify.appToken=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM1MTR9.uDvLJpz58Wk41dSVtNHE9OC5wylXg6_Er59yn1-OxEk

    #Tạo hóa đơn thanh toán loa
    bidv.paygate.connect-timeout=30000
    bidv.paygate.read-timeout=30000
    bidv.paygate.url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/global/vn/paygate-smartshop/initPayment/v1
    bidv.paygate.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM0OTZ9.vkjc4HCo9pnKA4c2bf0WwAc68iB7Rg60epFARYWGBHw

    #Đối soát giao dịch thanh toán loa
    bidv.reconcile.connect-timeout=30000
    bidv.reconcile.read-timeout=30000
    bidv.reconcile.userName=OPENAPI
    bidv.reconcile.password=OPENAPI
    bidv.reconcile.url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/global/vn/paygate-gateway/reconcile/v002
    bidv.reconcile.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM0OTd9.up-twmZZfYKorf8SdA54FwOuLSPayb520cXGw-sdEvA
    bidv.reconcile.appCode=OPENAPI

    #Lấy accessToken
    bidv.loginByQRCode.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM1MDZ9.bB4tcrs4OA4EnPPnmKorEXTdDz55W_rYG38jKparAnU
    bidv.loginByQRCode.url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/PaygateQRIssue/QRShop/login/v1
    bidv.loginByQRCode.connect-timeout=30000
    bidv.loginByQRCode.read-timeout=30000
    bidv.loginByQRCode.userName=OMNI
    bidv.loginByQRCode.password=#!zIy5heYgbdoPNWI59nE5VvLjfr4hLG2HLa/ZVBW/gNc=
    bidv.loginByQRCode.appCode=OMNI

    #Truy vấn CIF & VA đối tác khác để liên kết
    bidv.checkPartnerStatus.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM1MDZ9.bB4tcrs4OA4EnPPnmKorEXTdDz55W_rYG38jKparAnU
    bidv.checkPartnerStatus.url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/PaygateQRIssue/miniApp/checkPartnerStatus/v1
    bidv.checkPartnerStatus.appCode=OMNI
    bidv.checkPartnerStatus.userName=OMNI
    bidv.checkPartnerStatus.password=#!zIy5heYgbdoPNWI59nE5VvLjfr4hLG2HLa/ZVBW/gNc=
    bidv.checkPartnerStatus.connect-timeout=30000
    bidv.checkPartnerStatus.read-timeout=30000

    #Liên kết VA đối tác khác
    bidv.createPartnerVaLink.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM1MDZ9.bB4tcrs4OA4EnPPnmKorEXTdDz55W_rYG38jKparAnU
    bidv.createPartnerVaLink.url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/PaygateQRIssue/miniApp/createPartnerVaLink/v1
    bidv.createPartnerVaLink.appCode=OMNI
    bidv.createPartnerVaLink.userName=OMNI
    bidv.createPartnerVaLink.password=#!zIy5heYgbdoPNWI59nE5VvLjfr4hLG2HLa/ZVBW/gNc=
    bidv.createPartnerVaLink.connect-timeout=30000
    bidv.createPartnerVaLink.read-timeout=30000

    #Tạo tài khoản VA
    bidv.registerQRShopMiniApp.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM1MDZ9.bB4tcrs4OA4EnPPnmKorEXTdDz55W_rYG38jKparAnU
    bidv.registerQRShopMiniApp.url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/PaygateQRIssue/miniApp/registerQRShopMiniApp/v1
    bidv.registerQRShopMiniApp.appCode=OMNI
    bidv.registerQRShopMiniApp.userName=OMNI
    bidv.registerQRShopMiniApp.password=#!zIy5heYgbdoPNWI59nE5VvLjfr4hLG2HLa/ZVBW/gNc=
    bidv.registerQRShopMiniApp.connect-timeout=30000
    bidv.registerQRShopMiniApp.read-timeout=30000

    #Truy vấn trạng thái đăng ký tự động thanh toán loa
    bidv.viewAutoPaymentStatus.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM1MDd9.9CEtBaOiw-gdMz86QpHd5D7G-HIqOnwAJdi8xQs7Z-c
    bidv.viewAutoPaymentStatus.url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/PaygateChannelOmni/register/viewAutoPaymentStatus/v1
    bidv.viewAutoPaymentStatus.appCode=OMNI
    bidv.viewAutoPaymentStatus.userName=OMNI
    bidv.viewAutoPaymentStatus.password=#!zIy5heYgbdoPNWI59nE5VvLjfr4hLG2HLa/ZVBW/gNc=
    bidv.viewAutoPaymentStatus.connect-timeout=30000
    bidv.viewAutoPaymentStatus.read-timeout=30000

    #Truy vấn lịch sử giao dịch VA đã liên kết
    bidv.virtualAccountDispute.app-token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCSURWQVBJIiwiYXBwaWQiOjE4ODEsImNsaWVudGlkIjoyLCJwbGFuaWQiOjM1MTZ9.I7SATI9qZWbiiN4h_WElB6XVRU4oSfJWivVulDjnN4I
    bidv.virtualAccountDispute.url=http://uatesbrestful-uat-esbrestful.apps.uat3ttptnhs.ldapudtest.com/esb/global/vn/virtual-account/dispute/v002
    bidv.virtualAccountDispute.appCode=
    bidv.virtualAccountDispute.userName=
    bidv.virtualAccountDispute.password=
    bidv.virtualAccountDispute.connect-timeout=30000
    bidv.virtualAccountDispute.read-timeout=30000

    bidv.ecm.upload.app-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aW1lIjoiMjAyNTA5MTUxMDMwMDAiLCJhcHBOYW1lIjoiU21hcnQgU2hvcCIsImFwcENvZGUiOiJTTUFSVFNIT1AifQ.bwcf5ZWdjclnintOaUQQuxyvfQhQE72kw0_B9tcCMHY
    bidv.ecm.upload.url=http://dev-s3.apps.devttptnhs.ldapudtest.com/api/storage/upload
    bidv.ecm.upload.app-code=SMARTSHOP
    bidv.ecm.upload.connect-timeout=30000
    bidv.ecm.upload.read-timeout=30000
    bidv.ecm.upload.storageCode=VASziN6VGcjvZttt3T4Pyv26UHbarmHikC3xXz0jleDUMgEI9PigOeM3d/aToot6jLgmk/UnnqcHELg5GG5XyhZZ9K78qPDiM+0=

    bidv.ecm.download.app-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aW1lIjoiMjAyNTA5MTUxMDMwMDAiLCJhcHBOYW1lIjoiU21hcnQgU2hvcCIsImFwcENvZGUiOiJTTUFSVFNIT1AifQ.bwcf5ZWdjclnintOaUQQuxyvfQhQE72kw0_B9tcCMHY
    bidv.ecm.download.url=http://dev-s3.apps.devttptnhs.ldapudtest.com/api/file/v2/download
    bidv.einvoice.headers.channel = Smartshop
    bidv.ecm.download.app-code=SMARTSHOP
    bidv.ecm.download.connect-timeout=30000
    bidv.ecm.download.read-timeout=30000
    bidv.ecm.download.storageCode=VASziN6VGcjvZttt3T4Pyv26UHbarmHikC3xXz0jleDUMgEI9PigOeM3d/aToot6jLgmk/UnnqcHELg5GG5XyhZZ9K78qPDiM+0=
    bidv.einvoice.headers.x-api-interaction-id=TestSmart
    bidv.einvoice.headers.client-id=728a13eb96331115052a681e5bb71bad
    bidv.einvoice.headers.client-secret=aeb5d55a62ee4489a20534002331bca4
    bidv.einvoice.headers.user-agent=SmartShop
    bidv.ecm.delete.app-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aW1lIjoiMjAyNTA5MTUxMDMwMDAiLCJhcHBOYW1lIjoiU21hcnQgU2hvcCIsImFwcENvZGUiOiJTTUFSVFNIT1AifQ.bwcf5ZWdjclnintOaUQQuxyvfQhQE72kw0_B9tcCMHY
    bidv.ecm.delete.url=http://dev-s3.apps.devttptnhs.ldapudtest.com/api/storage/remove
    bidv.ecm.delete.app-code=SMARTSHOP
    bidv.ecm.delete.connect-timeout=30000
    bidv.ecm.delete.read-timeout=30000
    bidv.ecm.delete.storageCode=VASziN6VGcjvZttt3T4Pyv26UHbarmHikC3xXz0jleDUMgEI9PigOeM3d/aToot6jLgmk/UnnqcHELg5GG5XyhZZ9K78qPDiM+0=
    app.security.secretCode=M2kQvE3qQbZrC5UuT9oPlc1RhzSn3V_YeF7dJXgQ6pI

    #kafka
    spring.kafka.bootstrap-servers=10.6.0.4:29092
    spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
    spring.kafka.producer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializer
    spring.kafka.producer.acks=all
    spring.kafka.producer.retries=3
    spring.kafka.producer.batch-size=16384
    spring.kafka.producer.buffer-memory=33554432
    spring.kafka.producer.properties.enable.idempotence=true
    spring.kafka.producer.properties.max.in.flight.requests.per.connection=5
    spring.kafka.producer.properties.linger.ms=5
    # Consumer Configuration
    spring.kafka.consumer.group-id=mini-pos
    spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
    spring.kafka.consumer.value-deserializer=org.springframework.kafka.support.serializer.JsonDeserializer
    spring.kafka.consumer.auto-offset-reset=earliest
    spring.kafka.consumer.enable-auto-commit=false
    spring.kafka.consumer.properties.spring.json.trusted.packages=*
    # Listener Configuration
    spring.kafka.listener.ack-mode=manual_immediate
    # Logging
    logging.level.org.apache.kafka=INFO
    logging.level.org.springframework.kafka=DEBUG
    einvoice.viettel.baseUrl = https://vinvoice.viettel.vn/api/
    einvoice.xcyberBill.baseUrl = https://api-xbill.xcyber.vn/xbill/
