├── fastpay-simple-admin ├── template │ ├── src │ │ ├── boot │ │ │ ├── .gitkeep │ │ │ ├── i18n.ts │ │ │ └── axios.ts │ │ ├── css │ │ │ ├── app.scss │ │ │ └── quasar.variables.scss │ │ ├── i18n │ │ │ ├── index.ts │ │ │ └── en-US │ │ │ │ └── index.ts │ │ ├── App.vue │ │ ├── components │ │ │ ├── models.ts │ │ │ ├── EssentialLink.vue │ │ │ └── ExampleComponent.vue │ │ ├── pages │ │ │ ├── AlipayQueryPage.vue │ │ │ ├── WechatQueryPage.vue │ │ │ ├── ErrorNotFound.vue │ │ │ ├── IndexPage.vue │ │ │ └── BankPayQueryPage.vue │ │ ├── env.d.ts │ │ ├── shims-vue.d.ts │ │ ├── stores │ │ │ ├── store-flag.d.ts │ │ │ ├── example-store.ts │ │ │ └── index.ts │ │ ├── quasar.d.ts │ │ ├── router │ │ │ ├── routes.ts │ │ │ └── index.ts │ │ └── layouts │ │ │ └── MainLayout.vue │ ├── .prettierrc │ ├── .npmrc │ ├── .eslintignore │ ├── public │ │ ├── favicon.ico │ │ └── icons │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon-96x96.png │ │ │ └── favicon-128x128.png │ ├── tsconfig.json │ ├── .editorconfig │ ├── .vscode │ │ ├── extensions.json │ │ └── settings.json │ ├── .gitignore │ ├── README.md │ ├── postcss.config.js │ ├── index.html │ ├── package.json │ └── .eslintrc.js ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── fastpay │ │ │ ├── admin │ │ │ ├── controller │ │ │ │ ├── WechatController.java │ │ │ │ ├── AlipayController.java │ │ │ │ ├── MenuController.java │ │ │ │ └── BankPayController.java │ │ │ ├── mapstruct │ │ │ │ ├── MenuMapper.java │ │ │ │ └── BankPayInMapper.java │ │ │ ├── domain │ │ │ │ ├── BankPayInListRequest.java │ │ │ │ └── Menu.java │ │ │ ├── mapper │ │ │ │ ├── AdminMenuEntityMapper.java │ │ │ │ └── BankPayInEntityMapper.java │ │ │ └── entity │ │ │ │ └── AdminMenuEntity.java │ │ │ └── FastPayAdminApplication.java │ │ └── resources │ │ ├── application.properties │ │ └── mybatis │ │ └── mybatis-config.xml └── pom.xml ├── .gitignore ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── fastpay-simple-api ├── src │ └── main │ │ └── java │ │ └── com │ │ └── fastpay │ │ ├── bankpay │ │ ├── domain │ │ │ ├── PayInResult.java │ │ │ ├── PayOutRequest.java │ │ │ ├── PayOutResult.java │ │ │ ├── PayInQueryResult.java │ │ │ ├── PayInQueryRequest.java │ │ │ ├── PayOutQueryRequest.java │ │ │ ├── PayOutQueryResult.java │ │ │ └── PayInRequest.java │ │ └── BankPayService.java │ │ ├── alipay │ │ ├── domain │ │ │ ├── AlipayTradeSyncInput.java │ │ │ ├── AlipayOrderCloseInput.java │ │ │ ├── AlipayTradeQueryInput.java │ │ │ ├── AlipayAppPayOrderInfo.java │ │ │ ├── AlipayAppPayTradeOutput.java │ │ │ └── AlipayAppPayInput.java │ │ └── AlipayService.java │ │ ├── wechat │ │ ├── domain │ │ │ ├── WechatOrderCloseInput.java │ │ │ ├── WechatOrderQueryInput.java │ │ │ ├── WechatRefundQueryInput.java │ │ │ ├── WechatTransferQueryInput.java │ │ │ ├── WechatTradeQueryOutput.java │ │ │ ├── WechatPrepayQueryInput.java │ │ │ ├── WechatTradeQueryInput.java │ │ │ ├── WechatSceneInfo.java │ │ │ ├── WechatOrderNoticeRequest.java │ │ │ ├── WechatPrepayQueryOutput.java │ │ │ ├── WechatStoreInfo.java │ │ │ ├── WechatUnifiedOrderOutput.java │ │ │ ├── WechatRefundInput.java │ │ │ ├── WechatH5Info.java │ │ │ ├── WechatTransferOutput.java │ │ │ ├── WechatRefundOutput.java │ │ │ ├── WechatOrderQueryOutput.java │ │ │ ├── WechatOrderCloseOutput.java │ │ │ ├── WechatPayRequest.java │ │ │ └── WechatTransferInput.java │ │ └── WechatService.java │ │ └── common │ │ └── Response.java └── pom.xml ├── fastpay-simple-app ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── fastpay │ │ │ │ ├── common │ │ │ │ ├── AlipayStatus.java │ │ │ │ ├── BaseDomain.java │ │ │ │ ├── Constants.java │ │ │ │ ├── ResponseUtils.java │ │ │ │ └── utils │ │ │ │ │ └── XMLUtils.java │ │ │ │ ├── wechat │ │ │ │ ├── gate │ │ │ │ │ ├── domain │ │ │ │ │ │ ├── WechatPayDownloadBillGateOutput.java │ │ │ │ │ │ ├── WechatPayNoticeGateInput.java │ │ │ │ │ │ ├── WechatCloseOrderGateInput.java │ │ │ │ │ │ ├── WechatOrderRepayGateOutput.java │ │ │ │ │ │ ├── WechatPayRefundNoticeGateInput.java │ │ │ │ │ │ ├── WechatPayDownloadBillGateInput.java │ │ │ │ │ │ ├── WechatPayOrderQueryGateInput.java │ │ │ │ │ │ ├── WechatTransfersQueryGateInput.java │ │ │ │ │ │ ├── WechatOrderRepayGateInput.java │ │ │ │ │ │ ├── WechatCloseOrderGateOutput.java │ │ │ │ │ │ ├── WechatPayRefundGateInput.java │ │ │ │ │ │ ├── WechatPayRefundQueryGateInput.java │ │ │ │ │ │ ├── WechatPayUnifiedOrderGateOutput.java │ │ │ │ │ │ ├── WechatAppPayOutput.java │ │ │ │ │ │ ├── WechatPayNoticeGateOutput.java │ │ │ │ │ │ ├── WechatPayUnifiedOrderGateInput.java │ │ │ │ │ │ ├── WechatTransfersGateInput.java │ │ │ │ │ │ ├── WechatTransfersGateOutput.java │ │ │ │ │ │ └── WechatPayOrderQueryGateOutput.java │ │ │ │ │ ├── message │ │ │ │ │ │ ├── WechatPayDownloadBillOutputXml.java │ │ │ │ │ │ ├── WechatPayDownloadBillInputXml.java │ │ │ │ │ │ ├── WechatPayOrderQueryInputXml.java │ │ │ │ │ │ ├── WechatPayBasicDomain.java │ │ │ │ │ │ ├── WechatTransfersQueryInput.java │ │ │ │ │ │ ├── WechatJsapiResignDomain.java │ │ │ │ │ │ ├── WechatCloseOrderInputXml.java │ │ │ │ │ │ ├── WechatPayRefundResultNoticeXml.java │ │ │ │ │ │ ├── WechatPayRefundQueryInputXml.java │ │ │ │ │ │ └── WechatCloseOrderOutputXml.java │ │ │ │ │ └── WechatGateService.java │ │ │ │ ├── mapper │ │ │ │ │ ├── WechatEntityMapper.java │ │ │ │ │ └── WechatRefundEntityMapper.java │ │ │ │ ├── builder │ │ │ │ │ ├── WechatTransfersResponseMapper.java │ │ │ │ │ └── WechatTransfersQueryMapper.java │ │ │ │ └── utils │ │ │ │ │ └── HttpUtils.java │ │ │ │ ├── alipay │ │ │ │ ├── gate │ │ │ │ │ ├── domain │ │ │ │ │ │ ├── AlipayTradeCloseGateInput.java │ │ │ │ │ │ ├── AlipayTradeQueryGateInput.java │ │ │ │ │ │ ├── AlipayAppPayGateOutput.java │ │ │ │ │ │ ├── AlipayTradeCloseGateOutput.java │ │ │ │ │ │ ├── AlipayAppPayGateInput.java │ │ │ │ │ │ └── AlipayTradeQueryGateOutput.java │ │ │ │ │ └── AlipayGateService.java │ │ │ │ └── mapper │ │ │ │ │ └── AlipayAppEntityMapper.java │ │ │ │ ├── FastPayApplication.java │ │ │ │ └── bankpay │ │ │ │ ├── channel │ │ │ │ ├── gate │ │ │ │ │ ├── domain │ │ │ │ │ │ ├── PayInQueryGateInput.java │ │ │ │ │ │ ├── PayInGateOutput.java │ │ │ │ │ │ ├── PayInQueryGateOutput.java │ │ │ │ │ │ └── PayInGateInput.java │ │ │ │ │ ├── AllinpayGateService.java │ │ │ │ │ ├── message │ │ │ │ │ │ ├── m100011 │ │ │ │ │ │ │ ├── ReqAipg100011.java │ │ │ │ │ │ │ ├── ResAipg100011.java │ │ │ │ │ │ │ ├── ResTransret100011.java │ │ │ │ │ │ │ ├── ResInfo100011.java │ │ │ │ │ │ │ └── ReqInfo100011.java │ │ │ │ │ │ └── m200004 │ │ │ │ │ │ │ ├── ResAipg200004.java │ │ │ │ │ │ │ ├── ReqAipg200004.java │ │ │ │ │ │ │ ├── ReqQTransreq200004.java │ │ │ │ │ │ │ ├── ResInfo200004.java │ │ │ │ │ │ │ └── ReqInfo200004.java │ │ │ │ │ └── utils │ │ │ │ │ │ ├── SignUtils.java │ │ │ │ │ │ └── HttpUtils.java │ │ │ │ ├── AllinpayService.java │ │ │ │ └── impl │ │ │ │ │ └── AllinpayServiceImpl.java │ │ │ │ ├── mapper │ │ │ │ └── BankPayInEntityMapper.java │ │ │ │ └── impl │ │ │ │ └── BankPayServiceImpl.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── mybatis │ │ │ └── mybatis-config.xml │ └── test │ │ └── java │ │ └── com │ │ └── fastpay │ │ └── FastPayApplicationTests.java └── pom.xml └── README.md /fastpay-simple-admin/template/src/boot/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .mvn 3 | 4 | target 5 | node_modules -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/css/app.scss: -------------------------------------------------------------------------------- 1 | // app global css in SCSS form 2 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": true 4 | } 5 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwsanel/fastpay-simple/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /fastpay-simple-admin/template/.npmrc: -------------------------------------------------------------------------------- 1 | # pnpm-related options 2 | shamefully-hoist=true 3 | strict-peer-dependencies=false 4 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/i18n/index.ts: -------------------------------------------------------------------------------- 1 | import enUS from './en-US'; 2 | 3 | export default { 4 | 'en-US': enUS 5 | }; 6 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/.eslintignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /src-capacitor 3 | /src-cordova 4 | /.quasar 5 | /node_modules 6 | .eslintrc.js 7 | /src-ssr 8 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwsanel/fastpay-simple/HEAD/fastpay-simple-admin/template/public/favicon.ico -------------------------------------------------------------------------------- /fastpay-simple-admin/template/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@quasar/app-vite/tsconfig-preset", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | } 6 | } -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/bankpay/domain/PayInResult.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.domain; 2 | 3 | public class PayInResult { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/bankpay/domain/PayOutRequest.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.domain; 2 | 3 | public class PayOutRequest { 4 | } 5 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/bankpay/domain/PayOutResult.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.domain; 2 | 3 | public class PayOutResult { 4 | } 5 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/bankpay/domain/PayInQueryResult.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.domain; 2 | 3 | public class PayInQueryResult { 4 | } 5 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/bankpay/domain/PayInQueryRequest.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.domain; 2 | 3 | public class PayInQueryRequest { 4 | } 5 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/bankpay/domain/PayOutQueryRequest.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.domain; 2 | 3 | public class PayOutQueryRequest { 4 | } 5 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/bankpay/domain/PayOutQueryResult.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.domain; 2 | 3 | public class PayOutQueryResult { 4 | } 5 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/controller/WechatController.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.controller; 2 | 3 | public class WechatController { 4 | } 5 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/public/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwsanel/fastpay-simple/HEAD/fastpay-simple-admin/template/public/icons/favicon-16x16.png -------------------------------------------------------------------------------- /fastpay-simple-admin/template/public/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwsanel/fastpay-simple/HEAD/fastpay-simple-admin/template/public/icons/favicon-32x32.png -------------------------------------------------------------------------------- /fastpay-simple-admin/template/public/icons/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwsanel/fastpay-simple/HEAD/fastpay-simple-admin/template/public/icons/favicon-96x96.png -------------------------------------------------------------------------------- /fastpay-simple-admin/template/public/icons/favicon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwsanel/fastpay-simple/HEAD/fastpay-simple-admin/template/public/icons/favicon-128x128.png -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/components/models.ts: -------------------------------------------------------------------------------- 1 | export interface Todo { 2 | id: number; 3 | content: string; 4 | } 5 | 6 | export interface Meta { 7 | totalCount: number; 8 | } 9 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/pages/AlipayQueryPage.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/pages/WechatQueryPage.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/i18n/en-US/index.ts: -------------------------------------------------------------------------------- 1 | // This is just an example, 2 | // so you can safely delete all default props below 3 | 4 | export default { 5 | failed: 'Action failed', 6 | success: 'Action was successful' 7 | }; 8 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/controller/AlipayController.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.controller; 2 | 3 | import org.springframework.web.bind.annotation.RestController; 4 | 5 | //@RestController( "admin" ) 6 | public class AlipayController { 7 | } 8 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | declare namespace NodeJS { 4 | interface ProcessEnv { 5 | NODE_ENV: string; 6 | VUE_ROUTER_MODE: 'hash' | 'history' | 'abstract' | undefined; 7 | VUE_ROUTER_BASE: string | undefined; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /// 4 | 5 | // Mocks all files ending in `.vue` showing them as plain Vue instances 6 | declare module '*.vue' { 7 | import type { DefineComponent } from 'vue'; 8 | const component: DefineComponent<{}, {}, any>; 9 | export default component; 10 | } 11 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/stores/store-flag.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // THIS FEATURE-FLAG FILE IS AUTOGENERATED, 3 | // REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING 4 | import "quasar/dist/types/feature-flag"; 5 | 6 | declare module "quasar/dist/types/feature-flag" { 7 | interface QuasarFeatureFlags { 8 | store: true; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/common/AlipayStatus.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.common; 2 | 3 | public interface AlipayStatus { 4 | 5 | /** 6 | * 支付中 7 | */ 8 | String PAYING = "PAYING"; 9 | 10 | /** 11 | * 失败 12 | */ 13 | String FAIL = "FAIL"; 14 | 15 | /** 16 | * 成功 17 | */ 18 | String SUCCESS = "SUCCESS"; 19 | } 20 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/stores/example-store.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | 3 | export const useCounterStore = defineStore('counter', { 4 | state: () => ({ 5 | counter: 0, 6 | }), 7 | getters: { 8 | doubleCount: ( state ) => state.counter * 2, 9 | }, 10 | actions: { 11 | increment() { 12 | this.counter++; 13 | }, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/alipay/domain/AlipayTradeSyncInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.domain; 2 | 3 | public class AlipayTradeSyncInput { 4 | 5 | private String requestNo; 6 | 7 | public String getRequestNo() { 8 | return requestNo; 9 | } 10 | 11 | public void setRequestNo( String requestNo ) { 12 | this.requestNo = requestNo; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayDownloadBillGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayDownloadBillGateOutput { 4 | 5 | private String fileId; 6 | 7 | public String getFileId() { 8 | return fileId; 9 | } 10 | 11 | public void setFileId( String fileId ) { 12 | this.fileId = fileId; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mysql://localhost:3306/lilipay 2 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 3 | spring.datasource.username=root 4 | spring.datasource.password=123456 5 | 6 | mybatis.check-config-location=true 7 | mybatis.config-location=classpath:mybatis/mybatis-config.xml 8 | mybatis.mapper-locations=classpath:mybatis/mapperxml/*.xml 9 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayNoticeGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayNoticeGateInput { 4 | 5 | private String noticeXml; 6 | 7 | public String getNoticeXml() { 8 | return noticeXml; 9 | } 10 | 11 | public void setNoticeXml( String noticeXml ) { 12 | this.noticeXml = noticeXml; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "editorconfig.editorconfig", 6 | "vue.volar", 7 | "wayou.vscode-todo-highlight" 8 | ], 9 | "unwantedRecommendations": [ 10 | "octref.vetur", 11 | "hookyqr.beautify", 12 | "dbaeumer.jshint", 13 | "ms-vscode.vscode-typescript-tslint-plugin" 14 | ] 15 | } -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/alipay/gate/domain/AlipayTradeCloseGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.gate.domain; 2 | 3 | public class AlipayTradeCloseGateInput { 4 | 5 | private String outTradeNo; 6 | 7 | public String getOutTradeNo() { 8 | return outTradeNo; 9 | } 10 | 11 | public void setOutTradeNo( String outTradeNo ) { 12 | this.outTradeNo = outTradeNo; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/alipay/gate/domain/AlipayTradeQueryGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.gate.domain; 2 | 3 | public class AlipayTradeQueryGateInput { 4 | 5 | private String outTradeNo; 6 | 7 | public String getOutTradeNo() { 8 | return outTradeNo; 9 | } 10 | 11 | public void setOutTradeNo( String outTradeNo ) { 12 | this.outTradeNo = outTradeNo; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/FastPayApplication.java: -------------------------------------------------------------------------------- 1 | package com.fastpay; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class FastPayApplication { 8 | 9 | public static void main( String[] args ) { 10 | SpringApplication.run( FastPayApplication.class, args ); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/alipay/domain/AlipayOrderCloseInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.domain; 2 | 3 | public class AlipayOrderCloseInput { 4 | 5 | /** 6 | * 请求流水号 7 | */ 8 | private String requestNo; 9 | 10 | public String getRequestNo() { 11 | return requestNo; 12 | } 13 | 14 | public void setRequestNo( String requestNo ) { 15 | this.requestNo = requestNo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/alipay/domain/AlipayTradeQueryInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.domain; 2 | 3 | public class AlipayTradeQueryInput { 4 | 5 | /** 6 | * 请求流水号 7 | */ 8 | private String requestNo; 9 | 10 | public String getRequestNo() { 11 | return requestNo; 12 | } 13 | 14 | public void setRequestNo( String requestNo ) { 15 | this.requestNo = requestNo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatOrderCloseInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatOrderCloseInput { 4 | 5 | /** 6 | * 流水号 7 | */ 8 | private String requestNo; 9 | 10 | public String getRequestNo() { 11 | return requestNo; 12 | } 13 | 14 | public void setRequestNo( String requestNo ) { 15 | this.requestNo = requestNo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatOrderQueryInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatOrderQueryInput { 4 | 5 | /** 6 | * 流水号 7 | */ 8 | private String requestNo; 9 | 10 | public String getRequestNo() { 11 | return requestNo; 12 | } 13 | 14 | public void setRequestNo( String requestNo ) { 15 | this.requestNo = requestNo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/FastPayAdminApplication.java: -------------------------------------------------------------------------------- 1 | package com.fastpay; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class FastPayAdminApplication { 8 | 9 | public static void main( String[] args ) { 10 | SpringApplication.run( FastPayAdminApplication.class, args ); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatRefundQueryInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatRefundQueryInput { 4 | 5 | /** 6 | * 退款流水号 7 | */ 8 | private String requestNo; 9 | 10 | public String getRequestNo() { 11 | return requestNo; 12 | } 13 | 14 | public void setRequestNo( String requestNo ) { 15 | this.requestNo = requestNo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatTransferQueryInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatTransferQueryInput { 4 | 5 | /** 6 | * 流水号 7 | */ 8 | private String requestNo; 9 | 10 | public String getRequestNo() { 11 | return requestNo; 12 | } 13 | 14 | public void setRequestNo( String requestNo ) { 15 | this.requestNo = requestNo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatCloseOrderGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatCloseOrderGateInput { 4 | 5 | /** 6 | * 订单号 7 | */ 8 | private String orderNo; 9 | 10 | public String getOrderNo() { 11 | return orderNo; 12 | } 13 | 14 | public void setOrderNo( String orderNo ) { 15 | this.orderNo = orderNo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/alipay/domain/AlipayAppPayOrderInfo.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.domain; 2 | 3 | public class AlipayAppPayOrderInfo { 4 | 5 | /** 6 | * 唤起支付宝SDK所需的订单信息 7 | */ 8 | private String orderInfo; 9 | 10 | public String getOrderInfo() { 11 | return orderInfo; 12 | } 13 | 14 | public void setOrderInfo( String orderInfo ) { 15 | this.orderInfo = orderInfo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/domain/PayInQueryGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.domain; 2 | 3 | public class PayInQueryGateInput { 4 | 5 | /** 6 | * 订单号 7 | */ 8 | private String orderNo; 9 | 10 | public String getOrderNo() { 11 | return orderNo; 12 | } 13 | 14 | public void setOrderNo( String orderNo ) { 15 | this.orderNo = orderNo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/mapstruct/MenuMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.mapstruct; 2 | 3 | import com.fastpay.admin.domain.Menu; 4 | import com.fastpay.admin.entity.AdminMenuEntity; 5 | import org.mapstruct.Mapper; 6 | 7 | import java.util.List; 8 | 9 | @Mapper( componentModel = "spring" ) 10 | public interface MenuMapper { 11 | 12 | Menu mapper( AdminMenuEntity menuEntity ); 13 | 14 | List mapper( List menuEntities ); 15 | } 16 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.bracketPairColorization.enabled": true, 3 | "editor.guides.bracketPairs": true, 4 | "editor.formatOnSave": true, 5 | "editor.defaultFormatter": "esbenp.prettier-vscode", 6 | "editor.codeActionsOnSave": [ 7 | "source.fixAll.eslint" 8 | ], 9 | "eslint.validate": [ 10 | "javascript", 11 | "javascriptreact", 12 | "typescript", 13 | "vue" 14 | ], 15 | "typescript.tsdk": "node_modules/typescript/lib" 16 | } -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatTradeQueryOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatTradeQueryOutput { 4 | 5 | /** 6 | * 商户请求流水号 7 | */ 8 | private String memberRequestNo; 9 | 10 | public String getMemberRequestNo() { 11 | return memberRequestNo; 12 | } 13 | 14 | public void setMemberRequestNo( String memberRequestNo ) { 15 | this.memberRequestNo = memberRequestNo; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatOrderRepayGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | 4 | public class WechatOrderRepayGateOutput { 5 | 6 | 7 | private WechatAppPayOutput appPayRequest; 8 | 9 | public WechatAppPayOutput getAppPayRequest() { 10 | return appPayRequest; 11 | } 12 | 13 | public void setAppPayRequest( WechatAppPayOutput appPayRequest ) { 14 | this.appPayRequest = appPayRequest; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/quasar.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | // Forces TS to apply `@quasar/app-vite` augmentations of `quasar` package 4 | // Removing this would break `quasar/wrappers` imports as those typings are declared 5 | // into `@quasar/app-vite` 6 | // As a side effect, since `@quasar/app-vite` reference `quasar` to augment it, 7 | // this declaration also apply `quasar` own 8 | // augmentations (eg. adds `$q` into Vue component context) 9 | /// 10 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/domain/BankPayInListRequest.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.domain; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.Date; 5 | 6 | public class BankPayInListRequest { 7 | 8 | /** 9 | * 商户流水号 10 | */ 11 | private String requestNo; 12 | 13 | public String getRequestNo() { 14 | return requestNo; 15 | } 16 | 17 | public void setRequestNo( String requestNo ) { 18 | this.requestNo = requestNo; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mysql://localhost:3306/lilipay 2 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 3 | spring.datasource.username=root 4 | spring.datasource.password=123456 5 | mybatis.check-config-location=true 6 | mybatis.config-location=classpath:mybatis/mybatis-config.xml 7 | mybatis.mapper-locations=classpath:mybatis/mapperxml/*.xml 8 | alipay.serverUrl= 9 | alipay.appId= 10 | alipay.privateKey= 11 | alipay.publicKey= 12 | alipay.notifyUrl= -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/mapstruct/BankPayInMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.mapstruct; 2 | 3 | import com.fastpay.admin.domain.BankPayIn; 4 | import com.fastpay.admin.entity.BankPayInEntity; 5 | import org.mapstruct.Mapper; 6 | 7 | import java.util.List; 8 | 9 | @Mapper( componentModel = "spring" ) 10 | public interface BankPayInMapper { 11 | 12 | BankPayIn mapper( BankPayInEntity bankPayInEntity ); 13 | 14 | List mapper( List bankPayInEntities ); 15 | } 16 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/bankpay/BankPayService.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay; 2 | 3 | import com.fastpay.bankpay.domain.*; 4 | import com.fastpay.common.Response; 5 | 6 | public interface BankPayService { 7 | 8 | Response payIn( PayInRequest payInRequest ); 9 | 10 | Response payInQuery( PayInQueryRequest payInQueryRequest ); 11 | 12 | Response payOut( PayOutRequest payOutRequest ); 13 | 14 | Response payOutQuery( PayOutQueryRequest payOutQueryRequest ); 15 | } 16 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/AllinpayService.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel; 2 | 3 | import com.fastpay.bankpay.domain.*; 4 | import com.fastpay.common.Response; 5 | 6 | public interface AllinpayService { 7 | 8 | Response payIn( PayInRequest payInRequest ); 9 | 10 | Response payInQuery( PayInQueryRequest payInQueryRequest ); 11 | 12 | Response payOut( PayOutRequest payOutRequest ); 13 | 14 | Response payOutQuery( PayOutQueryRequest payOutQueryRequest ); 15 | } 16 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/mapper/BankPayInEntityMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.mapper; 2 | 3 | import com.fastpay.bankpay.entity.BankPayInEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | @Mapper 7 | public interface BankPayInEntityMapper { 8 | int deleteByPrimaryKey( Long id ); 9 | 10 | int insert( BankPayInEntity record ); 11 | 12 | int insertSelective( BankPayInEntity record ); 13 | 14 | BankPayInEntity selectByPrimaryKey( Long id ); 15 | 16 | int updateByPrimaryKeySelective( BankPayInEntity record ); 17 | 18 | int updateByPrimaryKey( BankPayInEntity record ); 19 | } -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayRefundNoticeGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayRefundNoticeGateInput { 4 | 5 | private String apiKey; 6 | 7 | private String noticeXml; 8 | 9 | public String getApiKey() { 10 | return apiKey; 11 | } 12 | 13 | public void setApiKey( String apiKey ) { 14 | this.apiKey = apiKey; 15 | } 16 | 17 | public String getNoticeXml() { 18 | return noticeXml; 19 | } 20 | 21 | public void setNoticeXml( String noticeXml ) { 22 | this.noticeXml = noticeXml; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/pages/ErrorNotFound.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 28 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/router/routes.ts: -------------------------------------------------------------------------------- 1 | import { RouteRecordRaw } from 'vue-router'; 2 | 3 | const routes: RouteRecordRaw[] = [ 4 | { 5 | path: '/', 6 | component: () => import('layouts/MainLayout.vue'), 7 | children: [ 8 | { path: '', component: () => import('pages/IndexPage.vue') }, 9 | { path: '/bankPayQuery', component: () => import('pages/BankPayQueryPage.vue') } 10 | ], 11 | }, 12 | 13 | // Always leave this as last one, 14 | // but you can also remove it 15 | { 16 | path: '/:catchAll(.*)*', 17 | component: () => import('pages/ErrorNotFound.vue'), 18 | }, 19 | ]; 20 | 21 | export default routes; 22 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .thumbs.db 3 | node_modules 4 | 5 | # Quasar core related directories 6 | .quasar 7 | /dist 8 | 9 | # Cordova related directories and files 10 | /src-cordova/node_modules 11 | /src-cordova/platforms 12 | /src-cordova/plugins 13 | /src-cordova/www 14 | 15 | # Capacitor related directories and files 16 | /src-capacitor/www 17 | /src-capacitor/node_modules 18 | 19 | # BEX related directories and files 20 | /src-bex/www 21 | /src-bex/js/core 22 | 23 | # Log files 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # Editor directories and files 29 | .idea 30 | *.suo 31 | *.ntvs* 32 | *.njsproj 33 | *.sln 34 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/AllinpayGateService.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate; 2 | 3 | import com.fastpay.bankpay.channel.gate.domain.PayInGateInput; 4 | import com.fastpay.bankpay.channel.gate.domain.PayInGateOutput; 5 | import com.fastpay.bankpay.channel.gate.domain.PayInQueryGateInput; 6 | import com.fastpay.bankpay.channel.gate.domain.PayInQueryGateOutput; 7 | import com.fastpay.common.Response; 8 | 9 | public interface AllinpayGateService { 10 | 11 | Response> payIn( PayInGateInput payInGateInput ); 12 | 13 | Response> payInQuery( PayInQueryGateInput payInQueryGateInput ); 14 | } 15 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/common/BaseDomain.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.common; 2 | 3 | import com.fasterxml.jackson.core.JsonProcessingException; 4 | import com.fasterxml.jackson.databind.ObjectMapper; 5 | 6 | import java.io.Serializable; 7 | 8 | public abstract class BaseDomain implements Serializable { 9 | 10 | private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); 11 | 12 | @Override 13 | public String toString() { 14 | try { 15 | return getClass().getSimpleName() + OBJECT_MAPPER.writeValueAsString( this ); 16 | } catch ( JsonProcessingException e ) { 17 | throw new RuntimeException( e ); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatPrepayQueryInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatPrepayQueryInput { 4 | 5 | /** 6 | * 请求流水号 7 | */ 8 | private String requestNo; 9 | 10 | /** 11 | * 预支付ID 12 | */ 13 | private String prepayId; 14 | 15 | public String getRequestNo() { 16 | return requestNo; 17 | } 18 | 19 | public void setRequestNo( String requestNo ) { 20 | this.requestNo = requestNo; 21 | } 22 | 23 | public String getPrepayId() { 24 | return prepayId; 25 | } 26 | 27 | public void setPrepayId( String prepayId ) { 28 | this.prepayId = prepayId; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/mapper/WechatEntityMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.mapper; 2 | 3 | import com.fastpay.wechat.entity.WechatEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | @Mapper 8 | public interface WechatEntityMapper { 9 | int deleteByPrimaryKey( Long id ); 10 | 11 | int insert( WechatEntity record ); 12 | 13 | int insertSelective( WechatEntity record ); 14 | 15 | WechatEntity selectByPrimaryKey( Long id ); 16 | 17 | int updateByPrimaryKeySelective( WechatEntity record ); 18 | 19 | int updateByPrimaryKey( WechatEntity record ); 20 | 21 | WechatEntity selectByRequestNo( @Param( "requestNo" ) String requestNo ); 22 | } -------------------------------------------------------------------------------- /fastpay-simple-admin/template/README.md: -------------------------------------------------------------------------------- 1 | # fastpay admin (fastpay-admin) 2 | 3 | fastpay 4 | 5 | ## Install the dependencies 6 | 7 | ```bash 8 | yarn 9 | # or 10 | npm install 11 | ``` 12 | 13 | ### Start the app in development mode (hot-code reloading, error reporting, etc.) 14 | 15 | ```bash 16 | quasar dev 17 | ``` 18 | 19 | ### Lint the files 20 | 21 | ```bash 22 | yarn lint 23 | # or 24 | npm run lint 25 | ``` 26 | 27 | ### Format the files 28 | 29 | ```bash 30 | yarn format 31 | # or 32 | npm run format 33 | ``` 34 | 35 | ### Build the app for production 36 | 37 | ```bash 38 | quasar build 39 | ``` 40 | 41 | ### Customize the configuration 42 | 43 | See [Configuring quasar.config.js](https://v2.quasar.dev/quasar-cli-vite/quasar-config-js). 44 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayDownloadBillGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayDownloadBillGateInput { 4 | 5 | /** 6 | * 对账日期 7 | */ 8 | private String billDate; 9 | 10 | /** 11 | * 对账单类型, 默认下载ALL类型 12 | */ 13 | private String billType; 14 | 15 | public String getBillDate() { 16 | return billDate; 17 | } 18 | 19 | public void setBillDate( String billDate ) { 20 | this.billDate = billDate; 21 | } 22 | 23 | public String getBillType() { 24 | return billType; 25 | } 26 | 27 | public void setBillType( String billType ) { 28 | this.billType = billType; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/mapper/AdminMenuEntityMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.mapper; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | 5 | import java.util.List; 6 | 7 | import com.fastpay.admin.entity.AdminMenuEntity; 8 | import org.apache.ibatis.annotations.Mapper; 9 | 10 | @Mapper 11 | public interface AdminMenuEntityMapper { 12 | int deleteByPrimaryKey( Integer id ); 13 | 14 | int insert( AdminMenuEntity record ); 15 | 16 | int insertSelective( AdminMenuEntity record ); 17 | 18 | AdminMenuEntity selectByPrimaryKey( Integer id ); 19 | 20 | int updateByPrimaryKeySelective( AdminMenuEntity record ); 21 | 22 | int updateByPrimaryKey( AdminMenuEntity record ); 23 | 24 | List selectAll(); 25 | } -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatTradeQueryInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatTradeQueryInput { 4 | 5 | /** 6 | * 商户订单号 7 | */ 8 | private String memberOrderNo; 9 | 10 | /** 11 | * 微信支付订单号 12 | */ 13 | private String wechatOrderNo; 14 | 15 | public String getMemberOrderNo() { 16 | return memberOrderNo; 17 | } 18 | 19 | public void setMemberOrderNo( String memberOrderNo ) { 20 | this.memberOrderNo = memberOrderNo; 21 | } 22 | 23 | public String getWechatOrderNo() { 24 | return wechatOrderNo; 25 | } 26 | 27 | public void setWechatOrderNo( String wechatOrderNo ) { 28 | this.wechatOrderNo = wechatOrderNo; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/alipay/mapper/AlipayAppEntityMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.mapper; 2 | 3 | import com.fastpay.alipay.entity.AlipayAppEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | @Mapper 8 | public interface AlipayAppEntityMapper { 9 | 10 | int deleteByPrimaryKey( Long id ); 11 | 12 | int insert( AlipayAppEntity record ); 13 | 14 | int insertSelective( AlipayAppEntity record ); 15 | 16 | AlipayAppEntity selectByPrimaryKey( Long id ); 17 | 18 | int updateByPrimaryKeySelective( AlipayAppEntity record ); 19 | 20 | int updateByPrimaryKey( AlipayAppEntity record ); 21 | 22 | AlipayAppEntity selectByRequestNo( @Param( "requestNo" ) String requestNo ); 23 | } -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayOrderQueryGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayOrderQueryGateInput { 4 | 5 | /** 6 | * 微信订单号 7 | */ 8 | private String transactionId; 9 | 10 | /** 11 | * 商户订单号 12 | */ 13 | private String outTradeNo; 14 | 15 | public String getTransactionId() { 16 | return transactionId; 17 | } 18 | 19 | public void setTransactionId( String transactionId ) { 20 | this.transactionId = transactionId; 21 | } 22 | 23 | public String getOutTradeNo() { 24 | return outTradeNo; 25 | } 26 | 27 | public void setOutTradeNo( String outTradeNo ) { 28 | this.outTradeNo = outTradeNo; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /fastpay-simple-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.fastpay 8 | fastpay-simple 9 | 1.0.0-SNAPSHOT 10 | 11 | 12 | fastpay-simple-api 13 | 14 | 15 | 8 16 | 8 17 | UTF-8 18 | 19 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/mapper/WechatRefundEntityMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.mapper; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | 5 | import com.fastpay.wechat.entity.WechatRefundEntity; 6 | import org.apache.ibatis.annotations.Mapper; 7 | 8 | @Mapper 9 | public interface WechatRefundEntityMapper { 10 | int deleteByPrimaryKey( Integer id ); 11 | 12 | int insert( WechatRefundEntity record ); 13 | 14 | int insertSelective( WechatRefundEntity record ); 15 | 16 | WechatRefundEntity selectByPrimaryKey( Integer id ); 17 | 18 | int updateByPrimaryKeySelective( WechatRefundEntity record ); 19 | 20 | int updateByPrimaryKey( WechatRefundEntity record ); 21 | 22 | WechatRefundEntity selectByRequestNo( @Param( "requestNo" ) String requestNo ); 23 | } -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/mapper/BankPayInEntityMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.mapper; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | 5 | import java.util.List; 6 | 7 | import com.fastpay.admin.entity.BankPayInEntity; 8 | import org.apache.ibatis.annotations.Mapper; 9 | 10 | @Mapper 11 | public interface BankPayInEntityMapper { 12 | int deleteByPrimaryKey( Long id ); 13 | 14 | int insert( BankPayInEntity record ); 15 | 16 | int insertSelective( BankPayInEntity record ); 17 | 18 | BankPayInEntity selectByPrimaryKey( Long id ); 19 | 20 | int updateByPrimaryKeySelective( BankPayInEntity record ); 21 | 22 | int updateByPrimaryKey( BankPayInEntity record ); 23 | 24 | List selectByRequestNo( @Param( "requestNo" ) String requestNo ); 25 | } -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/components/EssentialLink.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 37 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/common/Constants.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.common; 2 | 3 | public interface Constants { 4 | 5 | String ALIPAY_PAYING = "PAYING"; 6 | 7 | String ALIPAY_FAIL = "FAIL"; 8 | 9 | String ALIPAY_SUCCESS = "SUCCESS"; 10 | 11 | String WECHAT_PAYING = "PAYING"; 12 | 13 | String WECHAT_SUCCESS = "SUCCESS"; 14 | 15 | String WECHAT_FAIL = "FAIL"; 16 | 17 | String WECHAT_DATE_PATTERN = "yyyyMMddHHmmss"; 18 | 19 | String WECHAT_REFUND_REFUNDING = "REFUNDING"; 20 | 21 | String WECHAT_REFUND_FAIL = "FAIL"; 22 | 23 | String WECHAT_REFUND_SUCCESS = "SUCCESS"; 24 | 25 | String BANK_PAY_PROCESSING = "PROCESSING"; 26 | 27 | String BANK_PAY_SUCCESS = "SUCCESS"; 28 | 29 | String BANK_PAY_FAIL = "FAIL"; 30 | 31 | String ALLINPAY_DATE_PATTERN = "yyyyMMddHHmmss"; 32 | } 33 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m100011/ReqAipg100011.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m100011; 2 | 3 | import javax.xml.bind.annotation.*; 4 | 5 | @XmlRootElement( name = "AIPG" ) 6 | @XmlAccessorType( XmlAccessType.FIELD ) 7 | public class ReqAipg100011 { 8 | 9 | @XmlElement( name = "INFO" ) 10 | private ReqInfo100011 info; 11 | 12 | @XmlElement( name = "TRANS" ) 13 | private ReqTrans100011 trans; 14 | 15 | public ReqInfo100011 getInfo() { 16 | return info; 17 | } 18 | 19 | public void setInfo( ReqInfo100011 info ) { 20 | this.info = info; 21 | } 22 | 23 | public ReqTrans100011 getTrans() { 24 | return trans; 25 | } 26 | 27 | public void setTrans( ReqTrans100011 trans ) { 28 | this.trans = trans; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/css/quasar.variables.scss: -------------------------------------------------------------------------------- 1 | // Quasar SCSS (& Sass) Variables 2 | // -------------------------------------------------- 3 | // To customize the look and feel of this app, you can override 4 | // the Sass/SCSS variables found in Quasar's source Sass/SCSS files. 5 | 6 | // Check documentation for full list of Quasar variables 7 | 8 | // Your own variables (that are declared here) and Quasar's own 9 | // ones will be available out of the box in your .vue/.scss/.sass files 10 | 11 | // It's highly recommended to change the default colors 12 | // to match your app's branding. 13 | // Tip: Use the "Theme Builder" on Quasar's documentation website. 14 | 15 | $primary: #1976D2; 16 | $secondary: #26A69A; 17 | $accent: #9C27B0; 18 | 19 | $dark: #1D1D1D; 20 | $dark-page: #121212; 21 | 22 | $positive: #21BA45; 23 | $negative: #C10015; 24 | $info: #31CCEC; 25 | $warning: #F2C037; 26 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatSceneInfo.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | import com.alibaba.fastjson.annotation.JSONField; 4 | 5 | public class WechatSceneInfo { 6 | 7 | /** 8 | * h5支付对应的支付场景信息 9 | */ 10 | @JSONField( name = "h5_info" ) 11 | private WechatH5Info h5Info; 12 | 13 | /** 14 | * 支付场景信息 用于线下活动上报门店信息 15 | */ 16 | @JSONField( name = "store_info" ) 17 | private WechatStoreInfo storeInfo; 18 | 19 | public WechatH5Info getH5Info() { 20 | return h5Info; 21 | } 22 | 23 | public void setH5Info( WechatH5Info h5Info ) { 24 | this.h5Info = h5Info; 25 | } 26 | 27 | public WechatStoreInfo getStoreInfo() { 28 | return storeInfo; 29 | } 30 | 31 | public void setStoreInfo( WechatStoreInfo storeInfo ) { 32 | this.storeInfo = storeInfo; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/pages/IndexPage.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 43 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/common/ResponseUtils.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.common; 2 | 3 | public class ResponseUtils { 4 | 5 | private ResponseUtils() { 6 | //no instance 7 | } 8 | 9 | public static Response success() { 10 | Response response = new Response<>(); 11 | response.setSuccess( true ); 12 | return response; 13 | } 14 | 15 | public static Response success( T data ) { 16 | Response response = new Response<>(); 17 | response.setSuccess( true ); 18 | response.setData( data ); 19 | return response; 20 | } 21 | 22 | public static Response fail( String errorCode, String errorMsg ) { 23 | Response response = new Response<>(); 24 | response.setSuccess( false ); 25 | response.setErrorCode( errorCode ); 26 | response.setErrorCode( errorMsg ); 27 | return response; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/postcss.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // https://github.com/michael-ciniawsky/postcss-load-config 3 | 4 | module.exports = { 5 | plugins: [ 6 | // https://github.com/postcss/autoprefixer 7 | require('autoprefixer')({ 8 | overrideBrowserslist: [ 9 | 'last 4 Chrome versions', 10 | 'last 4 Firefox versions', 11 | 'last 4 Edge versions', 12 | 'last 4 Safari versions', 13 | 'last 4 Android versions', 14 | 'last 4 ChromeAndroid versions', 15 | 'last 4 FirefoxAndroid versions', 16 | 'last 4 iOS versions' 17 | ] 18 | }) 19 | 20 | // https://github.com/elchininet/postcss-rtlcss 21 | // If you want to support RTL css, then 22 | // 1. yarn/npm install postcss-rtlcss 23 | // 2. optionally set quasar.config.js > framework > lang to an RTL language 24 | // 3. uncomment the following line: 25 | // require('postcss-rtlcss') 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/alipay/domain/AlipayAppPayTradeOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.domain; 2 | 3 | public class AlipayAppPayTradeOutput { 4 | 5 | /** 6 | * 商户流水号 7 | */ 8 | private String requestNo; 9 | 10 | /** 11 | * 支付状态 12 | */ 13 | private String status; 14 | 15 | /** 16 | * 支付宝订单号 17 | */ 18 | private String tradeNo; 19 | 20 | public String getRequestNo() { 21 | return requestNo; 22 | } 23 | 24 | public void setRequestNo( String requestNo ) { 25 | this.requestNo = requestNo; 26 | } 27 | 28 | public String getStatus() { 29 | return status; 30 | } 31 | 32 | public void setStatus( String status ) { 33 | this.status = status; 34 | } 35 | 36 | public String getTradeNo() { 37 | return tradeNo; 38 | } 39 | 40 | public void setTradeNo( String tradeNo ) { 41 | this.tradeNo = tradeNo; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /fastpay-simple-app/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.fastpay 8 | fastpay-simple 9 | 1.0.0-SNAPSHOT 10 | 11 | 12 | fastpay-simple-app 13 | 14 | 15 | 8 16 | 8 17 | UTF-8 18 | 19 | 20 | 21 | 22 | com.fastpay 23 | fastpay-simple-api 24 | 25 | 26 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m200004/ResAipg200004.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m200004; 2 | 3 | import javax.xml.bind.annotation.*; 4 | import java.util.List; 5 | 6 | @XmlRootElement( name = "AIPG" ) 7 | @XmlAccessorType( XmlAccessType.FIELD ) 8 | public class ResAipg200004 { 9 | 10 | @XmlElement( name = "INFO" ) 11 | private ResInfo200004 info; 12 | 13 | @XmlElementWrapper( name = "QTRANSRSP" ) 14 | @XmlElement( name = "TRANSRET" ) 15 | private List qtdetail; 16 | 17 | public ResInfo200004 getInfo() { 18 | return info; 19 | } 20 | 21 | public void setInfo( ResInfo200004 info ) { 22 | this.info = info; 23 | } 24 | 25 | public List getQtdetail() { 26 | return qtdetail; 27 | } 28 | 29 | public void setQtdetail( List qtdetail ) { 30 | this.qtdetail = qtdetail; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/stores/index.ts: -------------------------------------------------------------------------------- 1 | import { store } from 'quasar/wrappers' 2 | import { createPinia } from 'pinia' 3 | import { Router } from 'vue-router'; 4 | 5 | /* 6 | * When adding new properties to stores, you should also 7 | * extend the `PiniaCustomProperties` interface. 8 | * @see https://pinia.vuejs.org/core-concepts/plugins.html#typing-new-store-properties 9 | */ 10 | declare module 'pinia' { 11 | export interface PiniaCustomProperties { 12 | readonly router: Router; 13 | } 14 | } 15 | 16 | /* 17 | * If not building with SSR mode, you can 18 | * directly export the Store instantiation; 19 | * 20 | * The function below can be async too; either use 21 | * async/await or return a Promise which resolves 22 | * with the Store instance. 23 | */ 24 | 25 | export default store((/* { ssrContext } */ ) => { 26 | const pinia = createPinia() 27 | 28 | // You can add Pinia plugins here 29 | // pinia.use(SomePiniaPlugin) 30 | 31 | return pinia 32 | }) 33 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatOrderNoticeRequest.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatOrderNoticeRequest { 4 | 5 | /** 6 | * 微信流水号 7 | */ 8 | private String memberNo; 9 | 10 | /** 11 | * 订单号 12 | */ 13 | private String orderNo; 14 | 15 | /** 16 | * 原始XML报文 17 | */ 18 | private String noticeXml; 19 | 20 | public String getMemberNo() { 21 | return memberNo; 22 | } 23 | 24 | public void setMemberNo( String memberNo ) { 25 | this.memberNo = memberNo; 26 | } 27 | 28 | public String getOrderNo() { 29 | return orderNo; 30 | } 31 | 32 | public void setOrderNo( String orderNo ) { 33 | this.orderNo = orderNo; 34 | } 35 | 36 | public String getNoticeXml() { 37 | return noticeXml; 38 | } 39 | 40 | public void setNoticeXml( String noticeXml ) { 41 | this.noticeXml = noticeXml; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/impl/AllinpayServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.impl; 2 | 3 | import com.fastpay.bankpay.channel.AllinpayService; 4 | import com.fastpay.bankpay.domain.*; 5 | import com.fastpay.common.Response; 6 | import org.springframework.stereotype.Service; 7 | 8 | @Service 9 | public class AllinpayServiceImpl implements AllinpayService { 10 | 11 | @Override 12 | public Response payIn( PayInRequest payInRequest ) { 13 | return null; 14 | } 15 | 16 | @Override 17 | public Response payInQuery( PayInQueryRequest payInQueryRequest ) { 18 | return null; 19 | } 20 | 21 | @Override 22 | public Response payOut( PayOutRequest payOutRequest ) { 23 | return null; 24 | } 25 | 26 | @Override 27 | public Response payOutQuery( PayOutQueryRequest payOutQueryRequest ) { 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/controller/MenuController.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.controller; 2 | 3 | import com.fastpay.admin.domain.Menu; 4 | import com.fastpay.admin.mapper.AdminMenuEntityMapper; 5 | import com.fastpay.admin.mapstruct.MenuMapper; 6 | import org.springframework.stereotype.Component; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import javax.annotation.Resource; 12 | import java.util.List; 13 | 14 | @RestController 15 | @RequestMapping( "admin" ) 16 | public class MenuController { 17 | 18 | @Resource 19 | private MenuMapper menuMapper; 20 | 21 | @Resource 22 | private AdminMenuEntityMapper adminMenuEntityMapper; 23 | 24 | @GetMapping( "menus" ) 25 | public List menus() { 26 | return menuMapper.mapper( adminMenuEntityMapper.selectAll() ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GotPay 得付 2 | 3 | ## 项目简介 4 | 5 | 致力于打造千万级高可用支付平台,旨在简化支付对接流程,实现开箱即用,从而节省研发和人力投入成本。我们开源了代码,供大家学习交流使用。如果您需要相关文档或者定制化需求,请加QQ群或者直接联系开发者。我们将不断优化和完善平台,以满足用户的需求。 6 | 7 | ## 项目功能 8 | 9 | 1. 微信支付快速接入解决方案 10 | 2. 支付宝快速接入解决方案 11 | 3. 银行卡支付快速接入解决方案 12 | 4. SDK支持 13 | 5. 高并发能力支持 14 | 6. 高可用能力支持 15 | 16 | ## 模块划分 17 | 18 | | 模块 | 功能描述 | 19 | |----------------------|-------| 20 | | fastpay-simple-admin | 管理系统 | 21 | | fastpay-simple-api | 交易api | 22 | | fastpay-simple-app | 交易核心 | 23 | 24 | ## 支付用例 25 | 26 | ### 支付宝 27 | 28 | ## 项目要求 29 | 30 | 开发语言:JAVA 31 | 技术栈:SpringBoot、Redis、RocketMQ、MySQL 32 | 33 | 数据库最低版本要求:5.7 34 | JDK最低版本要求:1.8 35 | 36 | ## 更新日志 37 | 38 | 2023-04-18 1.0.0 版本 39 | 40 | 微信支付快速接入解决方案 41 | 42 | 支付宝快速接入解决方案 43 | 44 | 银行卡支付快速解决方案 45 | 46 | 2023-04-21 1.0.1 版本 47 | 48 | SDK 能力支持 49 | 50 | 可扩展定制化能力支持 51 | 52 | 高并发支持 53 | 54 | ## 项目成员 55 | 56 | 我们的团队成员来自头部互金公司和数字货币交易所,他们将为我们的团队带来宝贵的专业知识和经验,帮助我们设计高性能和可靠的支付平台。 57 | 58 | ## 技术交流 59 | 60 | QQ群:561587480 61 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 40 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%= productName %> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m100011/ResAipg100011.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m100011; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "AIPG" ) 9 | @XmlAccessorType( XmlAccessType.FIELD ) 10 | public class ResAipg100011 { 11 | 12 | @XmlElement( name = "INFO" ) 13 | private ResInfo100011 info; 14 | 15 | @XmlElement( name = "TRANSRET" ) 16 | private ResTransret100011 transret; 17 | 18 | public ResInfo100011 getInfo() { 19 | return info; 20 | } 21 | 22 | public void setInfo( ResInfo100011 info ) { 23 | this.info = info; 24 | } 25 | 26 | public ResTransret100011 getTransret() { 27 | return transret; 28 | } 29 | 30 | public void setTransret( ResTransret100011 transret ) { 31 | this.transret = transret; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatPayDownloadBillOutputXml.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "xml" ) 9 | @XmlAccessorType( value = XmlAccessType.FIELD ) 10 | public class WechatPayDownloadBillOutputXml { 11 | @XmlElement( name = "return_code" ) 12 | private String returnCode; 13 | @XmlElement( name = "return_msg" ) 14 | private String returnMsg; 15 | 16 | public String getReturnCode() { 17 | return returnCode; 18 | } 19 | 20 | public void setReturnCode( String returnCode ) { 21 | this.returnCode = returnCode; 22 | } 23 | 24 | public String getReturnMsg() { 25 | return returnMsg; 26 | } 27 | 28 | public void setReturnMsg( String returnMsg ) { 29 | this.returnMsg = returnMsg; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatPayDownloadBillInputXml.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "xml" ) 9 | @XmlAccessorType( value = XmlAccessType.FIELD ) 10 | public class WechatPayDownloadBillInputXml extends WechatPayBasicDomain { 11 | @XmlElement( name = "bill_date" ) 12 | private String billDate; 13 | @XmlElement( name = "bill_type" ) 14 | private String billType; 15 | 16 | public String getBillDate() { 17 | return billDate; 18 | } 19 | 20 | public void setBillDate( String billDate ) { 21 | this.billDate = billDate; 22 | } 23 | 24 | public String getBillType() { 25 | return billType; 26 | } 27 | 28 | public void setBillType( String billType ) { 29 | this.billType = billType; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m200004/ReqAipg200004.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m200004; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "AIPG" ) 9 | @XmlAccessorType( XmlAccessType.FIELD ) 10 | public class ReqAipg200004 { 11 | 12 | @XmlElement( name = "INFO" ) 13 | private ReqInfo200004 info; 14 | 15 | @XmlElement( name = "QTRANSREQ" ) 16 | private ReqQTransreq200004 qtransreq; 17 | 18 | public ReqInfo200004 getInfo() { 19 | return info; 20 | } 21 | 22 | public void setInfo( ReqInfo200004 info ) { 23 | this.info = info; 24 | } 25 | 26 | public ReqQTransreq200004 getQtransreq() { 27 | return qtransreq; 28 | } 29 | 30 | public void setQtransreq( ReqQTransreq200004 qtransreq ) { 31 | this.qtransreq = qtransreq; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatPrepayQueryOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatPrepayQueryOutput { 4 | 5 | /** 6 | * 请求流水号 7 | */ 8 | private String requestNo; 9 | 10 | /** 11 | * 订单状态 12 | */ 13 | private String status; 14 | 15 | /** 16 | * 调起支付请求参数 17 | */ 18 | private WechatPayRequest weixinPayRequest; 19 | 20 | public String getRequestNo() { 21 | return requestNo; 22 | } 23 | 24 | public void setRequestNo( String requestNo ) { 25 | this.requestNo = requestNo; 26 | } 27 | 28 | public String getStatus() { 29 | return status; 30 | } 31 | 32 | public void setStatus( String status ) { 33 | this.status = status; 34 | } 35 | 36 | public WechatPayRequest getWeixinPayRequest() { 37 | return weixinPayRequest; 38 | } 39 | 40 | public void setWeixinPayRequest( WechatPayRequest weixinPayRequest ) { 41 | this.weixinPayRequest = weixinPayRequest; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m200004/ReqQTransreq200004.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m200004; 2 | 3 | 4 | import javax.xml.bind.annotation.XmlAccessType; 5 | import javax.xml.bind.annotation.XmlAccessorType; 6 | import javax.xml.bind.annotation.XmlElement; 7 | import javax.xml.bind.annotation.XmlRootElement; 8 | 9 | @XmlRootElement( name = "TRANS" ) 10 | @XmlAccessorType( XmlAccessType.FIELD ) 11 | public class ReqQTransreq200004 { 12 | 13 | @XmlElement( name = "MERCHANT_ID" ) //商户代码 14 | private String merchantId; 15 | 16 | @XmlElement( name = "QUERY_SN" ) //要查询的交易流水 17 | private String querySn; 18 | 19 | public String getMerchantId() { 20 | return merchantId; 21 | } 22 | 23 | public void setMerchantId( String merchantId ) { 24 | this.merchantId = merchantId; 25 | } 26 | 27 | public String getQuerySn() { 28 | return querySn; 29 | } 30 | 31 | public void setQuerySn( String querySn ) { 32 | this.querySn = querySn; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar 19 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/alipay/gate/AlipayGateService.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.gate; 2 | 3 | import com.fastpay.alipay.gate.domain.*; 4 | import com.fastpay.common.Response; 5 | 6 | public interface AlipayGateService { 7 | 8 | /** 9 | * APP支付 (创建订单信息) 10 | * 11 | * @param appPayRequest APP支付请求 12 | * @return APP支付请求创建订单结果 13 | */ 14 | Response appPay( AlipayAppPayGateInput appPayRequest ); 15 | 16 | /** 17 | * 统一收单线下交易查询 18 | * 19 | * @param tradeQueryRequest 统一收单线下交易查询请求 20 | * @return 统一收单线下交易查询结果 21 | */ 22 | Response tradeQuery( AlipayTradeQueryGateInput tradeQueryRequest ); 23 | 24 | /** 25 | * 统一收单交易关闭接口 26 | * 27 | * @param tradeCloseRequest 统一收单交易关闭请求 28 | * @return 统一收单交易关闭结果 29 | */ 30 | Response tradeClose( AlipayTradeCloseGateInput tradeCloseRequest ); 31 | } 32 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/common/Response.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.common; 2 | 3 | public class Response { 4 | 5 | private Boolean success; 6 | 7 | private T data; 8 | 9 | private String errorCode; 10 | 11 | private String errorMsg; 12 | 13 | protected Response() { 14 | } 15 | 16 | public Boolean isSuccess() { 17 | return success; 18 | } 19 | 20 | public Boolean getSuccess() { 21 | return success; 22 | } 23 | 24 | public void setSuccess( Boolean success ) { 25 | this.success = success; 26 | } 27 | 28 | public T getData() { 29 | return data; 30 | } 31 | 32 | public void setData( T data ) { 33 | this.data = data; 34 | } 35 | 36 | public String getErrorCode() { 37 | return errorCode; 38 | } 39 | 40 | public void setErrorCode( String errorCode ) { 41 | this.errorCode = errorCode; 42 | } 43 | 44 | public String getErrorMsg() { 45 | return errorMsg; 46 | } 47 | 48 | public void setErrorMsg( String errorMsg ) { 49 | this.errorMsg = errorMsg; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/resources/mybatis/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { route } from 'quasar/wrappers'; 2 | import { 3 | createMemoryHistory, 4 | createRouter, 5 | createWebHashHistory, 6 | createWebHistory, 7 | } from 'vue-router'; 8 | 9 | import routes from './routes'; 10 | 11 | /* 12 | * If not building with SSR mode, you can 13 | * directly export the Router instantiation; 14 | * 15 | * The function below can be async too; either use 16 | * async/await or return a Promise which resolves 17 | * with the Router instance. 18 | */ 19 | 20 | export default route(function (/* { store, ssrContext } */ ) { 21 | const createHistory = process.env.SERVER 22 | ? createMemoryHistory 23 | : (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory); 24 | 25 | const Router = createRouter({ 26 | scrollBehavior: () => ({ left: 0, top: 0 }), 27 | routes, 28 | 29 | // Leave this as is and make changes in quasar.conf.js instead! 30 | // quasar.conf.js -> build -> vueRouterMode 31 | // quasar.conf.js -> build -> publicPath 32 | history: createHistory(process.env.VUE_ROUTER_BASE), 33 | }); 34 | 35 | return Router; 36 | }); 37 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/alipay/AlipayService.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay; 2 | 3 | import com.fastpay.alipay.domain.*; 4 | import com.fastpay.common.Response; 5 | 6 | /** 7 | * 支付宝服务 8 | */ 9 | public interface AlipayService { 10 | 11 | /** 12 | * APP支付 13 | * 14 | * @param alipayAppPayRequest APP支付请求 15 | * @return APP支付订单信息 前端使用订单信息唤起支付宝SDK 16 | */ 17 | Response appPay( AlipayAppPayInput alipayAppPayRequest ); 18 | 19 | /** 20 | * 订单查询 21 | * 22 | * @param orderQueryRequest 订单查询请求 23 | * @return 订单信息 24 | */ 25 | Response tradeQuery( AlipayTradeQueryInput orderQueryRequest ); 26 | 27 | /** 28 | * 订单同步 29 | * 30 | * @return 订单信息 31 | */ 32 | Response tradeSync( AlipayTradeSyncInput tradeSyncRequest ); 33 | 34 | /** 35 | * 尝试关闭订单
36 | * 用户未支付订单关闭成功会返回交易失败,如果用户已支付会返回交易成功 37 | * 38 | * @param orderCloseRequest 订单关闭请求 39 | * @return 订单信息 40 | */ 41 | Response orderClose( AlipayOrderCloseInput orderCloseRequest ); 42 | } 43 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/boot/i18n.ts: -------------------------------------------------------------------------------- 1 | import { boot } from 'quasar/wrappers'; 2 | import { createI18n } from 'vue-i18n'; 3 | 4 | import messages from 'src/i18n'; 5 | 6 | export type MessageLanguages = keyof typeof messages; 7 | // Type-define 'en-US' as the master schema for the resource 8 | export type MessageSchema = typeof messages['en-US']; 9 | 10 | // See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition 11 | /* eslint-disable @typescript-eslint/no-empty-interface */ 12 | declare module 'vue-i18n' { 13 | // define the locale messages schema 14 | export interface DefineLocaleMessage extends MessageSchema { 15 | } 16 | 17 | // define the datetime format schema 18 | export interface DefineDateTimeFormat { 19 | } 20 | 21 | // define the number format schema 22 | export interface DefineNumberFormat { 23 | } 24 | } 25 | /* eslint-enable @typescript-eslint/no-empty-interface */ 26 | 27 | export default boot(( { app } ) => { 28 | const i18n = createI18n({ 29 | locale: 'en-US', 30 | legacy: false, 31 | messages, 32 | }); 33 | 34 | // Set i18n instance on app 35 | app.use(i18n); 36 | }); 37 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/resources/mybatis/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatPayOrderQueryInputXml.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "xml" ) 9 | @XmlAccessorType( XmlAccessType.FIELD ) 10 | public class WechatPayOrderQueryInputXml extends WechatPayBasicDomain { 11 | 12 | /** 13 | * 微信的订单号,优先使用 14 | */ 15 | @XmlElement( name = "transaction_id" ) 16 | private String transactionId; 17 | 18 | /** 19 | * 商户系统内部的订单号,当没提供transaction_id时需要传这个。 20 | */ 21 | @XmlElement( name = "out_trade_no" ) 22 | private String outTradeNo; 23 | 24 | public String getTransactionId() { 25 | return transactionId; 26 | } 27 | 28 | public void setTransactionId( String transactionId ) { 29 | this.transactionId = transactionId; 30 | } 31 | 32 | public String getOutTradeNo() { 33 | return outTradeNo; 34 | } 35 | 36 | public void setOutTradeNo( String outTradeNo ) { 37 | this.outTradeNo = outTradeNo; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatStoreInfo.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | import com.alibaba.fastjson.annotation.JSONField; 4 | 5 | public class WechatStoreInfo { 6 | 7 | /** 8 | * 门店ID 9 | */ 10 | private String id; 11 | /** 12 | * 名称 13 | */ 14 | private String name; 15 | /** 16 | * 编码 17 | */ 18 | @JSONField( name = "area_code" ) 19 | private String areaCode; 20 | 21 | /** 22 | * 地址 23 | */ 24 | private String address; 25 | 26 | public String getId() { 27 | return id; 28 | } 29 | 30 | public void setId( String id ) { 31 | this.id = id; 32 | } 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName( String name ) { 39 | this.name = name; 40 | } 41 | 42 | public String getAreaCode() { 43 | return areaCode; 44 | } 45 | 46 | public void setAreaCode( String areaCode ) { 47 | this.areaCode = areaCode; 48 | } 49 | 50 | public String getAddress() { 51 | return address; 52 | } 53 | 54 | public void setAddress( String address ) { 55 | this.address = address; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/controller/BankPayController.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.controller; 2 | 3 | import com.fastpay.admin.domain.BankPayIn; 4 | import com.fastpay.admin.domain.BankPayInListRequest; 5 | import com.fastpay.admin.entity.BankPayInEntity; 6 | import com.fastpay.admin.mapper.BankPayInEntityMapper; 7 | import com.fastpay.admin.mapstruct.BankPayInMapper; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import javax.annotation.Resource; 13 | import java.util.List; 14 | 15 | @RestController 16 | @RequestMapping( "admin" ) 17 | public class BankPayController { 18 | 19 | @Resource 20 | private BankPayInMapper bankPayInMapper; 21 | 22 | @Resource 23 | private BankPayInEntityMapper bankPayInEntityMapper; 24 | 25 | @GetMapping( "bankPayInList" ) 26 | public List bankPayInList( BankPayInListRequest bankPayInListRequest ) { 27 | List bankPayInEntities = bankPayInEntityMapper.selectByRequestNo( bankPayInListRequest.getRequestNo() ); 28 | return bankPayInMapper.mapper( bankPayInEntities ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/boot/axios.ts: -------------------------------------------------------------------------------- 1 | import { boot } from 'quasar/wrappers'; 2 | import axios, { AxiosInstance } from 'axios'; 3 | 4 | declare module '@vue/runtime-core' { 5 | interface ComponentCustomProperties { 6 | $axios: AxiosInstance; 7 | } 8 | } 9 | 10 | // Be careful when using SSR for cross-request state pollution 11 | // due to creating a Singleton instance here; 12 | // If any client changes this (global) instance, it might be a 13 | // good idea to move this instance creation inside of the 14 | // "export default () => {}" function below (which runs individually 15 | // for each client) 16 | const api = axios.create({ baseURL: 'http://localhost:8080' }); 17 | 18 | export default boot(( { app } ) => { 19 | // for use inside Vue files (Options API) through this.$axios and this.$api 20 | 21 | app.config.globalProperties.$axios = axios; 22 | // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form) 23 | // so you won't necessarily have to import axios in each vue file 24 | 25 | app.config.globalProperties.$api = api; 26 | // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form) 27 | // so you can easily perform requests against your app's API 28 | }); 29 | 30 | export { api }; 31 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m100011/ResTransret100011.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m100011; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | 7 | @XmlAccessorType( XmlAccessType.FIELD ) 8 | public class ResTransret100011 { 9 | 10 | // 返回码 11 | @XmlElement( name = "RET_CODE" ) 12 | private String retCode; 13 | 14 | // 清算日期 15 | @XmlElement( name = "SETTLE_DAY" ) 16 | private String settleDay; 17 | 18 | // 错误文本 19 | @XmlElement( name = "ERR_MSG" ) 20 | private String errMsg; 21 | 22 | public String getRetCode() { 23 | return retCode; 24 | } 25 | 26 | public void setRetCode( String retCode ) { 27 | this.retCode = retCode; 28 | } 29 | 30 | public String getSettleDay() { 31 | return settleDay; 32 | } 33 | 34 | public void setSettleDay( String settleDay ) { 35 | this.settleDay = settleDay; 36 | } 37 | 38 | public String getErrMsg() { 39 | return errMsg; 40 | } 41 | 42 | public void setErrMsg( String errMsg ) { 43 | this.errMsg = errMsg; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatUnifiedOrderOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatUnifiedOrderOutput { 4 | 5 | /** 6 | * 请求流水号 7 | */ 8 | private String requestNo; 9 | 10 | /** 11 | * 订单号 12 | */ 13 | private String orderNo; 14 | 15 | /** 16 | * 订单状态 17 | */ 18 | private String status; 19 | 20 | /** 21 | * 调起支付请求参数 22 | */ 23 | private WechatPayRequest wechatPayRequest; 24 | 25 | public String getRequestNo() { 26 | return requestNo; 27 | } 28 | 29 | public void setRequestNo( String requestNo ) { 30 | this.requestNo = requestNo; 31 | } 32 | 33 | public String getOrderNo() { 34 | return orderNo; 35 | } 36 | 37 | public void setOrderNo( String orderNo ) { 38 | this.orderNo = orderNo; 39 | } 40 | 41 | public String getStatus() { 42 | return status; 43 | } 44 | 45 | public void setStatus( String status ) { 46 | this.status = status; 47 | } 48 | 49 | public WechatPayRequest getWechatPayRequest() { 50 | return wechatPayRequest; 51 | } 52 | 53 | public void setWechatPayRequest( WechatPayRequest wechatPayRequest ) { 54 | this.wechatPayRequest = wechatPayRequest; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fastpay-admin", 3 | "version": "0.0.1", 4 | "description": "fastpay", 5 | "productName": "fastpay admin", 6 | "author": "zero", 7 | "private": true, 8 | "scripts": { 9 | "lint": "eslint --ext .js,.ts,.vue ./", 10 | "format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore", 11 | "test": "echo \"No test specified\" && exit 0", 12 | "dev": "quasar dev", 13 | "build": "quasar build" 14 | }, 15 | "dependencies": { 16 | "axios": "^1.2.1", 17 | "vue-i18n": "^9.2.2", 18 | "pinia": "^2.0.11", 19 | "@quasar/extras": "^1.0.0", 20 | "quasar": "^2.6.0", 21 | "vue": "^3.0.0", 22 | "vue-router": "^4.0.0" 23 | }, 24 | "devDependencies": { 25 | "@typescript-eslint/eslint-plugin": "^5.10.0", 26 | "@typescript-eslint/parser": "^5.10.0", 27 | "eslint": "^8.10.0", 28 | "eslint-plugin-vue": "^9.0.0", 29 | "eslint-config-prettier": "^8.1.0", 30 | "prettier": "^2.5.1", 31 | "@types/node": "^12.20.21", 32 | "@intlify/vite-plugin-vue-i18n": "^3.3.1", 33 | "@quasar/app-vite": "^1.0.0", 34 | "autoprefixer": "^10.4.2", 35 | "typescript": "^4.5.4" 36 | }, 37 | "engines": { 38 | "node": "^18 || ^16 || ^14.19", 39 | "npm": ">= 6.13.4", 40 | "yarn": ">= 1.21.1" 41 | } 42 | } -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/WechatService.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat; 2 | 3 | import com.fastpay.common.Response; 4 | import com.fastpay.wechat.domain.*; 5 | 6 | public interface WechatService { 7 | 8 | /** 9 | * 统一下单 10 | * 11 | * @param wechatUnifiedOrderInput 下单请求 12 | * @return 下单结果 13 | */ 14 | Response unifiedOrder( WechatUnifiedOrderInput wechatUnifiedOrderInput ); 15 | 16 | /** 17 | * 订单查询 18 | * 19 | * @param wechatOrderQueryInput 查询请求 20 | * @return 订单结果 21 | */ 22 | Response orderQuery( WechatOrderQueryInput wechatOrderQueryInput ); 23 | 24 | /** 25 | * 订单关闭 26 | * 27 | * @param wechatOrderCloseInput 订单关闭请求 28 | * @return 订单结果 29 | */ 30 | Response orderClose( WechatOrderCloseInput wechatOrderCloseInput ); 31 | 32 | /** 33 | * 申请退款 34 | * 35 | * @param wechatRefundInput 退款请求 36 | * @return 退款结果 37 | */ 38 | Response refund( WechatRefundInput wechatRefundInput ); 39 | 40 | /** 41 | * 查询退款结果 42 | * 43 | * @param wechatRefundQueryInput 退款查询请求 44 | * @return 退款结果 45 | */ 46 | Response refundQuery( WechatRefundQueryInput wechatRefundQueryInput ); 47 | } 48 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatRefundInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class WechatRefundInput { 6 | 7 | /** 8 | * 退款流水 9 | */ 10 | 11 | private String requestNo; 12 | 13 | /** 14 | * 下单流水 15 | */ 16 | 17 | private String targetRequestNo; 18 | 19 | /** 20 | * 退款金额 21 | */ 22 | private BigDecimal amount; 23 | 24 | /** 25 | * 退款备注 26 | */ 27 | private String refundDesc; 28 | 29 | public String getRequestNo() { 30 | return requestNo; 31 | } 32 | 33 | public void setRequestNo( String requestNo ) { 34 | this.requestNo = requestNo; 35 | } 36 | 37 | public String getTargetRequestNo() { 38 | return targetRequestNo; 39 | } 40 | 41 | public void setTargetRequestNo( String targetRequestNo ) { 42 | this.targetRequestNo = targetRequestNo; 43 | } 44 | 45 | public BigDecimal getAmount() { 46 | return amount; 47 | } 48 | 49 | public void setAmount( BigDecimal amount ) { 50 | this.amount = amount; 51 | } 52 | 53 | public String getRefundDesc() { 54 | return refundDesc; 55 | } 56 | 57 | public void setRefundDesc( String refundDesc ) { 58 | this.refundDesc = refundDesc; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/pages/BankPayQueryPage.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 45 | 46 | 49 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/domain/Menu.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.domain; 2 | 3 | public class Menu { 4 | 5 | /** 6 | * 菜单编号 7 | */ 8 | private String menuNo; 9 | 10 | /** 11 | * 流水号 12 | */ 13 | private String title; 14 | 15 | /** 16 | * 处理号 17 | */ 18 | private String caption; 19 | 20 | /** 21 | * 原始订单流水 22 | */ 23 | private String icon; 24 | 25 | /** 26 | * 微信商户号 27 | */ 28 | private String link; 29 | 30 | public String getMenuNo() { 31 | return menuNo; 32 | } 33 | 34 | public void setMenuNo( String menuNo ) { 35 | this.menuNo = menuNo; 36 | } 37 | 38 | public String getTitle() { 39 | return title; 40 | } 41 | 42 | public void setTitle( String title ) { 43 | this.title = title; 44 | } 45 | 46 | public String getCaption() { 47 | return caption; 48 | } 49 | 50 | public void setCaption( String caption ) { 51 | this.caption = caption; 52 | } 53 | 54 | public String getIcon() { 55 | return icon; 56 | } 57 | 58 | public void setIcon( String icon ) { 59 | this.icon = icon; 60 | } 61 | 62 | public String getLink() { 63 | return link; 64 | } 65 | 66 | public void setLink( String link ) { 67 | this.link = link; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/WechatGateService.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate; 2 | 3 | import com.fastpay.common.Response; 4 | import com.fastpay.wechat.gate.domain.*; 5 | 6 | public interface WechatGateService { 7 | 8 | /** 9 | * 统一下单 10 | */ 11 | Response unifiedOrder( WechatPayUnifiedOrderGateInput wechatPayUnifiedOrderGateInput ); 12 | 13 | /** 14 | * 查询订单 15 | */ 16 | Response orderQuery( WechatPayOrderQueryGateInput wechatPayOrderQueryGateInput ); 17 | 18 | /** 19 | * 微信通知请求 20 | */ 21 | Response acceptNotice( WechatPayNoticeGateInput wechatPayNoticeGateInput ); 22 | 23 | /** 24 | * 微信关闭订单 25 | */ 26 | Response closeOrder( WechatCloseOrderGateInput wechatCloseOrderGateInput ); 27 | 28 | /** 29 | * 申请退款 30 | */ 31 | Response refund( WechatPayRefundGateInput wechatPayRefundGateInput ); 32 | 33 | /** 34 | * 微信查询退款 35 | */ 36 | Response refundQuery( WechatPayRefundQueryGateInput wechatPayRefundQueryGateInput ); 37 | 38 | /** 39 | * 微信退款通知 40 | */ 41 | Response acceptRefundNotice( WechatPayRefundNoticeGateInput wechatPayRefundNoticeGateInput ); 42 | } 43 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatTransfersQueryGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatTransfersQueryGateInput { 4 | 5 | /** 6 | * appid 7 | */ 8 | private String appId; 9 | 10 | /** 11 | * 商户号 12 | */ 13 | private String mchid; 14 | 15 | private String weixinHost; 16 | 17 | /** 18 | * 订单号 19 | */ 20 | private String orderNo; 21 | 22 | /** 23 | * apiKey 24 | */ 25 | private String apiKey; 26 | 27 | public String getAppId() { 28 | return appId; 29 | } 30 | 31 | public void setAppId( String appId ) { 32 | this.appId = appId; 33 | } 34 | 35 | public String getMchid() { 36 | return mchid; 37 | } 38 | 39 | public void setMchid( String mchid ) { 40 | this.mchid = mchid; 41 | } 42 | 43 | public String getOrderNo() { 44 | return orderNo; 45 | } 46 | 47 | public void setOrderNo( String orderNo ) { 48 | this.orderNo = orderNo; 49 | } 50 | 51 | public String getApiKey() { 52 | return apiKey; 53 | } 54 | 55 | public void setApiKey( String apiKey ) { 56 | this.apiKey = apiKey; 57 | } 58 | 59 | public String getWeixinHost() { 60 | return weixinHost; 61 | } 62 | 63 | public void setWeixinHost( String weixinHost ) { 64 | this.weixinHost = weixinHost; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatOrderRepayGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatOrderRepayGateInput { 4 | 5 | /** 6 | * 微信交易类型 7 | */ 8 | private String tradeType; 9 | /** 10 | * 预付单号 11 | */ 12 | private String prepayId; 13 | /** 14 | * 微信应用ID 15 | */ 16 | private String appId; 17 | /** 18 | * 微信商户ID 19 | */ 20 | private String mchId; 21 | 22 | /** 23 | * 微信验签秘钥 24 | */ 25 | private String key; 26 | 27 | public String getTradeType() { 28 | return tradeType; 29 | } 30 | 31 | public void setTradeType( String tradeType ) { 32 | this.tradeType = tradeType; 33 | } 34 | 35 | public String getKey() { 36 | return key; 37 | } 38 | 39 | public void setKey( String key ) { 40 | this.key = key; 41 | } 42 | 43 | public String getPrepayId() { 44 | return prepayId; 45 | } 46 | 47 | public void setPrepayId( String prepayId ) { 48 | this.prepayId = prepayId; 49 | } 50 | 51 | public String getAppId() { 52 | return appId; 53 | } 54 | 55 | public void setAppId( String appId ) { 56 | this.appId = appId; 57 | } 58 | 59 | public String getMchId() { 60 | return mchId; 61 | } 62 | 63 | public void setMchId( String mchId ) { 64 | this.mchId = mchId; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/alipay/gate/domain/AlipayAppPayGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.gate.domain; 2 | 3 | public class AlipayAppPayGateOutput { 4 | 5 | /** 6 | * 唤起支付宝SDK所需的订单信息 7 | */ 8 | private String orderInfo; 9 | 10 | /** 11 | * 网关返回码 12 | */ 13 | private String code; 14 | 15 | /** 16 | * 网关返回码描述 17 | */ 18 | private String msg; 19 | 20 | /** 21 | * 业务返回码 22 | */ 23 | private String subCode; 24 | 25 | /** 26 | * 业务返回码描述 27 | */ 28 | private String subMsg; 29 | 30 | public String getOrderInfo() { 31 | return orderInfo; 32 | } 33 | 34 | public void setOrderInfo( String orderInfo ) { 35 | this.orderInfo = orderInfo; 36 | } 37 | 38 | public String getCode() { 39 | return code; 40 | } 41 | 42 | public void setCode( String code ) { 43 | this.code = code; 44 | } 45 | 46 | public String getMsg() { 47 | return msg; 48 | } 49 | 50 | public void setMsg( String msg ) { 51 | this.msg = msg; 52 | } 53 | 54 | public String getSubCode() { 55 | return subCode; 56 | } 57 | 58 | public void setSubCode( String subCode ) { 59 | this.subCode = subCode; 60 | } 61 | 62 | public String getSubMsg() { 63 | return subMsg; 64 | } 65 | 66 | public void setSubMsg( String subMsg ) { 67 | this.subMsg = subMsg; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/builder/WechatTransfersResponseMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.builder; 2 | 3 | import com.fastpay.wechat.gate.domain.WechatTransfersGateOutput; 4 | import com.fastpay.wechat.gate.message.WechatTransfersOutput; 5 | 6 | public final class WechatTransfersResponseMapper { 7 | 8 | public static WechatTransfersGateOutput mapper( WechatTransfersOutput output ) { 9 | WechatTransfersGateOutput weixinTransfersResponse = new WechatTransfersGateOutput(); 10 | weixinTransfersResponse.setReturnCode( output.getReturn_code() ); 11 | weixinTransfersResponse.setReturnMsg( output.getReturn_msg() ); 12 | weixinTransfersResponse.setMchAppid( output.getMch_appid() ); 13 | weixinTransfersResponse.setMchid( output.getMchid() ); 14 | weixinTransfersResponse.setDeviceInfo( output.getDevice_info() ); 15 | weixinTransfersResponse.setNonceStr( output.getNonce_str() ); 16 | weixinTransfersResponse.setResultCode( output.getResult_code() ); 17 | weixinTransfersResponse.setErrCode( output.getErr_code() ); 18 | weixinTransfersResponse.setErrCodeDes( output.getErr_code_des() ); 19 | weixinTransfersResponse.setPartnerTradeNo( output.getPartner_trade_no() ); 20 | weixinTransfersResponse.setPaymentNo( output.getPayment_no() ); 21 | weixinTransfersResponse.setPaymentTime( output.getPayment_time() ); 22 | return weixinTransfersResponse; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatPayBasicDomain.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | 7 | 8 | @XmlAccessorType( XmlAccessType.FIELD ) 9 | public class WechatPayBasicDomain { 10 | 11 | /** 12 | * 微信开放平台审核通过的应用APPID 13 | */ 14 | private String appid; 15 | 16 | /** 17 | * 微信支付分配的商户号 18 | */ 19 | @XmlElement( name = "mch_id" ) 20 | private String mchId; 21 | 22 | 23 | /** 24 | * 随机字符串,不长于32位 25 | */ 26 | @XmlElement( name = "nonce_str" ) 27 | private String nonceStr; 28 | 29 | /** 30 | * 签名 31 | */ 32 | private String sign; 33 | 34 | public String getAppid() { 35 | return appid; 36 | } 37 | 38 | public void setAppid( String appid ) { 39 | this.appid = appid; 40 | } 41 | 42 | public String getMchId() { 43 | return mchId; 44 | } 45 | 46 | public void setMchId( String mchId ) { 47 | this.mchId = mchId; 48 | } 49 | 50 | public String getNonceStr() { 51 | return nonceStr; 52 | } 53 | 54 | public void setNonceStr( String nonceStr ) { 55 | this.nonceStr = nonceStr; 56 | } 57 | 58 | public String getSign() { 59 | return sign; 60 | } 61 | 62 | public void setSign( String sign ) { 63 | this.sign = sign; 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatCloseOrderGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatCloseOrderGateOutput { 4 | 5 | /** 6 | * 返回状态码 7 | */ 8 | private String returnCode; 9 | 10 | /** 11 | * 返回信息 12 | */ 13 | private String returnMsg; 14 | 15 | /** 16 | * 返回码 17 | */ 18 | private String resultCode; 19 | 20 | /** 21 | * 错误代码 22 | */ 23 | private String errCode; 24 | 25 | /** 26 | * 错误代码描述 27 | */ 28 | private String errCodeDes; 29 | 30 | public String getReturnCode() { 31 | return returnCode; 32 | } 33 | 34 | public void setReturnCode( String returnCode ) { 35 | this.returnCode = returnCode; 36 | } 37 | 38 | public String getReturnMsg() { 39 | return returnMsg; 40 | } 41 | 42 | public void setReturnMsg( String returnMsg ) { 43 | this.returnMsg = returnMsg; 44 | } 45 | 46 | public String getResultCode() { 47 | return resultCode; 48 | } 49 | 50 | public void setResultCode( String resultCode ) { 51 | this.resultCode = resultCode; 52 | } 53 | 54 | public String getErrCode() { 55 | return errCode; 56 | } 57 | 58 | public void setErrCode( String errCode ) { 59 | this.errCode = errCode; 60 | } 61 | 62 | public String getErrCodeDes() { 63 | return errCodeDes; 64 | } 65 | 66 | public void setErrCodeDes( String errCodeDes ) { 67 | this.errCodeDes = errCodeDes; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/src/layouts/MainLayout.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 68 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/alipay/gate/domain/AlipayTradeCloseGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.gate.domain; 2 | 3 | public class AlipayTradeCloseGateOutput { 4 | 5 | /** 6 | * 支付宝交易号 7 | */ 8 | private String tradeNo; 9 | 10 | /** 11 | * 创建交易传入的商户订单号 12 | */ 13 | private String outTradeNo; 14 | 15 | /** 16 | * 网关返回码 17 | */ 18 | private String code; 19 | 20 | /** 21 | * 网关返回码描述 22 | */ 23 | private String msg; 24 | 25 | /** 26 | * 业务返回码 27 | */ 28 | private String subCode; 29 | 30 | /** 31 | * 业务返回码描述 32 | */ 33 | private String subMsg; 34 | 35 | public String getTradeNo() { 36 | return tradeNo; 37 | } 38 | 39 | public void setTradeNo( String tradeNo ) { 40 | this.tradeNo = tradeNo; 41 | } 42 | 43 | public String getOutTradeNo() { 44 | return outTradeNo; 45 | } 46 | 47 | public void setOutTradeNo( String outTradeNo ) { 48 | this.outTradeNo = outTradeNo; 49 | } 50 | 51 | public String getCode() { 52 | return code; 53 | } 54 | 55 | public void setCode( String code ) { 56 | this.code = code; 57 | } 58 | 59 | public String getMsg() { 60 | return msg; 61 | } 62 | 63 | public void setMsg( String msg ) { 64 | this.msg = msg; 65 | } 66 | 67 | public String getSubCode() { 68 | return subCode; 69 | } 70 | 71 | public void setSubCode( String subCode ) { 72 | this.subCode = subCode; 73 | } 74 | 75 | public String getSubMsg() { 76 | return subMsg; 77 | } 78 | 79 | public void setSubMsg( String subMsg ) { 80 | this.subMsg = subMsg; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatTransfersQueryInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlRootElement; 6 | 7 | @XmlRootElement( name = "xml" ) 8 | @XmlAccessorType( XmlAccessType.FIELD ) 9 | public class WechatTransfersQueryInput { 10 | 11 | /** 12 | * 随机字符串 13 | */ 14 | private String nonce_str; 15 | 16 | /** 17 | * 签名 18 | */ 19 | private String sign; 20 | 21 | /** 22 | * 商户订单号 23 | */ 24 | private String partner_trade_no; 25 | 26 | /** 27 | * 商户号 28 | */ 29 | private String mch_id; 30 | 31 | /** 32 | * Appid 33 | */ 34 | private String appid; 35 | 36 | public String getNonce_str() { 37 | return nonce_str; 38 | } 39 | 40 | public void setNonce_str( String nonce_str ) { 41 | this.nonce_str = nonce_str; 42 | } 43 | 44 | public String getSign() { 45 | return sign; 46 | } 47 | 48 | public void setSign( String sign ) { 49 | this.sign = sign; 50 | } 51 | 52 | public String getPartner_trade_no() { 53 | return partner_trade_no; 54 | } 55 | 56 | public void setPartner_trade_no( String partner_trade_no ) { 57 | this.partner_trade_no = partner_trade_no; 58 | } 59 | 60 | public String getMch_id() { 61 | return mch_id; 62 | } 63 | 64 | public void setMch_id( String mch_id ) { 65 | this.mch_id = mch_id; 66 | } 67 | 68 | public String getAppid() { 69 | return appid; 70 | } 71 | 72 | public void setAppid( String appid ) { 73 | this.appid = appid; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatJsapiResignDomain.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "xml" ) 9 | @XmlAccessorType( value = XmlAccessType.FIELD ) 10 | public class WechatJsapiResignDomain { 11 | 12 | @XmlElement( name = "appId" ) 13 | private String appid; 14 | 15 | @XmlElement( name = "timeStamp" ) 16 | private String timeStamp; 17 | 18 | @XmlElement( name = "nonceStr" ) 19 | private String nonceStr; 20 | 21 | @XmlElement( name = "package" ) 22 | private String wxPackage; 23 | 24 | @XmlElement( name = "signType" ) 25 | private String signType; 26 | 27 | public String getAppid() { 28 | return appid; 29 | } 30 | 31 | public void setAppid( String appid ) { 32 | this.appid = appid; 33 | } 34 | 35 | public String getTimeStamp() { 36 | return timeStamp; 37 | } 38 | 39 | public void setTimeStamp( String timeStamp ) { 40 | this.timeStamp = timeStamp; 41 | } 42 | 43 | public String getNonceStr() { 44 | return nonceStr; 45 | } 46 | 47 | public void setNonceStr( String nonceStr ) { 48 | this.nonceStr = nonceStr; 49 | } 50 | 51 | public String getWxPackage() { 52 | return wxPackage; 53 | } 54 | 55 | public void setWxPackage( String wxPackage ) { 56 | this.wxPackage = wxPackage; 57 | } 58 | 59 | public String getSignType() { 60 | return signType; 61 | } 62 | 63 | public void setSignType( String signType ) { 64 | this.signType = signType; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/test/java/com/fastpay/FastPayApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.fastpay; 2 | 3 | import com.fastpay.alipay.AlipayService; 4 | import com.fastpay.alipay.domain.AlipayAppPayInput; 5 | import com.fastpay.alipay.domain.AlipayTradeQueryInput; 6 | import org.junit.jupiter.api.Test; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import javax.annotation.Resource; 10 | import java.math.BigDecimal; 11 | 12 | @SpringBootTest 13 | class FastPayApplicationTests { 14 | 15 | @Resource 16 | private AlipayService alipayService; 17 | 18 | @Test 19 | void contextLoads() { 20 | } 21 | 22 | @Test 23 | void alipayAppPay() { 24 | AlipayAppPayInput alipayAppPayRequest = new AlipayAppPayInput(); 25 | alipayAppPayRequest.setRequestNo( String.valueOf( System.currentTimeMillis() ) ); 26 | alipayAppPayRequest.setSubject("TEST"); 27 | alipayAppPayRequest.setTotalAmount(new BigDecimal( "1.00" ) ); 28 | alipayAppPayRequest.setTimeoutExpress("1c"); 29 | alipayAppPayRequest.setBody("测试"); 30 | System.out.println( alipayService.appPay( alipayAppPayRequest ) ); 31 | } 32 | 33 | @Test 34 | void alipayTradeQuery() { 35 | String requestNo = String.valueOf( System.currentTimeMillis() ); 36 | AlipayAppPayInput alipayAppPayRequest = new AlipayAppPayInput(); 37 | alipayAppPayRequest.setRequestNo( requestNo ); 38 | alipayAppPayRequest.setSubject("TEST"); 39 | alipayAppPayRequest.setTotalAmount(new BigDecimal( "1.00" ) ); 40 | alipayAppPayRequest.setTimeoutExpress("1c"); 41 | alipayAppPayRequest.setBody("测试"); 42 | System.out.println( alipayService.appPay( alipayAppPayRequest ) ); 43 | 44 | AlipayTradeQueryInput orderQueryRequest = new AlipayTradeQueryInput(); 45 | orderQueryRequest.setRequestNo(requestNo); 46 | System.out.println( alipayService.tradeQuery( orderQueryRequest ) ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/utils/SignUtils.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.utils; 2 | 3 | import org.apache.commons.codec.binary.Base64; 4 | 5 | import java.nio.charset.StandardCharsets; 6 | import java.security.*; 7 | import java.security.spec.InvalidKeySpecException; 8 | import java.security.spec.PKCS8EncodedKeySpec; 9 | import java.security.spec.X509EncodedKeySpec; 10 | 11 | public class SignUtils { 12 | 13 | /** 14 | * 使用 SM3withSM2 算法对 xml 字符串进行签名 15 | * 16 | * @param xmlStr 待签名的 xml 字符串 17 | * @param publicKey 公钥 18 | * @param privateKey 私钥 19 | * @return Base64 编码的签名字符串 20 | */ 21 | public static String signXml( String xmlStr, String publicKey, String privateKey ) throws NoSuchAlgorithmException, 22 | InvalidKeySpecException, InvalidKeyException, SignatureException { 23 | // 对公私钥进行解码 24 | byte[] pubKeyBytes = Base64.decodeBase64( publicKey ); 25 | byte[] priKeyBytes = Base64.decodeBase64( privateKey ); 26 | 27 | // 通过公钥获取 KeyPair 对象 28 | X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec( pubKeyBytes ); 29 | KeyFactory keyFactory = KeyFactory.getInstance( "SM2" ); 30 | PublicKey pubKeyObj = keyFactory.generatePublic( pubKeySpec ); 31 | PKCS8EncodedKeySpec priKeySpec = new PKCS8EncodedKeySpec( priKeyBytes ); 32 | PrivateKey priKeyObj = keyFactory.generatePrivate( priKeySpec ); 33 | 34 | KeyPair keyPair = new KeyPair( pubKeyObj, priKeyObj ); 35 | 36 | // 计算签名 37 | Signature signature = Signature.getInstance( "SM3withSM2" ); 38 | signature.initSign( keyPair.getPrivate() ); 39 | signature.update( xmlStr.getBytes( StandardCharsets.UTF_8 ) ); 40 | byte[] signBytes = signature.sign(); 41 | 42 | // Base64 编码签名 43 | return Base64.encodeBase64String( signBytes ); 44 | } 45 | } -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/builder/WechatTransfersQueryMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.builder; 2 | 3 | import com.fastpay.wechat.gate.domain.WechatTransfersQueryGateOutput; 4 | import com.fastpay.wechat.gate.message.WechatTransfersQueryOutput; 5 | 6 | public final class WechatTransfersQueryMapper { 7 | 8 | public static WechatTransfersQueryGateOutput mapper( WechatTransfersQueryOutput output ) { 9 | WechatTransfersQueryGateOutput weixinTransfersQueryResponse = new WechatTransfersQueryGateOutput(); 10 | weixinTransfersQueryResponse.setReturnCode( output.getReturn_code() ); 11 | weixinTransfersQueryResponse.setReturnMsg( output.getReturn_msg() ); 12 | weixinTransfersQueryResponse.setResultCode( output.getResult_code() ); 13 | weixinTransfersQueryResponse.setErrCode( output.getErr_code() ); 14 | weixinTransfersQueryResponse.setErrCodeDes( output.getErr_code_des() ); 15 | weixinTransfersQueryResponse.setPartnerTradeNo( output.getPartner_trade_no() ); 16 | weixinTransfersQueryResponse.setAppid( output.getAppid() ); 17 | weixinTransfersQueryResponse.setMchId( output.getMch_id() ); 18 | weixinTransfersQueryResponse.setDetailId( output.getDetail_id() ); 19 | weixinTransfersQueryResponse.setStatus( output.getStatus() ); 20 | weixinTransfersQueryResponse.setReason( output.getReason() ); 21 | weixinTransfersQueryResponse.setOpenid( output.getOpenid() ); 22 | weixinTransfersQueryResponse.setTransferName( output.getTransfer_name() ); 23 | weixinTransfersQueryResponse.setPaymentAmount( output.getPayment_amount() ); 24 | weixinTransfersQueryResponse.setTransferTime( output.getTransfer_time() ); 25 | weixinTransfersQueryResponse.setPaymentTime( output.getPayment_time() ); 26 | weixinTransfersQueryResponse.setDesc( output.getDesc() ); 27 | return weixinTransfersQueryResponse; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/alipay/domain/AlipayAppPayInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.domain; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class AlipayAppPayInput { 6 | 7 | /** 8 | * 请求流水号 9 | */ 10 | private String requestNo; 11 | 12 | /** 13 | * 商品标题/交易标题/订单标题 14 | */ 15 | private String subject; 16 | 17 | /** 18 | * 订单总金额,单位为人民币(元) 19 | */ 20 | private BigDecimal totalAmount; 21 | 22 | /** 23 | * 该笔订单允许的最晚付款时间,逾期将关闭交易 24 | */ 25 | private String timeoutExpress; 26 | 27 | /** 28 | * 绝对超时时间,格式为yyyy-MM-dd HH:mm 29 | */ 30 | private String timeExpire; 31 | 32 | /** 33 | * 对一笔交易的具体描述信息。如果是多种商品,请将商品描述字符串累加传给body 34 | */ 35 | private String body; 36 | 37 | public String getRequestNo() { 38 | return requestNo; 39 | } 40 | 41 | public void setRequestNo( String requestNo ) { 42 | this.requestNo = requestNo; 43 | } 44 | 45 | public String getSubject() { 46 | return subject; 47 | } 48 | 49 | public void setSubject( String subject ) { 50 | this.subject = subject; 51 | } 52 | 53 | public BigDecimal getTotalAmount() { 54 | return totalAmount; 55 | } 56 | 57 | public void setTotalAmount( BigDecimal totalAmount ) { 58 | this.totalAmount = totalAmount; 59 | } 60 | 61 | public String getTimeoutExpress() { 62 | return timeoutExpress; 63 | } 64 | 65 | public void setTimeoutExpress( String timeoutExpress ) { 66 | this.timeoutExpress = timeoutExpress; 67 | } 68 | 69 | public String getTimeExpire() { 70 | return timeExpire; 71 | } 72 | 73 | public void setTimeExpire( String timeExpire ) { 74 | this.timeExpire = timeExpire; 75 | } 76 | 77 | public String getBody() { 78 | return body; 79 | } 80 | 81 | public void setBody( String body ) { 82 | this.body = body; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatCloseOrderInputXml.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "xml" ) 9 | @XmlAccessorType( value = XmlAccessType.FIELD ) 10 | public class WechatCloseOrderInputXml { 11 | 12 | /** 13 | * 应用ID 14 | */ 15 | @XmlElement( name = "appid" ) 16 | private String appid; 17 | 18 | /** 19 | * 商户号 20 | */ 21 | @XmlElement( name = "mch_id" ) 22 | private String mchId; 23 | 24 | /** 25 | * 商户订单号 26 | */ 27 | @XmlElement( name = "out_trade_no" ) 28 | private String outTradeNo; 29 | 30 | /** 31 | * 随机字符串 32 | */ 33 | @XmlElement( name = "nonce_str" ) 34 | private String nonceStr; 35 | 36 | /** 37 | * 签名 38 | */ 39 | @XmlElement( name = "sign" ) 40 | private String sign; 41 | 42 | public String getAppid() { 43 | return appid; 44 | } 45 | 46 | public void setAppid( String appid ) { 47 | this.appid = appid; 48 | } 49 | 50 | public String getMchId() { 51 | return mchId; 52 | } 53 | 54 | public void setMchId( String mchId ) { 55 | this.mchId = mchId; 56 | } 57 | 58 | public String getOutTradeNo() { 59 | return outTradeNo; 60 | } 61 | 62 | public void setOutTradeNo( String outTradeNo ) { 63 | this.outTradeNo = outTradeNo; 64 | } 65 | 66 | public String getNonceStr() { 67 | return nonceStr; 68 | } 69 | 70 | public void setNonceStr( String nonceStr ) { 71 | this.nonceStr = nonceStr; 72 | } 73 | 74 | public String getSign() { 75 | return sign; 76 | } 77 | 78 | public void setSign( String sign ) { 79 | this.sign = sign; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatH5Info.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | import com.alibaba.fastjson.annotation.JSONField; 4 | 5 | public class WechatH5Info { 6 | 7 | /** 8 | * 场景类型 IOS|Android|Wap 9 | */ 10 | private String type; 11 | 12 | /** 13 | * 应用名 14 | */ 15 | @JSONField( name = "app_name" ) 16 | private String appName; 17 | 18 | /** 19 | * bundle_id 20 | */ 21 | @JSONField( name = "bundle_id" ) 22 | private String budleId; 23 | 24 | /** 25 | * 包名 26 | */ 27 | @JSONField( name = "package_name" ) 28 | private String packageName; 29 | 30 | /** 31 | * WAP网站URL地址 32 | */ 33 | @JSONField( name = "wap_url" ) 34 | private String wapUrl; 35 | 36 | /** 37 | * WAP 网站名 38 | */ 39 | @JSONField( name = "wap_name" ) 40 | private String wapName; 41 | 42 | public String getType() { 43 | return type; 44 | } 45 | 46 | public void setType( String type ) { 47 | this.type = type; 48 | } 49 | 50 | public String getAppName() { 51 | return appName; 52 | } 53 | 54 | public void setAppName( String appName ) { 55 | this.appName = appName; 56 | } 57 | 58 | public String getBudleId() { 59 | return budleId; 60 | } 61 | 62 | public void setBudleId( String budleId ) { 63 | this.budleId = budleId; 64 | } 65 | 66 | public String getPackageName() { 67 | return packageName; 68 | } 69 | 70 | public void setPackageName( String packageName ) { 71 | this.packageName = packageName; 72 | } 73 | 74 | public String getWapUrl() { 75 | return wapUrl; 76 | } 77 | 78 | public void setWapUrl( String wapUrl ) { 79 | this.wapUrl = wapUrl; 80 | } 81 | 82 | public String getWapName() { 83 | return wapName; 84 | } 85 | 86 | public void setWapName( String wapName ) { 87 | this.wapName = wapName; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/domain/PayInGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.domain; 2 | 3 | public class PayInGateOutput { 4 | 5 | /** 6 | * 返回码1 7 | */ 8 | private String retCode1; 9 | 10 | /** 11 | * 返回描述1 12 | */ 13 | private String retMsg1; 14 | 15 | /** 16 | * 返回码2 17 | */ 18 | private String retCode2; 19 | 20 | /** 21 | * 返回描述2 22 | */ 23 | private String retMsg2; 24 | 25 | /** 26 | * 返回码3 27 | */ 28 | private String retCode3; 29 | 30 | /** 31 | * 返回描述3 32 | */ 33 | private String retMsg3; 34 | 35 | /** 36 | * 扩展数据 37 | */ 38 | private T extData; 39 | 40 | public String getRetCode1() { 41 | return retCode1; 42 | } 43 | 44 | public void setRetCode1( String retCode1 ) { 45 | this.retCode1 = retCode1; 46 | } 47 | 48 | public String getRetMsg1() { 49 | return retMsg1; 50 | } 51 | 52 | public void setRetMsg1( String retMsg1 ) { 53 | this.retMsg1 = retMsg1; 54 | } 55 | 56 | public String getRetCode2() { 57 | return retCode2; 58 | } 59 | 60 | public void setRetCode2( String retCode2 ) { 61 | this.retCode2 = retCode2; 62 | } 63 | 64 | public String getRetMsg2() { 65 | return retMsg2; 66 | } 67 | 68 | public void setRetMsg2( String retMsg2 ) { 69 | this.retMsg2 = retMsg2; 70 | } 71 | 72 | public String getRetCode3() { 73 | return retCode3; 74 | } 75 | 76 | public void setRetCode3( String retCode3 ) { 77 | this.retCode3 = retCode3; 78 | } 79 | 80 | public String getRetMsg3() { 81 | return retMsg3; 82 | } 83 | 84 | public void setRetMsg3( String retMsg3 ) { 85 | this.retMsg3 = retMsg3; 86 | } 87 | 88 | public T getExtData() { 89 | return extData; 90 | } 91 | 92 | public void setExtData( T extData ) { 93 | this.extData = extData; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/domain/PayInQueryGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.domain; 2 | 3 | public class PayInQueryGateOutput { 4 | 5 | /** 6 | * 返回码1 7 | */ 8 | private String retCode1; 9 | 10 | /** 11 | * 返回描述1 12 | */ 13 | private String retMsg1; 14 | 15 | /** 16 | * 返回码2 17 | */ 18 | private String retCode2; 19 | 20 | /** 21 | * 返回描述2 22 | */ 23 | private String retMsg2; 24 | 25 | /** 26 | * 返回码3 27 | */ 28 | private String retCode3; 29 | 30 | /** 31 | * 返回描述3 32 | */ 33 | private String retMsg3; 34 | 35 | /** 36 | * 扩展数据 37 | */ 38 | private T extData; 39 | 40 | public String getRetCode1() { 41 | return retCode1; 42 | } 43 | 44 | public void setRetCode1( String retCode1 ) { 45 | this.retCode1 = retCode1; 46 | } 47 | 48 | public String getRetMsg1() { 49 | return retMsg1; 50 | } 51 | 52 | public void setRetMsg1( String retMsg1 ) { 53 | this.retMsg1 = retMsg1; 54 | } 55 | 56 | public String getRetCode2() { 57 | return retCode2; 58 | } 59 | 60 | public void setRetCode2( String retCode2 ) { 61 | this.retCode2 = retCode2; 62 | } 63 | 64 | public String getRetMsg2() { 65 | return retMsg2; 66 | } 67 | 68 | public void setRetMsg2( String retMsg2 ) { 69 | this.retMsg2 = retMsg2; 70 | } 71 | 72 | public String getRetCode3() { 73 | return retCode3; 74 | } 75 | 76 | public void setRetCode3( String retCode3 ) { 77 | this.retCode3 = retCode3; 78 | } 79 | 80 | public String getRetMsg3() { 81 | return retMsg3; 82 | } 83 | 84 | public void setRetMsg3( String retMsg3 ) { 85 | this.retMsg3 = retMsg3; 86 | } 87 | 88 | public T getExtData() { 89 | return extData; 90 | } 91 | 92 | public void setExtData( T extData ) { 93 | this.extData = extData; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/impl/BankPayServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.impl; 2 | 3 | import com.fastpay.bankpay.BankPayService; 4 | import com.fastpay.bankpay.domain.*; 5 | import com.fastpay.bankpay.entity.BankPayInEntity; 6 | import com.fastpay.bankpay.mapper.BankPayInEntityMapper; 7 | import com.fastpay.common.Constants; 8 | import com.fastpay.common.Response; 9 | import org.springframework.stereotype.Service; 10 | 11 | import javax.annotation.Resource; 12 | import java.util.UUID; 13 | 14 | @Service 15 | public class BankPayServiceImpl implements BankPayService { 16 | 17 | @Resource 18 | private BankPayInEntityMapper bankPayInEntityMapper; 19 | 20 | @Override 21 | public Response payIn( PayInRequest payInRequest ) { 22 | 23 | BankPayInEntity bankPayInEntity = new BankPayInEntity(); 24 | bankPayInEntity.setRequestNo( payInRequest.getRequestNo() ); 25 | bankPayInEntity.setProcessNo( UUID.randomUUID().toString().replace( "-", "" ) ); 26 | bankPayInEntity.setIdNo( payInRequest.getIdNo() ); 27 | bankPayInEntity.setCardNo( payInRequest.getCardNo() ); 28 | bankPayInEntity.setCardName( payInRequest.getCardName() ); 29 | bankPayInEntity.setCardMobile( payInRequest.getCardMobile() ); 30 | bankPayInEntity.setBankCode( payInRequest.getBankCode() ); 31 | bankPayInEntity.setAmount( payInRequest.getAmount() ); 32 | bankPayInEntity.setStatus( Constants.BANK_PAY_PROCESSING ); 33 | bankPayInEntityMapper.insertSelective( bankPayInEntity ); 34 | return null; 35 | } 36 | 37 | @Override 38 | public Response payInQuery( PayInQueryRequest payInQueryRequest ) { 39 | return null; 40 | } 41 | 42 | @Override 43 | public Response payOut( PayOutRequest payOutRequest ) { 44 | return null; 45 | } 46 | 47 | @Override 48 | public Response payOutQuery( PayOutQueryRequest payOutQueryRequest ) { 49 | return null; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatPayRefundResultNoticeXml.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlRootElement; 6 | 7 | @XmlRootElement( name = "xml" ) 8 | @XmlAccessorType( XmlAccessType.FIELD ) 9 | public class WechatPayRefundResultNoticeXml { 10 | 11 | /** 12 | * 返回状态码 13 | */ 14 | private String return_code; 15 | 16 | /** 17 | * 返回信息 18 | */ 19 | private String return_msg; 20 | 21 | /** 22 | * 应用ID 23 | */ 24 | private String appid; 25 | 26 | /** 27 | * 退款的商户号 28 | */ 29 | private String mch_id; 30 | 31 | /** 32 | * 随机字符串 33 | */ 34 | private String nonce_str; 35 | 36 | /** 37 | * 加密信息 38 | */ 39 | private String req_info; 40 | 41 | public String getReturn_code() { 42 | return return_code; 43 | } 44 | 45 | public void setReturn_code( String return_code ) { 46 | this.return_code = return_code; 47 | } 48 | 49 | public String getReturn_msg() { 50 | return return_msg; 51 | } 52 | 53 | public void setReturn_msg( String return_msg ) { 54 | this.return_msg = return_msg; 55 | } 56 | 57 | public String getAppid() { 58 | return appid; 59 | } 60 | 61 | public void setAppid( String appid ) { 62 | this.appid = appid; 63 | } 64 | 65 | public String getMch_id() { 66 | return mch_id; 67 | } 68 | 69 | public void setMch_id( String mch_id ) { 70 | this.mch_id = mch_id; 71 | } 72 | 73 | public String getNonce_str() { 74 | return nonce_str; 75 | } 76 | 77 | public void setNonce_str( String nonce_str ) { 78 | this.nonce_str = nonce_str; 79 | } 80 | 81 | public String getReq_info() { 82 | return req_info; 83 | } 84 | 85 | public void setReq_info( String req_info ) { 86 | this.req_info = req_info; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /fastpay-simple-admin/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.fastpay 8 | fastpay-simple 9 | 1.0.0-SNAPSHOT 10 | 11 | 12 | fastpay-simple-admin 13 | 14 | 15 | 8 16 | 8 17 | UTF-8 18 | 1.5.3.Final 19 | 20 | 21 | 22 | 23 | com.fastpay 24 | fastpay-simple-api 25 | 1.0.0-SNAPSHOT 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-web 31 | 32 | 33 | org.mapstruct 34 | mapstruct 35 | 36 | 37 | 38 | 39 | 40 | 41 | org.apache.maven.plugins 42 | maven-compiler-plugin 43 | 3.8.1 44 | 45 | 1.8 46 | 1.8 47 | 48 | 49 | org.mapstruct 50 | mapstruct-processor 51 | ${org.mapstruct.version} 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatTransferOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | import java.util.Date; 4 | 5 | public class WechatTransferOutput { 6 | 7 | /** 8 | * 请求流水号 9 | */ 10 | private String requestNo; 11 | 12 | /** 13 | * 付款结果 14 | */ 15 | private String status; 16 | 17 | /** 18 | * 错误代码 19 | */ 20 | private String errCode; 21 | 22 | /** 23 | * 错误代码描述 24 | */ 25 | private String errCodeDes; 26 | 27 | /** 28 | * 订单号 29 | */ 30 | private String orderNo; 31 | 32 | /** 33 | * 微信付款单号 34 | */ 35 | private String paymentNo; 36 | 37 | /** 38 | * 微信付款成功时间 39 | */ 40 | private Date paymentTime; 41 | 42 | public String getRequestNo() { 43 | return requestNo; 44 | } 45 | 46 | public void setRequestNo( String requestNo ) { 47 | this.requestNo = requestNo; 48 | } 49 | 50 | public String getStatus() { 51 | return status; 52 | } 53 | 54 | public void setStatus( String status ) { 55 | this.status = status; 56 | } 57 | 58 | public String getErrCode() { 59 | return errCode; 60 | } 61 | 62 | public void setErrCode( String errCode ) { 63 | this.errCode = errCode; 64 | } 65 | 66 | public String getErrCodeDes() { 67 | return errCodeDes; 68 | } 69 | 70 | public void setErrCodeDes( String errCodeDes ) { 71 | this.errCodeDes = errCodeDes; 72 | } 73 | 74 | public String getOrderNo() { 75 | return orderNo; 76 | } 77 | 78 | public void setOrderNo( String orderNo ) { 79 | this.orderNo = orderNo; 80 | } 81 | 82 | public String getPaymentNo() { 83 | return paymentNo; 84 | } 85 | 86 | public void setPaymentNo( String paymentNo ) { 87 | this.paymentNo = paymentNo; 88 | } 89 | 90 | public Date getPaymentTime() { 91 | return paymentTime; 92 | } 93 | 94 | public void setPaymentTime( Date paymentTime ) { 95 | this.paymentTime = paymentTime; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatRefundOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | import java.util.Date; 4 | 5 | public class WechatRefundOutput { 6 | 7 | /** 8 | * 流水号 9 | */ 10 | private String requestNo; 11 | 12 | /** 13 | * 微信退款单号 14 | */ 15 | private String wechatRefundNo; 16 | 17 | /** 18 | * 退款状态 19 | */ 20 | private String status; 21 | 22 | /** 23 | * 退款成功时间 24 | */ 25 | private Date successTime; 26 | 27 | /** 28 | * 退款入账账户 29 | */ 30 | private String recvAccout; 31 | 32 | /** 33 | * 错误码 34 | */ 35 | private String errCode; 36 | 37 | /** 38 | * 错误码描述 39 | */ 40 | private String errCodeDesc; 41 | 42 | public String getRequestNo() { 43 | return requestNo; 44 | } 45 | 46 | public void setRequestNo( String requestNo ) { 47 | this.requestNo = requestNo; 48 | } 49 | 50 | public String getWechatRefundNo() { 51 | return wechatRefundNo; 52 | } 53 | 54 | public void setWechatRefundNo( String wechatRefundNo ) { 55 | this.wechatRefundNo = wechatRefundNo; 56 | } 57 | 58 | public String getStatus() { 59 | return status; 60 | } 61 | 62 | public void setStatus( String status ) { 63 | this.status = status; 64 | } 65 | 66 | public Date getSuccessTime() { 67 | return successTime; 68 | } 69 | 70 | public void setSuccessTime( Date successTime ) { 71 | this.successTime = successTime; 72 | } 73 | 74 | public String getRecvAccout() { 75 | return recvAccout; 76 | } 77 | 78 | public void setRecvAccout( String recvAccout ) { 79 | this.recvAccout = recvAccout; 80 | } 81 | 82 | public String getErrCode() { 83 | return errCode; 84 | } 85 | 86 | public void setErrCode( String errCode ) { 87 | this.errCode = errCode; 88 | } 89 | 90 | public String getErrCodeDesc() { 91 | return errCodeDesc; 92 | } 93 | 94 | public void setErrCodeDesc( String errCodeDesc ) { 95 | this.errCodeDesc = errCodeDesc; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/alipay/gate/domain/AlipayAppPayGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.gate.domain; 2 | 3 | public class AlipayAppPayGateInput { 4 | 5 | /** 6 | * 商户订单号,由商家自定义,需保证商家系统中唯一。仅支持数字、字母、下划线 7 | */ 8 | private String outTradeNo; 9 | 10 | /** 11 | * 品标题/交易标题/订单标题 12 | */ 13 | private String subject; 14 | 15 | /** 16 | * 订单总金额,单位为人民币(元) 17 | */ 18 | private String totalAmount; 19 | 20 | /** 21 | * 该笔订单允许的最晚付款时间,逾期将关闭交易 22 | */ 23 | private String timeoutExpress; 24 | 25 | /** 26 | * 绝对超时时间,格式为yyyy-MM-dd HH:mm 27 | */ 28 | private String timeExpire; 29 | 30 | /** 31 | * 对一笔交易的具体描述信息。如果是多种商品,请将商品描述字符串累加传给body 32 | */ 33 | private String body; 34 | 35 | /** 36 | * 商品主类型,取值如下: 0:虚拟类商品; 1:实物类商品。 37 | */ 38 | private String goodsType; 39 | 40 | public String getOutTradeNo() { 41 | return outTradeNo; 42 | } 43 | 44 | public void setOutTradeNo( String outTradeNo ) { 45 | this.outTradeNo = outTradeNo; 46 | } 47 | 48 | public String getSubject() { 49 | return subject; 50 | } 51 | 52 | public void setSubject( String subject ) { 53 | this.subject = subject; 54 | } 55 | 56 | public String getTotalAmount() { 57 | return totalAmount; 58 | } 59 | 60 | public void setTotalAmount( String totalAmount ) { 61 | this.totalAmount = totalAmount; 62 | } 63 | 64 | public String getTimeoutExpress() { 65 | return timeoutExpress; 66 | } 67 | 68 | public void setTimeoutExpress( String timeoutExpress ) { 69 | this.timeoutExpress = timeoutExpress; 70 | } 71 | 72 | public String getTimeExpire() { 73 | return timeExpire; 74 | } 75 | 76 | public void setTimeExpire( String timeExpire ) { 77 | this.timeExpire = timeExpire; 78 | } 79 | 80 | public String getBody() { 81 | return body; 82 | } 83 | 84 | public void setBody( String body ) { 85 | this.body = body; 86 | } 87 | 88 | public String getGoodsType() { 89 | return goodsType; 90 | } 91 | 92 | public void setGoodsType( String goodsType ) { 93 | this.goodsType = goodsType; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m100011/ResInfo100011.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m100011; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | 7 | @XmlAccessorType( XmlAccessType.FIELD ) 8 | public class ResInfo100011 { 9 | 10 | // 交易代码 11 | @XmlElement( name = "TRX_CODE" ) 12 | private String trxCode; 13 | 14 | // 版本号 15 | @XmlElement( name = "VERSION" ) 16 | private String version; 17 | 18 | // 数据格式 19 | @XmlElement( name = "DATA_TYPE" ) 20 | private String dataType; 21 | 22 | // 请求流水号 23 | @XmlElement( name = "REQ_SN" ) 24 | private String reqSn; 25 | 26 | // 返回代码 27 | @XmlElement( name = "RET_CODE" ) 28 | private String retCode; 29 | 30 | // 错误信息 31 | @XmlElement( name = "ERR_MSG" ) 32 | private String errMsg; 33 | 34 | // 签名信息 35 | @XmlElement( name = "SIGNED_MSG" ) 36 | private String signedMsg; 37 | 38 | public String getTrxCode() { 39 | return trxCode; 40 | } 41 | 42 | public void setTrxCode( String trxCode ) { 43 | this.trxCode = trxCode; 44 | } 45 | 46 | public String getVersion() { 47 | return version; 48 | } 49 | 50 | public void setVersion( String version ) { 51 | this.version = version; 52 | } 53 | 54 | public String getDataType() { 55 | return dataType; 56 | } 57 | 58 | public void setDataType( String dataType ) { 59 | this.dataType = dataType; 60 | } 61 | 62 | public String getReqSn() { 63 | return reqSn; 64 | } 65 | 66 | public void setReqSn( String reqSn ) { 67 | this.reqSn = reqSn; 68 | } 69 | 70 | public String getRetCode() { 71 | return retCode; 72 | } 73 | 74 | public void setRetCode( String retCode ) { 75 | this.retCode = retCode; 76 | } 77 | 78 | public String getErrMsg() { 79 | return errMsg; 80 | } 81 | 82 | public void setErrMsg( String errMsg ) { 83 | this.errMsg = errMsg; 84 | } 85 | 86 | public String getSignedMsg() { 87 | return signedMsg; 88 | } 89 | 90 | public void setSignedMsg( String signedMsg ) { 91 | this.signedMsg = signedMsg; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/bankpay/domain/PayInRequest.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.domain; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class PayInRequest { 6 | 7 | /** 8 | * 商户流水号 9 | */ 10 | private String requestNo; 11 | 12 | /** 13 | * 还款流水号 14 | */ 15 | private String processNo; 16 | 17 | /** 18 | * 银行卡 19 | */ 20 | private String cardNo; 21 | 22 | /** 23 | * 姓名 24 | */ 25 | private String cardName; 26 | 27 | /** 28 | * 手机号 29 | */ 30 | private String cardMobile; 31 | 32 | /** 33 | * 证件号 34 | */ 35 | private String idNo; 36 | 37 | /** 38 | * 银行编码 39 | */ 40 | private String bankCode; 41 | 42 | /** 43 | * 还款金额 44 | */ 45 | private BigDecimal amount; 46 | 47 | public String getRequestNo() { 48 | return requestNo; 49 | } 50 | 51 | public void setRequestNo( String requestNo ) { 52 | this.requestNo = requestNo; 53 | } 54 | 55 | public String getProcessNo() { 56 | return processNo; 57 | } 58 | 59 | public void setProcessNo( String processNo ) { 60 | this.processNo = processNo; 61 | } 62 | 63 | public String getCardNo() { 64 | return cardNo; 65 | } 66 | 67 | public void setCardNo( String cardNo ) { 68 | this.cardNo = cardNo; 69 | } 70 | 71 | public String getCardName() { 72 | return cardName; 73 | } 74 | 75 | public void setCardName( String cardName ) { 76 | this.cardName = cardName; 77 | } 78 | 79 | public String getCardMobile() { 80 | return cardMobile; 81 | } 82 | 83 | public void setCardMobile( String cardMobile ) { 84 | this.cardMobile = cardMobile; 85 | } 86 | 87 | public String getIdNo() { 88 | return idNo; 89 | } 90 | 91 | public void setIdNo( String idNo ) { 92 | this.idNo = idNo; 93 | } 94 | 95 | public String getBankCode() { 96 | return bankCode; 97 | } 98 | 99 | public void setBankCode( String bankCode ) { 100 | this.bankCode = bankCode; 101 | } 102 | 103 | public BigDecimal getAmount() { 104 | return amount; 105 | } 106 | 107 | public void setAmount( BigDecimal amount ) { 108 | this.amount = amount; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayRefundGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayRefundGateInput { 4 | 5 | /** 6 | * 微信订单号 7 | */ 8 | private String transactionId; 9 | 10 | /** 11 | * 商户订单号 12 | */ 13 | private String outTradeNo; 14 | 15 | /** 16 | * 商户退款单号 17 | */ 18 | private String outRefundNo; 19 | 20 | /** 21 | * 订单金额 22 | */ 23 | private Integer totalFee; 24 | 25 | /** 26 | * 退款金额 27 | */ 28 | private Integer refundFee; 29 | 30 | /** 31 | * 退款货币种类 32 | */ 33 | private String refundFeeType; 34 | 35 | /** 36 | * 退款原因 37 | */ 38 | private String refundDesc; 39 | 40 | /** 41 | * 退款资金来源 42 | */ 43 | private String refundAccount; 44 | 45 | public String getTransactionId() { 46 | return transactionId; 47 | } 48 | 49 | public void setTransactionId( String transactionId ) { 50 | this.transactionId = transactionId; 51 | } 52 | 53 | public String getOutTradeNo() { 54 | return outTradeNo; 55 | } 56 | 57 | public void setOutTradeNo( String outTradeNo ) { 58 | this.outTradeNo = outTradeNo; 59 | } 60 | 61 | public String getOutRefundNo() { 62 | return outRefundNo; 63 | } 64 | 65 | public void setOutRefundNo( String outRefundNo ) { 66 | this.outRefundNo = outRefundNo; 67 | } 68 | 69 | public Integer getTotalFee() { 70 | return totalFee; 71 | } 72 | 73 | public void setTotalFee( Integer totalFee ) { 74 | this.totalFee = totalFee; 75 | } 76 | 77 | public Integer getRefundFee() { 78 | return refundFee; 79 | } 80 | 81 | public void setRefundFee( Integer refundFee ) { 82 | this.refundFee = refundFee; 83 | } 84 | 85 | public String getRefundFeeType() { 86 | return refundFeeType; 87 | } 88 | 89 | public void setRefundFeeType( String refundFeeType ) { 90 | this.refundFeeType = refundFeeType; 91 | } 92 | 93 | public String getRefundDesc() { 94 | return refundDesc; 95 | } 96 | 97 | public void setRefundDesc( String refundDesc ) { 98 | this.refundDesc = refundDesc; 99 | } 100 | 101 | public String getRefundAccount() { 102 | return refundAccount; 103 | } 104 | 105 | public void setRefundAccount( String refundAccount ) { 106 | this.refundAccount = refundAccount; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m200004/ResInfo200004.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m200004; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | 7 | @XmlAccessorType( XmlAccessType.FIELD ) 8 | public class ResInfo200004 { 9 | 10 | /** 11 | * 交易代码 12 | */ 13 | @XmlElement( name = "TRX_CODE" ) 14 | private String trxCode; 15 | 16 | /** 17 | * 版本号 18 | */ 19 | @XmlElement( name = "VERSION" ) 20 | private String version; 21 | 22 | /** 23 | * 数据格式 24 | */ 25 | @XmlElement( name = "DATA_TYPE" ) 26 | private String dataType; 27 | 28 | /** 29 | * 请求流水号 30 | */ 31 | @XmlElement( name = "REQ_SN" ) 32 | private String reqSn; 33 | 34 | /** 35 | * 返回代码 36 | */ 37 | @XmlElement( name = "RET_CODE" ) 38 | private String retCode; 39 | 40 | /** 41 | * 错误信息 42 | */ 43 | @XmlElement( name = "ERR_MSG" ) 44 | private String errMsg; 45 | 46 | /** 47 | * 签名信息 48 | */ 49 | @XmlElement( name = "SIGNED_MSG" ) 50 | private String signedMsg; 51 | 52 | public String getTrxCode() { 53 | return trxCode; 54 | } 55 | 56 | public void setTrxCode( String trxCode ) { 57 | this.trxCode = trxCode; 58 | } 59 | 60 | public String getVersion() { 61 | return version; 62 | } 63 | 64 | public void setVersion( String version ) { 65 | this.version = version; 66 | } 67 | 68 | public String getDataType() { 69 | return dataType; 70 | } 71 | 72 | public void setDataType( String dataType ) { 73 | this.dataType = dataType; 74 | } 75 | 76 | public String getReqSn() { 77 | return reqSn; 78 | } 79 | 80 | public void setReqSn( String reqSn ) { 81 | this.reqSn = reqSn; 82 | } 83 | 84 | public String getRetCode() { 85 | return retCode; 86 | } 87 | 88 | public void setRetCode( String retCode ) { 89 | this.retCode = retCode; 90 | } 91 | 92 | public String getErrMsg() { 93 | return errMsg; 94 | } 95 | 96 | public void setErrMsg( String errMsg ) { 97 | this.errMsg = errMsg; 98 | } 99 | 100 | public String getSignedMsg() { 101 | return signedMsg; 102 | } 103 | 104 | public void setSignedMsg( String signedMsg ) { 105 | this.signedMsg = signedMsg; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayRefundQueryGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayRefundQueryGateInput { 4 | 5 | /** 6 | * 应用ID 7 | */ 8 | private String appId; 9 | 10 | /** 11 | * 商户号 12 | */ 13 | private String mchId; 14 | 15 | /** 16 | * apiKey 17 | */ 18 | private String apiKey; 19 | 20 | private String weixinHost; 21 | 22 | /** 23 | * 微信订单号 24 | */ 25 | private String transactionId; 26 | 27 | /** 28 | * 商户订单号 29 | */ 30 | private String outTradeNo; 31 | 32 | /** 33 | * 商户退款单号 34 | */ 35 | private String outRefundNo; 36 | 37 | /** 38 | * 微信退款单号 39 | */ 40 | private String refundId; 41 | 42 | /** 43 | * 偏移量 44 | */ 45 | private Integer offset; 46 | 47 | public String getAppId() { 48 | return appId; 49 | } 50 | 51 | public void setAppId( String appId ) { 52 | this.appId = appId; 53 | } 54 | 55 | public String getMchId() { 56 | return mchId; 57 | } 58 | 59 | public void setMchId( String mchId ) { 60 | this.mchId = mchId; 61 | } 62 | 63 | public String getApiKey() { 64 | return apiKey; 65 | } 66 | 67 | public void setApiKey( String apiKey ) { 68 | this.apiKey = apiKey; 69 | } 70 | 71 | public String getTransactionId() { 72 | return transactionId; 73 | } 74 | 75 | public void setTransactionId( String transactionId ) { 76 | this.transactionId = transactionId; 77 | } 78 | 79 | public String getOutTradeNo() { 80 | return outTradeNo; 81 | } 82 | 83 | public void setOutTradeNo( String outTradeNo ) { 84 | this.outTradeNo = outTradeNo; 85 | } 86 | 87 | public String getOutRefundNo() { 88 | return outRefundNo; 89 | } 90 | 91 | public void setOutRefundNo( String outRefundNo ) { 92 | this.outRefundNo = outRefundNo; 93 | } 94 | 95 | public String getRefundId() { 96 | return refundId; 97 | } 98 | 99 | public void setRefundId( String refundId ) { 100 | this.refundId = refundId; 101 | } 102 | 103 | public Integer getOffset() { 104 | return offset; 105 | } 106 | 107 | public void setOffset( Integer offset ) { 108 | this.offset = offset; 109 | } 110 | 111 | public String getWeixinHost() { 112 | return weixinHost; 113 | } 114 | 115 | public void setWeixinHost( String weixinHost ) { 116 | this.weixinHost = weixinHost; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/domain/PayInGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.domain; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class PayInGateInput { 6 | 7 | /** 8 | * 商户流水号 9 | */ 10 | private String requestNo; 11 | 12 | /** 13 | * 还款流水号 14 | */ 15 | private String processNo; 16 | 17 | /** 18 | * 银行卡 19 | */ 20 | private String cardNo; 21 | 22 | /** 23 | * 姓名 24 | */ 25 | private String cardName; 26 | 27 | /** 28 | * 手机号 29 | */ 30 | private String cardMobile; 31 | 32 | /** 33 | * 证件号 34 | */ 35 | private String idNo; 36 | 37 | /** 38 | * 银行编码 39 | */ 40 | private String bankCode; 41 | 42 | /** 43 | * 还款金额 44 | */ 45 | private BigDecimal amount; 46 | 47 | /** 48 | * 订单号 49 | */ 50 | private String orderNo; 51 | 52 | public String getRequestNo() { 53 | return requestNo; 54 | } 55 | 56 | public void setRequestNo( String requestNo ) { 57 | this.requestNo = requestNo; 58 | } 59 | 60 | public String getProcessNo() { 61 | return processNo; 62 | } 63 | 64 | public void setProcessNo( String processNo ) { 65 | this.processNo = processNo; 66 | } 67 | 68 | public String getOrderNo() { 69 | return orderNo; 70 | } 71 | 72 | public void setOrderNo( String orderNo ) { 73 | this.orderNo = orderNo; 74 | } 75 | 76 | public String getCardNo() { 77 | return cardNo; 78 | } 79 | 80 | public void setCardNo( String cardNo ) { 81 | this.cardNo = cardNo; 82 | } 83 | 84 | public String getCardName() { 85 | return cardName; 86 | } 87 | 88 | public void setCardName( String cardName ) { 89 | this.cardName = cardName; 90 | } 91 | 92 | public String getCardMobile() { 93 | return cardMobile; 94 | } 95 | 96 | public void setCardMobile( String cardMobile ) { 97 | this.cardMobile = cardMobile; 98 | } 99 | 100 | public String getIdNo() { 101 | return idNo; 102 | } 103 | 104 | public void setIdNo( String idNo ) { 105 | this.idNo = idNo; 106 | } 107 | 108 | public String getBankCode() { 109 | return bankCode; 110 | } 111 | 112 | public void setBankCode( String bankCode ) { 113 | this.bankCode = bankCode; 114 | } 115 | 116 | public BigDecimal getAmount() { 117 | return amount; 118 | } 119 | 120 | public void setAmount( BigDecimal amount ) { 121 | this.amount = amount; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatOrderQueryOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | import java.util.Date; 4 | 5 | public class WechatOrderQueryOutput { 6 | 7 | /** 8 | * 商户流水号 9 | */ 10 | private String requestNo; 11 | 12 | /** 13 | * 应用Id 14 | */ 15 | private String appId; 16 | 17 | /** 18 | * 支付状态 PAYING: 支付中 SUCCESS: 成功 FAIL: 失败 19 | */ 20 | private String status; 21 | 22 | /** 23 | * 订单号 24 | */ 25 | private String orderNo; 26 | 27 | /** 28 | * 渠道方订单号(微信) 29 | */ 30 | private String channelOrderNo; 31 | 32 | /** 33 | * 回盘时间 34 | */ 35 | private Date returnTime; 36 | 37 | /** 38 | * 微信支付时间 39 | */ 40 | private Date payTime; 41 | 42 | /** 43 | * 错误码 44 | */ 45 | private String errCode; 46 | 47 | /** 48 | * 错误码描述 49 | */ 50 | private String errCodeDesc; 51 | 52 | public String getRequestNo() { 53 | return requestNo; 54 | } 55 | 56 | public void setRequestNo( String requestNo ) { 57 | this.requestNo = requestNo; 58 | } 59 | 60 | public String getAppId() { 61 | return appId; 62 | } 63 | 64 | public void setAppId( String appId ) { 65 | this.appId = appId; 66 | } 67 | 68 | public String getStatus() { 69 | return status; 70 | } 71 | 72 | public void setStatus( String status ) { 73 | this.status = status; 74 | } 75 | 76 | public String getOrderNo() { 77 | return orderNo; 78 | } 79 | 80 | public void setOrderNo( String orderNo ) { 81 | this.orderNo = orderNo; 82 | } 83 | 84 | public String getChannelOrderNo() { 85 | return channelOrderNo; 86 | } 87 | 88 | public void setChannelOrderNo( String channelOrderNo ) { 89 | this.channelOrderNo = channelOrderNo; 90 | } 91 | 92 | public Date getReturnTime() { 93 | return returnTime; 94 | } 95 | 96 | public void setReturnTime( Date returnTime ) { 97 | this.returnTime = returnTime; 98 | } 99 | 100 | public Date getPayTime() { 101 | return payTime; 102 | } 103 | 104 | public void setPayTime( Date payTime ) { 105 | this.payTime = payTime; 106 | } 107 | 108 | public String getErrCode() { 109 | return errCode; 110 | } 111 | 112 | public void setErrCode( String errCode ) { 113 | this.errCode = errCode; 114 | } 115 | 116 | public String getErrCodeDesc() { 117 | return errCodeDesc; 118 | } 119 | 120 | public void setErrCodeDesc( String errCodeDesc ) { 121 | this.errCodeDesc = errCodeDesc; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayUnifiedOrderGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayUnifiedOrderGateOutput { 4 | 5 | /** 6 | * 返回状态码 7 | */ 8 | private String returnCode; 9 | 10 | /** 11 | * 返回信息 12 | */ 13 | private String returnMsg; 14 | 15 | /** 16 | * 返回码 17 | */ 18 | private String resultCode; 19 | 20 | /** 21 | * 错误码 22 | */ 23 | private String errCode; 24 | 25 | /** 26 | * 错误码描述 27 | */ 28 | private String errCodeDes; 29 | 30 | /** 31 | * 预支付交易会话标识 32 | */ 33 | private String prepayId; 34 | 35 | /** 36 | * 二维码支付地址 37 | */ 38 | private String codeUrl; 39 | 40 | /** 41 | * h5支付地址 42 | */ 43 | private String mwebUrl; 44 | 45 | /** 46 | * 微信app端支付参数 47 | */ 48 | private WechatAppPayOutput appPayRequest; 49 | 50 | public String getReturnCode() { 51 | return returnCode; 52 | } 53 | 54 | public void setReturnCode( String returnCode ) { 55 | this.returnCode = returnCode; 56 | } 57 | 58 | public String getReturnMsg() { 59 | return returnMsg; 60 | } 61 | 62 | public void setReturnMsg( String returnMsg ) { 63 | this.returnMsg = returnMsg; 64 | } 65 | 66 | public String getResultCode() { 67 | return resultCode; 68 | } 69 | 70 | public void setResultCode( String resultCode ) { 71 | this.resultCode = resultCode; 72 | } 73 | 74 | public String getErrCode() { 75 | return errCode; 76 | } 77 | 78 | public void setErrCode( String errCode ) { 79 | this.errCode = errCode; 80 | } 81 | 82 | public String getErrCodeDes() { 83 | return errCodeDes; 84 | } 85 | 86 | public void setErrCodeDes( String errCodeDes ) { 87 | this.errCodeDes = errCodeDes; 88 | } 89 | 90 | public String getPrepayId() { 91 | return prepayId; 92 | } 93 | 94 | public void setPrepayId( String prepayId ) { 95 | this.prepayId = prepayId; 96 | } 97 | 98 | public String getCodeUrl() { 99 | return codeUrl; 100 | } 101 | 102 | public void setCodeUrl( String codeUrl ) { 103 | this.codeUrl = codeUrl; 104 | } 105 | 106 | public String getMwebUrl() { 107 | return mwebUrl; 108 | } 109 | 110 | public void setMwebUrl( String mwebUrl ) { 111 | this.mwebUrl = mwebUrl; 112 | } 113 | 114 | public WechatAppPayOutput getAppPayRequest() { 115 | return appPayRequest; 116 | } 117 | 118 | public void setAppPayRequest( WechatAppPayOutput appPayRequest ) { 119 | this.appPayRequest = appPayRequest; 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatOrderCloseOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | import java.util.Date; 4 | 5 | public class WechatOrderCloseOutput { 6 | 7 | 8 | /** 9 | * 商户流水号 10 | */ 11 | private String requestNo; 12 | 13 | /** 14 | * 支付状态 PAYING: 支付中 SUCCESS: 成功 FAIL: 失败 15 | */ 16 | private String status; 17 | 18 | /** 19 | * 订单号 20 | */ 21 | private String orderNo; 22 | 23 | /** 24 | * 渠道方订单号(微信) 25 | */ 26 | private String channelOrderNo; 27 | 28 | /** 29 | * 回盘时间 30 | */ 31 | private Date returnTime; 32 | 33 | /** 34 | * 微信支付时间 35 | */ 36 | private Date payTime; 37 | 38 | /** 39 | * 错误码 40 | */ 41 | private String errCode; 42 | 43 | /** 44 | * 错误码描述 45 | */ 46 | private String errCodeDesc; 47 | 48 | /** 49 | * 微信商户号 50 | */ 51 | private String channelMemberNo; 52 | 53 | public String getRequestNo() { 54 | return requestNo; 55 | } 56 | 57 | public void setRequestNo( String requestNo ) { 58 | this.requestNo = requestNo; 59 | } 60 | 61 | public String getStatus() { 62 | return status; 63 | } 64 | 65 | public void setStatus( String status ) { 66 | this.status = status; 67 | } 68 | 69 | public String getOrderNo() { 70 | return orderNo; 71 | } 72 | 73 | public void setOrderNo( String orderNo ) { 74 | this.orderNo = orderNo; 75 | } 76 | 77 | public String getChannelOrderNo() { 78 | return channelOrderNo; 79 | } 80 | 81 | public void setChannelOrderNo( String channelOrderNo ) { 82 | this.channelOrderNo = channelOrderNo; 83 | } 84 | 85 | public Date getReturnTime() { 86 | return returnTime; 87 | } 88 | 89 | public void setReturnTime( Date returnTime ) { 90 | this.returnTime = returnTime; 91 | } 92 | 93 | public Date getPayTime() { 94 | return payTime; 95 | } 96 | 97 | public void setPayTime( Date payTime ) { 98 | this.payTime = payTime; 99 | } 100 | 101 | public String getErrCode() { 102 | return errCode; 103 | } 104 | 105 | public void setErrCode( String errCode ) { 106 | this.errCode = errCode; 107 | } 108 | 109 | public String getErrCodeDesc() { 110 | return errCodeDesc; 111 | } 112 | 113 | public void setErrCodeDesc( String errCodeDesc ) { 114 | this.errCodeDesc = errCodeDesc; 115 | } 116 | 117 | public String getChannelMemberNo() { 118 | return channelMemberNo; 119 | } 120 | 121 | public void setChannelMemberNo( String channelMemberNo ) { 122 | this.channelMemberNo = channelMemberNo; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatAppPayOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlAccessorType( value = XmlAccessType.FIELD ) 9 | @XmlRootElement( name = "xml" ) 10 | public class WechatAppPayOutput { 11 | /** 12 | * 应用ID 13 | */ 14 | @XmlElement( name = "appid" ) 15 | private String appId; 16 | /** 17 | * 商户号 18 | */ 19 | @XmlElement( name = "partnerid" ) 20 | private String partnerId; 21 | /** 22 | * 预支付交易会话ID 23 | */ 24 | @XmlElement( name = "prepayid" ) 25 | private String prepayId; 26 | /** 27 | * 扩展字段 28 | */ 29 | @XmlElement( name = "package" ) 30 | private String wxPackage; 31 | /** 32 | * 随机字符串 33 | */ 34 | @XmlElement( name = "noncestr" ) 35 | private String nonceStr; 36 | /** 37 | * 时间戳 38 | */ 39 | @XmlElement( name = "timestamp" ) 40 | private String timeStamp; 41 | /** 42 | * 签名 43 | */ 44 | @XmlElement( name = "sign" ) 45 | private String sign; 46 | 47 | private String signType; 48 | 49 | public String getSignType() { 50 | return signType; 51 | } 52 | 53 | public void setSignType( String signType ) { 54 | this.signType = signType; 55 | } 56 | 57 | public String getAppId() { 58 | return appId; 59 | } 60 | 61 | public void setAppId( String appId ) { 62 | this.appId = appId; 63 | } 64 | 65 | public String getPartnerId() { 66 | return partnerId; 67 | } 68 | 69 | public void setPartnerId( String partnerId ) { 70 | this.partnerId = partnerId; 71 | } 72 | 73 | public String getPrepayId() { 74 | return prepayId; 75 | } 76 | 77 | public void setPrepayId( String prepayId ) { 78 | this.prepayId = prepayId; 79 | } 80 | 81 | public String getWxPackage() { 82 | return wxPackage; 83 | } 84 | 85 | public void setWxPackage( String wxPackage ) { 86 | this.wxPackage = wxPackage; 87 | } 88 | 89 | public String getNonceStr() { 90 | return nonceStr; 91 | } 92 | 93 | public void setNonceStr( String nonceStr ) { 94 | this.nonceStr = nonceStr; 95 | } 96 | 97 | public String getTimeStamp() { 98 | return timeStamp; 99 | } 100 | 101 | public void setTimeStamp( String timeStamp ) { 102 | this.timeStamp = timeStamp; 103 | } 104 | 105 | public String getSign() { 106 | return sign; 107 | } 108 | 109 | public void setSign( String sign ) { 110 | this.sign = sign; 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatPayRequest.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | public class WechatPayRequest { 4 | 5 | /** 6 | * 应用ID 7 | */ 8 | private String appId; 9 | 10 | /** 11 | * 商户号 12 | */ 13 | private String partnerId; 14 | 15 | /** 16 | * 预支付交易会话ID 17 | */ 18 | private String prepayId; 19 | 20 | /** 21 | * 随机字符串 22 | */ 23 | private String nonceStr; 24 | 25 | /** 26 | * 时间戳 27 | */ 28 | private String timestamp; 29 | 30 | /** 31 | * 签名 32 | */ 33 | private String sign; 34 | 35 | /** 36 | * 扩展字段 37 | */ 38 | private String packageStr; 39 | 40 | /** 41 | * 签名类型,默认为MD5,支持HMAC-SHA256和MD5。注意此处需与统一下单的签名类型一致 42 | */ 43 | private String signType; 44 | 45 | /** 46 | * 扫码支付链接 47 | */ 48 | private String codeUrl; 49 | 50 | /** 51 | * h5支付链接 52 | */ 53 | private String mwebUrl; 54 | 55 | public String getSignType() { 56 | return signType; 57 | } 58 | 59 | public void setSignType( String signType ) { 60 | this.signType = signType; 61 | } 62 | 63 | public String getAppId() { 64 | return appId; 65 | } 66 | 67 | public void setAppId( String appId ) { 68 | this.appId = appId; 69 | } 70 | 71 | public String getPartnerId() { 72 | return partnerId; 73 | } 74 | 75 | public void setPartnerId( String partnerId ) { 76 | this.partnerId = partnerId; 77 | } 78 | 79 | public String getPrepayId() { 80 | return prepayId; 81 | } 82 | 83 | public void setPrepayId( String prepayId ) { 84 | this.prepayId = prepayId; 85 | } 86 | 87 | public String getNonceStr() { 88 | return nonceStr; 89 | } 90 | 91 | public void setNonceStr( String nonceStr ) { 92 | this.nonceStr = nonceStr; 93 | } 94 | 95 | public String getTimestamp() { 96 | return timestamp; 97 | } 98 | 99 | public void setTimestamp( String timestamp ) { 100 | this.timestamp = timestamp; 101 | } 102 | 103 | public String getSign() { 104 | return sign; 105 | } 106 | 107 | public void setSign( String sign ) { 108 | this.sign = sign; 109 | } 110 | 111 | public String getPackageStr() { 112 | return packageStr; 113 | } 114 | 115 | public void setPackageStr( String packageStr ) { 116 | this.packageStr = packageStr; 117 | } 118 | 119 | public String getCodeUrl() { 120 | return codeUrl; 121 | } 122 | 123 | public void setCodeUrl( String codeUrl ) { 124 | this.codeUrl = codeUrl; 125 | } 126 | 127 | public String getMwebUrl() { 128 | return mwebUrl; 129 | } 130 | 131 | public void setMwebUrl( String mwebUrl ) { 132 | this.mwebUrl = mwebUrl; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m100011/ReqInfo100011.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m100011; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "INFO" ) 9 | @XmlAccessorType( XmlAccessType.FIELD ) 10 | public class ReqInfo100011 { 11 | 12 | @XmlElement( name = "TRX_CODE" ) //交易代码 13 | private String trxCode; 14 | 15 | @XmlElement( name = "VERSION" ) //版本号 16 | private String version; 17 | 18 | @XmlElement( name = "DATA_TYPE" ) //数据格式 19 | private String dataType; 20 | 21 | @XmlElement( name = "LEVEL" ) //处理级别 22 | private String level; 23 | 24 | @XmlElement( name = "MERCHANT_ID" ) //商户号 25 | private String merchantId; 26 | 27 | @XmlElement( name = "USER_NAME" ) //用户名 28 | private String userName; 29 | 30 | @XmlElement( name = "USER_PASS" ) //用户密码 31 | private String userPass; 32 | 33 | @XmlElement( name = "REQ_SN" ) //请求流水号 34 | private String reqSn; 35 | 36 | @XmlElement( name = "SIGNED_MSG" ) //签名信息 37 | private String signedMsg; 38 | 39 | public String getTrxCode() { 40 | return trxCode; 41 | } 42 | 43 | public void setTrxCode( String trxCode ) { 44 | this.trxCode = trxCode; 45 | } 46 | 47 | public String getVersion() { 48 | return version; 49 | } 50 | 51 | public void setVersion( String version ) { 52 | this.version = version; 53 | } 54 | 55 | public String getDataType() { 56 | return dataType; 57 | } 58 | 59 | public void setDataType( String dataType ) { 60 | this.dataType = dataType; 61 | } 62 | 63 | public String getLevel() { 64 | return level; 65 | } 66 | 67 | public void setLevel( String level ) { 68 | this.level = level; 69 | } 70 | 71 | public String getMerchantId() { 72 | return merchantId; 73 | } 74 | 75 | public void setMerchantId( String merchantId ) { 76 | this.merchantId = merchantId; 77 | } 78 | 79 | public String getUserName() { 80 | return userName; 81 | } 82 | 83 | public void setUserName( String userName ) { 84 | this.userName = userName; 85 | } 86 | 87 | public String getUserPass() { 88 | return userPass; 89 | } 90 | 91 | public void setUserPass( String userPass ) { 92 | this.userPass = userPass; 93 | } 94 | 95 | public String getReqSn() { 96 | return reqSn; 97 | } 98 | 99 | public void setReqSn( String reqSn ) { 100 | this.reqSn = reqSn; 101 | } 102 | 103 | public String getSignedMsg() { 104 | return signedMsg; 105 | } 106 | 107 | public void setSignedMsg( String signedMsg ) { 108 | this.signedMsg = signedMsg; 109 | } 110 | } -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/message/m200004/ReqInfo200004.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.message.m200004; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "INFO" ) 9 | @XmlAccessorType( XmlAccessType.FIELD ) 10 | public class ReqInfo200004 { 11 | 12 | @XmlElement( name = "TRX_CODE" ) //交易代码 13 | private String trxCode; 14 | 15 | @XmlElement( name = "VERSION" ) //版本号 16 | private String version; 17 | 18 | @XmlElement( name = "DATA_TYPE" ) //数据格式 19 | private String dataType; 20 | 21 | @XmlElement( name = "LEVEL" ) //处理级别 22 | private String level; 23 | 24 | @XmlElement( name = "MERCHANT_ID" ) //商户号 25 | private String merchantId; 26 | 27 | @XmlElement( name = "USER_NAME" ) //用户名 28 | private String userName; 29 | 30 | @XmlElement( name = "USER_PASS" ) //用户密码 31 | private String userPass; 32 | 33 | @XmlElement( name = "REQ_SN" ) //请求流水号 34 | private String reqSn; 35 | 36 | @XmlElement( name = "SIGNED_MSG" ) //签名信息 37 | private String signedMsg; 38 | 39 | public String getTrxCode() { 40 | return trxCode; 41 | } 42 | 43 | public void setTrxCode( String trxCode ) { 44 | this.trxCode = trxCode; 45 | } 46 | 47 | public String getVersion() { 48 | return version; 49 | } 50 | 51 | public void setVersion( String version ) { 52 | this.version = version; 53 | } 54 | 55 | public String getDataType() { 56 | return dataType; 57 | } 58 | 59 | public void setDataType( String dataType ) { 60 | this.dataType = dataType; 61 | } 62 | 63 | public String getLevel() { 64 | return level; 65 | } 66 | 67 | public void setLevel( String level ) { 68 | this.level = level; 69 | } 70 | 71 | public String getMerchantId() { 72 | return merchantId; 73 | } 74 | 75 | public void setMerchantId( String merchantId ) { 76 | this.merchantId = merchantId; 77 | } 78 | 79 | public String getUserName() { 80 | return userName; 81 | } 82 | 83 | public void setUserName( String userName ) { 84 | this.userName = userName; 85 | } 86 | 87 | public String getUserPass() { 88 | return userPass; 89 | } 90 | 91 | public void setUserPass( String userPass ) { 92 | this.userPass = userPass; 93 | } 94 | 95 | public String getReqSn() { 96 | return reqSn; 97 | } 98 | 99 | public void setReqSn( String reqSn ) { 100 | this.reqSn = reqSn; 101 | } 102 | 103 | public String getSignedMsg() { 104 | return signedMsg; 105 | } 106 | 107 | public void setSignedMsg( String signedMsg ) { 108 | this.signedMsg = signedMsg; 109 | } 110 | } -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatPayRefundQueryInputXml.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlRootElement; 6 | 7 | @XmlRootElement( name = "xml" ) 8 | @XmlAccessorType( XmlAccessType.FIELD ) 9 | public class WechatPayRefundQueryInputXml { 10 | 11 | /** 12 | * 应用ID 13 | */ 14 | private String appid; 15 | 16 | /** 17 | * 商户号 18 | */ 19 | private String mch_id; 20 | 21 | /** 22 | * 随机字符串 23 | */ 24 | private String nonce_str; 25 | 26 | /** 27 | * 签名 28 | */ 29 | private String sign; 30 | 31 | /** 32 | * 微信订单号 33 | */ 34 | private String transaction_id; 35 | 36 | /** 37 | * 商户订单号 38 | */ 39 | private String out_trade_no; 40 | 41 | /** 42 | * 商户退款单号 43 | */ 44 | private String out_refund_no; 45 | 46 | /** 47 | * 微信退款单号 48 | */ 49 | private String refund_id; 50 | 51 | /** 52 | * 偏移量 53 | */ 54 | private Integer offset; 55 | 56 | public String getAppid() { 57 | return appid; 58 | } 59 | 60 | public void setAppid( String appid ) { 61 | this.appid = appid; 62 | } 63 | 64 | public String getMch_id() { 65 | return mch_id; 66 | } 67 | 68 | public void setMch_id( String mch_id ) { 69 | this.mch_id = mch_id; 70 | } 71 | 72 | public String getNonce_str() { 73 | return nonce_str; 74 | } 75 | 76 | public void setNonce_str( String nonce_str ) { 77 | this.nonce_str = nonce_str; 78 | } 79 | 80 | public String getSign() { 81 | return sign; 82 | } 83 | 84 | public void setSign( String sign ) { 85 | this.sign = sign; 86 | } 87 | 88 | public String getTransaction_id() { 89 | return transaction_id; 90 | } 91 | 92 | public void setTransaction_id( String transaction_id ) { 93 | this.transaction_id = transaction_id; 94 | } 95 | 96 | public String getOut_trade_no() { 97 | return out_trade_no; 98 | } 99 | 100 | public void setOut_trade_no( String out_trade_no ) { 101 | this.out_trade_no = out_trade_no; 102 | } 103 | 104 | public String getOut_refund_no() { 105 | return out_refund_no; 106 | } 107 | 108 | public void setOut_refund_no( String out_refund_no ) { 109 | this.out_refund_no = out_refund_no; 110 | } 111 | 112 | public String getRefund_id() { 113 | return refund_id; 114 | } 115 | 116 | public void setRefund_id( String refund_id ) { 117 | this.refund_id = refund_id; 118 | } 119 | 120 | public Integer getOffset() { 121 | return offset; 122 | } 123 | 124 | public void setOffset( Integer offset ) { 125 | this.offset = offset; 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayNoticeGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayNoticeGateOutput { 4 | 5 | /** 6 | * 返回状态码 7 | */ 8 | private String returnCode; 9 | 10 | /** 11 | * 返回信息 12 | */ 13 | private String returnMsg; 14 | 15 | /** 16 | * 返回码 17 | */ 18 | private String resultCode; 19 | 20 | /** 21 | * 错误码 22 | */ 23 | private String errCode; 24 | 25 | /** 26 | * 错误码描述 27 | */ 28 | private String errCodeDes; 29 | 30 | /** 31 | * 微信订单号 32 | */ 33 | private String transactionId; 34 | 35 | /** 36 | * 商户订单号 37 | */ 38 | private String outTradeNo; 39 | 40 | /** 41 | * 订单结束时间 42 | */ 43 | private String timeEnd; 44 | 45 | /** 46 | * 付款银行 47 | */ 48 | private String BankType; 49 | 50 | /** 51 | * 用户标识 52 | */ 53 | private String openId; 54 | 55 | public String getReturnCode() { 56 | return returnCode; 57 | } 58 | 59 | public void setReturnCode( String returnCode ) { 60 | this.returnCode = returnCode; 61 | } 62 | 63 | public String getReturnMsg() { 64 | return returnMsg; 65 | } 66 | 67 | public void setReturnMsg( String returnMsg ) { 68 | this.returnMsg = returnMsg; 69 | } 70 | 71 | public String getResultCode() { 72 | return resultCode; 73 | } 74 | 75 | public void setResultCode( String resultCode ) { 76 | this.resultCode = resultCode; 77 | } 78 | 79 | public String getErrCode() { 80 | return errCode; 81 | } 82 | 83 | public void setErrCode( String errCode ) { 84 | this.errCode = errCode; 85 | } 86 | 87 | public String getErrCodeDes() { 88 | return errCodeDes; 89 | } 90 | 91 | public void setErrCodeDes( String errCodeDes ) { 92 | this.errCodeDes = errCodeDes; 93 | } 94 | 95 | public String getTransactionId() { 96 | return transactionId; 97 | } 98 | 99 | public void setTransactionId( String transactionId ) { 100 | this.transactionId = transactionId; 101 | } 102 | 103 | public String getOutTradeNo() { 104 | return outTradeNo; 105 | } 106 | 107 | public void setOutTradeNo( String outTradeNo ) { 108 | this.outTradeNo = outTradeNo; 109 | } 110 | 111 | public String getTimeEnd() { 112 | return timeEnd; 113 | } 114 | 115 | public void setTimeEnd( String timeEnd ) { 116 | this.timeEnd = timeEnd; 117 | } 118 | 119 | public String getBankType() { 120 | return BankType; 121 | } 122 | 123 | public void setBankType( String bankType ) { 124 | BankType = bankType; 125 | } 126 | 127 | public String getOpenId() { 128 | return openId; 129 | } 130 | 131 | public void setOpenId( String openId ) { 132 | this.openId = openId; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/alipay/gate/domain/AlipayTradeQueryGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.alipay.gate.domain; 2 | 3 | public class AlipayTradeQueryGateOutput { 4 | 5 | /** 6 | * 支付宝交易号 7 | */ 8 | private String tradeNo; 9 | 10 | /** 11 | * 商家订单号 12 | */ 13 | private String outTradeNo; 14 | 15 | /** 16 | * 买家支付宝账号 17 | */ 18 | private String buyerLogonId; 19 | 20 | /** 21 | * 交易状态:WAIT_BUYER_PAY(交易创建,等待买家付款)、TRADE_CLOSED(未付款交易超时关闭,或支付完成后全额退款)、TRADE_SUCCESS(交易支付成功)、TRADE_FINISHED(交易结束,不可退款) 22 | */ 23 | private String tradeStatus; 24 | 25 | /** 26 | * 交易的订单金额,单位为元,两位小数。该参数的值为支付时传入的total_amount 27 | */ 28 | private String totalAmount; 29 | 30 | /** 31 | * 买家在支付宝的用户id 32 | */ 33 | private String buyerUserId; 34 | 35 | /** 36 | * 网关返回码 37 | */ 38 | private String code; 39 | 40 | /** 41 | * 网关返回码描述 42 | */ 43 | private String msg; 44 | 45 | /** 46 | * 业务返回码 47 | */ 48 | private String subCode; 49 | 50 | /** 51 | * 业务返回码描述 52 | */ 53 | private String subMsg; 54 | 55 | public String getTradeNo() { 56 | return tradeNo; 57 | } 58 | 59 | public void setTradeNo( String tradeNo ) { 60 | this.tradeNo = tradeNo; 61 | } 62 | 63 | public String getOutTradeNo() { 64 | return outTradeNo; 65 | } 66 | 67 | public void setOutTradeNo( String outTradeNo ) { 68 | this.outTradeNo = outTradeNo; 69 | } 70 | 71 | public String getBuyerLogonId() { 72 | return buyerLogonId; 73 | } 74 | 75 | public void setBuyerLogonId( String buyerLogonId ) { 76 | this.buyerLogonId = buyerLogonId; 77 | } 78 | 79 | public String getTradeStatus() { 80 | return tradeStatus; 81 | } 82 | 83 | public void setTradeStatus( String tradeStatus ) { 84 | this.tradeStatus = tradeStatus; 85 | } 86 | 87 | public String getTotalAmount() { 88 | return totalAmount; 89 | } 90 | 91 | public void setTotalAmount( String totalAmount ) { 92 | this.totalAmount = totalAmount; 93 | } 94 | 95 | public String getBuyerUserId() { 96 | return buyerUserId; 97 | } 98 | 99 | public void setBuyerUserId( String buyerUserId ) { 100 | this.buyerUserId = buyerUserId; 101 | } 102 | 103 | public String getCode() { 104 | return code; 105 | } 106 | 107 | public void setCode( String code ) { 108 | this.code = code; 109 | } 110 | 111 | public String getMsg() { 112 | return msg; 113 | } 114 | 115 | public void setMsg( String msg ) { 116 | this.msg = msg; 117 | } 118 | 119 | public String getSubCode() { 120 | return subCode; 121 | } 122 | 123 | public void setSubCode( String subCode ) { 124 | this.subCode = subCode; 125 | } 126 | 127 | public String getSubMsg() { 128 | return subMsg; 129 | } 130 | 131 | public void setSubMsg( String subMsg ) { 132 | this.subMsg = subMsg; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/message/WechatCloseOrderOutputXml.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.message; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement( name = "xml" ) 9 | @XmlAccessorType( value = XmlAccessType.FIELD ) 10 | public class WechatCloseOrderOutputXml { 11 | 12 | /** 13 | * 返回状态码 14 | */ 15 | @XmlElement( name = "return_code" ) 16 | private String returnCode; 17 | 18 | /** 19 | * 返回信息 20 | */ 21 | @XmlElement( name = "return_msg" ) 22 | private String returnMsg; 23 | 24 | /** 25 | * 应用ID 26 | */ 27 | @XmlElement( name = "appid" ) 28 | private String appid; 29 | 30 | /** 31 | * 商户号 32 | */ 33 | @XmlElement( name = "mch_id" ) 34 | private String mchId; 35 | 36 | /** 37 | * 随机字符串 38 | */ 39 | @XmlElement( name = "nonce_str" ) 40 | private String nonceStr; 41 | 42 | /** 43 | * 签名 44 | */ 45 | @XmlElement( name = "sign" ) 46 | private String sign; 47 | 48 | /** 49 | * 返回码 50 | */ 51 | @XmlElement( name = "result_code" ) 52 | private String resultCode; 53 | 54 | /** 55 | * 错误代码 56 | */ 57 | @XmlElement( name = "err_code" ) 58 | private String errCode; 59 | 60 | /** 61 | * 错误代码描述 62 | */ 63 | @XmlElement( name = "err_code_des" ) 64 | private String errCodeDes; 65 | 66 | public String getReturnCode() { 67 | return returnCode; 68 | } 69 | 70 | public void setReturnCode( String returnCode ) { 71 | this.returnCode = returnCode; 72 | } 73 | 74 | public String getReturnMsg() { 75 | return returnMsg; 76 | } 77 | 78 | public void setReturnMsg( String returnMsg ) { 79 | this.returnMsg = returnMsg; 80 | } 81 | 82 | public String getAppid() { 83 | return appid; 84 | } 85 | 86 | public void setAppid( String appid ) { 87 | this.appid = appid; 88 | } 89 | 90 | public String getMchId() { 91 | return mchId; 92 | } 93 | 94 | public void setMchId( String mchId ) { 95 | this.mchId = mchId; 96 | } 97 | 98 | public String getNonceStr() { 99 | return nonceStr; 100 | } 101 | 102 | public void setNonceStr( String nonceStr ) { 103 | this.nonceStr = nonceStr; 104 | } 105 | 106 | public String getSign() { 107 | return sign; 108 | } 109 | 110 | public void setSign( String sign ) { 111 | this.sign = sign; 112 | } 113 | 114 | public String getResultCode() { 115 | return resultCode; 116 | } 117 | 118 | public void setResultCode( String resultCode ) { 119 | this.resultCode = resultCode; 120 | } 121 | 122 | public String getErrCode() { 123 | return errCode; 124 | } 125 | 126 | public void setErrCode( String errCode ) { 127 | this.errCode = errCode; 128 | } 129 | 130 | public String getErrCodeDes() { 131 | return errCodeDes; 132 | } 133 | 134 | public void setErrCodeDes( String errCodeDes ) { 135 | this.errCodeDes = errCodeDes; 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/common/utils/XMLUtils.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.common.utils; 2 | 3 | import org.apache.commons.lang3.StringUtils; 4 | 5 | import javax.xml.bind.JAXBContext; 6 | import javax.xml.bind.Marshaller; 7 | import javax.xml.bind.Unmarshaller; 8 | import java.io.IOException; 9 | import java.io.StringReader; 10 | import java.io.StringWriter; 11 | 12 | public class XMLUtils { 13 | 14 | private XMLUtils() { 15 | } 16 | 17 | public static String toString( Object jaxbElement ) { 18 | try ( StringWriter stringWriter = new StringWriter() ) { 19 | JAXBContext jaxbContext = JAXBContext.newInstance( jaxbElement.getClass() ); 20 | Marshaller marshaller = jaxbContext.createMarshaller(); 21 | marshaller.marshal( jaxbElement, stringWriter ); 22 | return stringWriter.toString(); 23 | } catch ( IOException | JAXBException | javax.xml.bind.JAXBException e ) { 24 | throw new JAXBException( e ); 25 | } 26 | } 27 | 28 | public static String toString( Object jaxbElement, String encoding ) { 29 | try ( StringWriter stringWriter = new StringWriter() ) { 30 | JAXBContext jaxbContext = JAXBContext.newInstance( jaxbElement.getClass() ); 31 | Marshaller marshaller = jaxbContext.createMarshaller(); 32 | marshaller.setProperty( Marshaller.JAXB_ENCODING, encoding ); 33 | marshaller.marshal( jaxbElement, stringWriter ); 34 | return stringWriter.toString(); 35 | } catch ( IOException | JAXBException | javax.xml.bind.JAXBException e ) { 36 | throw new JAXBException( e ); 37 | } 38 | } 39 | 40 | public static T toObject( String jaxbString, Class tClass ) { 41 | try ( StringReader stringReader = new StringReader( jaxbString ) ) { 42 | JAXBContext jaxbContext = JAXBContext.newInstance( tClass ); 43 | Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); 44 | return tClass.cast( unmarshaller.unmarshal( stringReader ) ); 45 | } catch ( JAXBException | javax.xml.bind.JAXBException e ) { 46 | throw new JAXBException( e ); 47 | } 48 | } 49 | 50 | public static String toString( Object jaxbElement, String encoding, String xmlDeclaration ) { 51 | try ( StringWriter stringWriter = new StringWriter() ) { 52 | JAXBContext jaxbContext = JAXBContext.newInstance( jaxbElement.getClass() ); 53 | Marshaller marshaller = jaxbContext.createMarshaller(); 54 | marshaller.setProperty( Marshaller.JAXB_ENCODING, encoding ); 55 | marshaller.setProperty( Marshaller.JAXB_FRAGMENT, true ); 56 | stringWriter.write( xmlDeclaration ); 57 | marshaller.marshal( jaxbElement, stringWriter ); 58 | String xml = stringWriter.toString(); 59 | if ( StringUtils.isNotEmpty( xml ) && xml.endsWith( "\n" ) ) { 60 | xml = xml.substring( 0, xml.length() - 1 ); 61 | } 62 | return xml; 63 | } catch ( IOException | JAXBException | javax.xml.bind.JAXBException e ) { 64 | throw new JAXBException( e ); 65 | } 66 | } 67 | 68 | public static class JAXBException extends RuntimeException { 69 | 70 | public JAXBException( Throwable cause ) { 71 | super( cause ); 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/bankpay/channel/gate/utils/HttpUtils.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.bankpay.channel.gate.utils; 2 | 3 | import org.apache.commons.io.IOUtils; 4 | import org.apache.http.HttpEntity; 5 | import org.apache.http.HttpHeaders; 6 | import org.apache.http.HttpStatus; 7 | import org.apache.http.client.methods.CloseableHttpResponse; 8 | import org.apache.http.client.methods.HttpPost; 9 | import org.apache.http.entity.ContentType; 10 | import org.apache.http.entity.StringEntity; 11 | import org.apache.http.impl.client.CloseableHttpClient; 12 | import org.apache.http.impl.client.HttpClientBuilder; 13 | 14 | import java.io.IOException; 15 | import java.nio.charset.StandardCharsets; 16 | import java.util.Map; 17 | 18 | public class HttpUtils { 19 | private static final CloseableHttpClient HTTP_CLIENT = HttpClientBuilder.create().build(); 20 | 21 | /** 22 | * 发送 POST 请求 23 | * 24 | * @param url 请求 URL 25 | * @param jsonStr JSON 字符串 26 | * @return 响应字符串 27 | * @throws IOException 28 | */ 29 | public static String postXml( String url, String jsonStr ) throws IOException { 30 | HttpPost httpPost = new HttpPost( url ); 31 | httpPost.setHeader( HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_XML.getMimeType() + ";charset=" + StandardCharsets.UTF_8.name() ); 32 | httpPost.setEntity( new StringEntity( jsonStr, StandardCharsets.UTF_8.name() ) ); 33 | try ( CloseableHttpResponse response = HTTP_CLIENT.execute( httpPost ) ) { 34 | HttpEntity entity = response.getEntity(); 35 | int statusCode = response.getStatusLine().getStatusCode(); 36 | if ( entity != null && statusCode == HttpStatus.SC_OK ) { 37 | return IOUtils.toString( entity.getContent(), StandardCharsets.UTF_8 ); 38 | } 39 | else { 40 | throw new IOException( "Post request failed, return code is: " + statusCode ); 41 | } 42 | } 43 | } 44 | 45 | /** 46 | * 发送 POST 请求 47 | * 48 | * @param url 请求 URL 49 | * @param jsonStr JSON 字符串 50 | * @param headers 请求头部 51 | * @param encoding 编码 52 | * @return 响应字符串 53 | * @throws IOException 54 | */ 55 | public static String postXml( String url, String jsonStr, Map headers, String encoding ) throws IOException { 56 | HttpPost httpPost = new HttpPost( url ); 57 | httpPost.setHeader( HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_XML.getMimeType() + ";charset=" + encoding ); 58 | httpPost.setEntity( new StringEntity( jsonStr, encoding ) ); 59 | if ( headers != null && !headers.isEmpty() ) { 60 | for ( Map.Entry entry : headers.entrySet() ) { 61 | httpPost.setHeader( entry.getKey(), entry.getValue() ); 62 | } 63 | } 64 | try ( CloseableHttpResponse response = HTTP_CLIENT.execute( httpPost ) ) { 65 | HttpEntity entity = response.getEntity(); 66 | int statusCode = response.getStatusLine().getStatusCode(); 67 | if ( entity != null && statusCode == HttpStatus.SC_OK ) { 68 | return IOUtils.toString( entity.getContent(), encoding ); 69 | } 70 | else { 71 | throw new IOException( "Post request failed, return code is: " + statusCode ); 72 | } 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayUnifiedOrderGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayUnifiedOrderGateInput { 4 | 5 | /** 6 | * 商品描述 7 | */ 8 | private String body; 9 | 10 | /** 11 | * 订单号 12 | */ 13 | private String orderNo; 14 | 15 | /** 16 | * 扣款金额 17 | */ 18 | private String amount; 19 | 20 | /** 21 | * 用户真实IP 22 | */ 23 | private String requestIp; 24 | 25 | /** 26 | * 交易起始时间 27 | */ 28 | private String beginTime; 29 | 30 | /** 31 | * 交易结束时间 32 | */ 33 | private String endTime; 34 | 35 | /** 36 | * 交易限制,是否信用卡支付 37 | */ 38 | private String tradeLimit; 39 | 40 | /** 41 | * 交易类型 42 | * JSAPI:小程序支付/扫码支付 43 | * MWEB:h5网页支付 44 | * APP:app支付 (不传默认app支付) 45 | * NATIVE:扫码支付 46 | */ 47 | private String tradeType; 48 | 49 | /** 50 | * 用户在商户appid下的唯一标识,交易类型为JSAPI必传 51 | */ 52 | private String openId; 53 | 54 | /** 55 | * h5支付场景 56 | */ 57 | private String sceneInfo; 58 | 59 | /** 60 | * 产品id native支付必传 61 | */ 62 | private String productId; 63 | 64 | public String getProductId() { 65 | return productId; 66 | } 67 | 68 | public void setProductId( String productId ) { 69 | this.productId = productId; 70 | } 71 | 72 | public String getSceneInfo() { 73 | return sceneInfo; 74 | } 75 | 76 | public void setSceneInfo( String sceneInfo ) { 77 | this.sceneInfo = sceneInfo; 78 | } 79 | 80 | public String getTradeLimit() { 81 | return tradeLimit; 82 | } 83 | 84 | public void setTradeLimit( String tradeLimit ) { 85 | this.tradeLimit = tradeLimit; 86 | } 87 | 88 | public String getTradeType() { 89 | return tradeType; 90 | } 91 | 92 | public void setTradeType( String tradeType ) { 93 | this.tradeType = tradeType; 94 | } 95 | 96 | public String getOpenId() { 97 | return openId; 98 | } 99 | 100 | public void setOpenId( String openId ) { 101 | this.openId = openId; 102 | } 103 | 104 | public String getRequestIp() { 105 | return requestIp; 106 | } 107 | 108 | public void setRequestIp( String requestIp ) { 109 | this.requestIp = requestIp; 110 | } 111 | 112 | public String getBody() { 113 | return body; 114 | } 115 | 116 | public void setBody( String body ) { 117 | this.body = body; 118 | } 119 | 120 | public String getOrderNo() { 121 | return orderNo; 122 | } 123 | 124 | public void setOrderNo( String orderNo ) { 125 | this.orderNo = orderNo; 126 | } 127 | 128 | public String getAmount() { 129 | return amount; 130 | } 131 | 132 | public void setAmount( String amount ) { 133 | this.amount = amount; 134 | } 135 | 136 | public String getBeginTime() { 137 | return beginTime; 138 | } 139 | 140 | public void setBeginTime( String beginTime ) { 141 | this.beginTime = beginTime; 142 | } 143 | 144 | public String getEndTime() { 145 | return endTime; 146 | } 147 | 148 | public void setEndTime( String endTime ) { 149 | this.endTime = endTime; 150 | } 151 | 152 | } 153 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/utils/HttpUtils.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.utils; 2 | 3 | import org.apache.http.HttpEntity; 4 | import org.apache.http.client.config.RequestConfig; 5 | import org.apache.http.client.methods.CloseableHttpResponse; 6 | import org.apache.http.client.methods.HttpPost; 7 | import org.apache.http.entity.StringEntity; 8 | import org.apache.http.impl.client.CloseableHttpClient; 9 | import org.apache.http.impl.client.HttpClientBuilder; 10 | import org.apache.http.util.EntityUtils; 11 | import org.apache.logging.log4j.LogManager; 12 | import org.apache.logging.log4j.Logger; 13 | 14 | import java.io.IOException; 15 | 16 | public class HttpUtils { 17 | 18 | private static final Logger log = LogManager.getLogger( HttpUtils.class ); 19 | private static final CloseableHttpClient httpClient; 20 | 21 | static { 22 | RequestConfig requestConfig = RequestConfig.custom() 23 | .setSocketTimeout( 3000 ) 24 | .setConnectTimeout( 3000 ) 25 | .setConnectionRequestTimeout( 3000 ) 26 | .build(); 27 | httpClient = HttpClientBuilder.create().setDefaultRequestConfig( requestConfig ).build(); 28 | } 29 | 30 | public static Result sendPostRequest( String url, StringEntity entity ) { 31 | HttpPost httpPost = new HttpPost( url ); 32 | httpPost.setHeader( "Content-type", "application/json; charset=UTF-8" ); // 允许设置请求编码 33 | httpPost.setEntity( entity ); 34 | try ( CloseableHttpResponse httpResponse = httpClient.execute( httpPost ) ) { 35 | HttpEntity httpEntity = httpResponse.getEntity(); 36 | if ( httpEntity != null ) { 37 | String responseString = EntityUtils.toString( httpEntity, "UTF-8" ); 38 | if ( httpResponse.getStatusLine().getStatusCode() == 200 ) { 39 | return Result.success( responseString ); 40 | } 41 | else { 42 | log.error( "HTTP POST request failed. HTTP status code: " + httpResponse.getStatusLine().getStatusCode() ); 43 | return Result.failure( "HTTP POST request failed. HTTP status code: " + httpResponse.getStatusLine().getStatusCode() ); 44 | } 45 | } 46 | else { 47 | log.error( "HTTP POST request failed. Response is empty." ); 48 | return Result.failure( "HTTP POST request failed. Response is empty." ); 49 | } 50 | } catch ( IOException e ) { 51 | log.error( "Error occurred while sending HTTP POST request: " + e.getMessage() ); 52 | return Result.failure( e.getMessage() ); 53 | } 54 | } 55 | 56 | public static class Result { 57 | 58 | private final boolean success; 59 | private final T data; 60 | 61 | public Result( boolean success, T data ) { 62 | this.success = success; 63 | this.data = data; 64 | } 65 | 66 | public static Result success( T data ) { 67 | return new Result<>( true, data ); 68 | } 69 | 70 | public static Result failure( String errorMessage ) { 71 | return new Result<>( false, errorMessage ); 72 | } 73 | 74 | public boolean isSuccess() { 75 | return success; 76 | } 77 | 78 | public T getData() { 79 | return data; 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatTransfersGateInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class WechatTransfersGateInput { 6 | 7 | /** 8 | * appid 9 | */ 10 | private String appId; 11 | 12 | /** 13 | * 商户号 14 | */ 15 | private String mchid; 16 | 17 | private String weixinHost; 18 | 19 | /** 20 | * 设备号 21 | */ 22 | private String deviceInfo; 23 | 24 | /** 25 | * 订单号 26 | */ 27 | private String orderNo; 28 | 29 | /** 30 | * openId 31 | */ 32 | private String openId; 33 | 34 | /** 35 | * 是否校验姓名 36 | */ 37 | private Boolean checkName; 38 | 39 | /** 40 | * 用户姓名 41 | */ 42 | private String userName; 43 | 44 | /** 45 | * 金额 46 | */ 47 | private BigDecimal amount; 48 | 49 | /** 50 | * 备注 51 | */ 52 | private String desc; 53 | 54 | /** 55 | * ip 56 | */ 57 | private String ip; 58 | 59 | /** 60 | * apikey 61 | */ 62 | private String apiKey; 63 | 64 | public String getAppId() { 65 | return appId; 66 | } 67 | 68 | public void setAppId( String appId ) { 69 | this.appId = appId; 70 | } 71 | 72 | public String getMchid() { 73 | return mchid; 74 | } 75 | 76 | public void setMchid( String mchid ) { 77 | this.mchid = mchid; 78 | } 79 | 80 | public String getDeviceInfo() { 81 | return deviceInfo; 82 | } 83 | 84 | public void setDeviceInfo( String deviceInfo ) { 85 | this.deviceInfo = deviceInfo; 86 | } 87 | 88 | public String getOrderNo() { 89 | return orderNo; 90 | } 91 | 92 | public void setOrderNo( String orderNo ) { 93 | this.orderNo = orderNo; 94 | } 95 | 96 | public String getOpenId() { 97 | return openId; 98 | } 99 | 100 | public void setOpenId( String openId ) { 101 | this.openId = openId; 102 | } 103 | 104 | public Boolean getCheckName() { 105 | return checkName; 106 | } 107 | 108 | public void setCheckName( Boolean checkName ) { 109 | this.checkName = checkName; 110 | } 111 | 112 | public String getUserName() { 113 | return userName; 114 | } 115 | 116 | public void setUserName( String userName ) { 117 | this.userName = userName; 118 | } 119 | 120 | public BigDecimal getAmount() { 121 | return amount; 122 | } 123 | 124 | public void setAmount( BigDecimal amount ) { 125 | this.amount = amount; 126 | } 127 | 128 | public String getDesc() { 129 | return desc; 130 | } 131 | 132 | public void setDesc( String desc ) { 133 | this.desc = desc; 134 | } 135 | 136 | public String getIp() { 137 | return ip; 138 | } 139 | 140 | public void setIp( String ip ) { 141 | this.ip = ip; 142 | } 143 | 144 | public String getApiKey() { 145 | return apiKey; 146 | } 147 | 148 | public void setApiKey( String apiKey ) { 149 | this.apiKey = apiKey; 150 | } 151 | 152 | public String getWeixinHost() { 153 | return weixinHost; 154 | } 155 | 156 | public void setWeixinHost( String weixinHost ) { 157 | this.weixinHost = weixinHost; 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /fastpay-simple-admin/src/main/java/com/fastpay/admin/entity/AdminMenuEntity.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.admin.entity; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * 菜单管理 7 | */ 8 | public class AdminMenuEntity { 9 | /** 10 | * 主键 11 | */ 12 | private Integer id; 13 | 14 | /** 15 | * 菜单编号 16 | */ 17 | private String menuNo; 18 | 19 | /** 20 | * 流水号 21 | */ 22 | private String title; 23 | 24 | /** 25 | * 处理号 26 | */ 27 | private String caption; 28 | 29 | /** 30 | * 原始订单流水 31 | */ 32 | private String icon; 33 | 34 | /** 35 | * 微信商户号 36 | */ 37 | private String link; 38 | 39 | /** 40 | * 退款状态 41 | */ 42 | private String status; 43 | 44 | /** 45 | * 退款入账账户 46 | */ 47 | private String refundRecvAccout; 48 | 49 | /** 50 | * 创建时间 51 | */ 52 | private Date dateCreated; 53 | 54 | /** 55 | * 创建人 56 | */ 57 | private String createdBy; 58 | 59 | /** 60 | * 修改时间 61 | */ 62 | private Date dateUpdated; 63 | 64 | /** 65 | * 修改人 66 | */ 67 | private String updatedBy; 68 | 69 | public Integer getId() { 70 | return id; 71 | } 72 | 73 | public void setId( Integer id ) { 74 | this.id = id; 75 | } 76 | 77 | public String getMenuNo() { 78 | return menuNo; 79 | } 80 | 81 | public void setMenuNo( String menuNo ) { 82 | this.menuNo = menuNo; 83 | } 84 | 85 | public String getTitle() { 86 | return title; 87 | } 88 | 89 | public void setTitle( String title ) { 90 | this.title = title; 91 | } 92 | 93 | public String getCaption() { 94 | return caption; 95 | } 96 | 97 | public void setCaption( String caption ) { 98 | this.caption = caption; 99 | } 100 | 101 | public String getIcon() { 102 | return icon; 103 | } 104 | 105 | public void setIcon( String icon ) { 106 | this.icon = icon; 107 | } 108 | 109 | public String getLink() { 110 | return link; 111 | } 112 | 113 | public void setLink( String link ) { 114 | this.link = link; 115 | } 116 | 117 | public String getStatus() { 118 | return status; 119 | } 120 | 121 | public void setStatus( String status ) { 122 | this.status = status; 123 | } 124 | 125 | public String getRefundRecvAccout() { 126 | return refundRecvAccout; 127 | } 128 | 129 | public void setRefundRecvAccout( String refundRecvAccout ) { 130 | this.refundRecvAccout = refundRecvAccout; 131 | } 132 | 133 | public Date getDateCreated() { 134 | return dateCreated; 135 | } 136 | 137 | public void setDateCreated( Date dateCreated ) { 138 | this.dateCreated = dateCreated; 139 | } 140 | 141 | public String getCreatedBy() { 142 | return createdBy; 143 | } 144 | 145 | public void setCreatedBy( String createdBy ) { 146 | this.createdBy = createdBy; 147 | } 148 | 149 | public Date getDateUpdated() { 150 | return dateUpdated; 151 | } 152 | 153 | public void setDateUpdated( Date dateUpdated ) { 154 | this.dateUpdated = dateUpdated; 155 | } 156 | 157 | public String getUpdatedBy() { 158 | return updatedBy; 159 | } 160 | 161 | public void setUpdatedBy( String updatedBy ) { 162 | this.updatedBy = updatedBy; 163 | } 164 | } -------------------------------------------------------------------------------- /fastpay-simple-api/src/main/java/com/fastpay/wechat/domain/WechatTransferInput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.domain; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class WechatTransferInput { 6 | 7 | /** 8 | * 业务流水号 9 | */ 10 | private String requestNo; 11 | 12 | /** 13 | * 商户号 14 | */ 15 | private String memberNo; 16 | 17 | /** 18 | * appId 19 | */ 20 | private String appId; 21 | 22 | /** 23 | * openId 24 | */ 25 | private String openId; 26 | 27 | /** 28 | * 设备号 29 | */ 30 | private String deviceInfo; 31 | 32 | /** 33 | * 是否校验用户姓名 34 | */ 35 | private Boolean checkName; 36 | 37 | /** 38 | * 用户姓名 39 | */ 40 | private String userName; 41 | 42 | /** 43 | * 付款金额 44 | */ 45 | private BigDecimal amount; 46 | 47 | /** 48 | * 付款备注 49 | */ 50 | private String desc; 51 | 52 | /** 53 | * ip地址 54 | */ 55 | private String ip; 56 | 57 | /** 58 | * 通知类型 59 | */ 60 | private String notifyType; 61 | 62 | /** 63 | * 通知地址 64 | */ 65 | private String notifyValue; 66 | 67 | public String getRequestNo() { 68 | return requestNo; 69 | } 70 | 71 | public void setRequestNo( String requestNo ) { 72 | this.requestNo = requestNo; 73 | } 74 | 75 | public String getMemberNo() { 76 | return memberNo; 77 | } 78 | 79 | public void setMemberNo( String memberNo ) { 80 | this.memberNo = memberNo; 81 | } 82 | 83 | public String getAppId() { 84 | return appId; 85 | } 86 | 87 | public void setAppId( String appId ) { 88 | this.appId = appId; 89 | } 90 | 91 | public String getOpenId() { 92 | return openId; 93 | } 94 | 95 | public void setOpenId( String openId ) { 96 | this.openId = openId; 97 | } 98 | 99 | public String getDeviceInfo() { 100 | return deviceInfo; 101 | } 102 | 103 | public void setDeviceInfo( String deviceInfo ) { 104 | this.deviceInfo = deviceInfo; 105 | } 106 | 107 | public Boolean getCheckName() { 108 | return checkName; 109 | } 110 | 111 | public void setCheckName( Boolean checkName ) { 112 | this.checkName = checkName; 113 | } 114 | 115 | public String getUserName() { 116 | return userName; 117 | } 118 | 119 | public void setUserName( String userName ) { 120 | this.userName = userName; 121 | } 122 | 123 | public BigDecimal getAmount() { 124 | return amount; 125 | } 126 | 127 | public void setAmount( BigDecimal amount ) { 128 | this.amount = amount; 129 | } 130 | 131 | public String getDesc() { 132 | return desc; 133 | } 134 | 135 | public void setDesc( String desc ) { 136 | this.desc = desc; 137 | } 138 | 139 | public String getIp() { 140 | return ip; 141 | } 142 | 143 | public void setIp( String ip ) { 144 | this.ip = ip; 145 | } 146 | 147 | public String getNotifyType() { 148 | return notifyType; 149 | } 150 | 151 | public void setNotifyType( String notifyType ) { 152 | this.notifyType = notifyType; 153 | } 154 | 155 | public String getNotifyValue() { 156 | return notifyValue; 157 | } 158 | 159 | public void setNotifyValue( String notifyValue ) { 160 | this.notifyValue = notifyValue; 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /fastpay-simple-admin/template/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy 3 | // This option interrupts the configuration hierarchy at this file 4 | // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos) 5 | root: true, 6 | 7 | // https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser 8 | // Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working 9 | // `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted 10 | parserOptions: { 11 | parser: require.resolve('@typescript-eslint/parser'), 12 | extraFileExtensions: ['.vue'] 13 | }, 14 | 15 | env: { 16 | browser: true, 17 | es2021: true, 18 | node: true, 19 | 'vue/setup-compiler-macros': true 20 | }, 21 | 22 | // Rules order is important, please avoid shuffling them 23 | extends: [ 24 | // Base ESLint recommended rules 25 | // 'eslint:recommended', 26 | 27 | // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage 28 | // ESLint typescript rules 29 | 'plugin:@typescript-eslint/recommended', 30 | 31 | // Uncomment any of the lines below to choose desired strictness, 32 | // but leave only one uncommented! 33 | // See https://eslint.vuejs.org/rules/#available-rules 34 | 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention) 35 | // 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) 36 | // 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead) 37 | 38 | // https://github.com/prettier/eslint-config-prettier#installation 39 | // usage with Prettier, provided by 'eslint-config-prettier'. 40 | 'prettier' 41 | ], 42 | 43 | plugins: [ 44 | // required to apply rules which need type information 45 | '@typescript-eslint', 46 | 47 | // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files 48 | // required to lint *.vue files 49 | 'vue' 50 | 51 | // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674 52 | // Prettier has not been included as plugin to avoid performance impact 53 | // add it as an extension for your IDE 54 | 55 | ], 56 | 57 | globals: { 58 | ga: 'readonly', // Google Analytics 59 | cordova: 'readonly', 60 | __statics: 'readonly', 61 | __QUASAR_SSR__: 'readonly', 62 | __QUASAR_SSR_SERVER__: 'readonly', 63 | __QUASAR_SSR_CLIENT__: 'readonly', 64 | __QUASAR_SSR_PWA__: 'readonly', 65 | process: 'readonly', 66 | Capacitor: 'readonly', 67 | chrome: 'readonly' 68 | }, 69 | 70 | // add your custom rules here 71 | rules: { 72 | 73 | 'prefer-promise-reject-errors': 'off', 74 | 75 | quotes: ['warn', 'single', {avoidEscape: true}], 76 | 77 | // this rule, if on, would require explicit return type on the `render` function 78 | '@typescript-eslint/explicit-function-return-type': 'off', 79 | 80 | // in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled 81 | '@typescript-eslint/no-var-requires': 'off', 82 | 83 | // The core 'no-unused-vars' rules (in the eslint:recommended ruleset) 84 | // does not work with type definitions 85 | 'no-unused-vars': 'off', 86 | 87 | // allow debugger during development only 88 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatTransfersGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatTransfersGateOutput { 4 | 5 | /** 6 | * 返回状态码 7 | */ 8 | private String returnCode; 9 | 10 | /** 11 | * 返回信息 12 | */ 13 | private String returnMsg; 14 | 15 | /** 16 | * 商户appid 17 | */ 18 | private String mchAppid; 19 | 20 | /** 21 | * 商户号 22 | */ 23 | private String mchid; 24 | 25 | /** 26 | * 设备号 27 | */ 28 | private String deviceInfo; 29 | 30 | /** 31 | * 随机字符串 32 | */ 33 | private String nonceStr; 34 | 35 | /** 36 | * 业务结果 37 | */ 38 | private String resultCode; 39 | 40 | /** 41 | * 错误代码 42 | */ 43 | private String errCode; 44 | 45 | /** 46 | * 错误代码描述 47 | */ 48 | private String errCodeDes; 49 | 50 | /** 51 | * 商户订单号 52 | */ 53 | private String partnerTradeNo; 54 | 55 | /** 56 | * 微信付款单号 57 | */ 58 | private String paymentNo; 59 | 60 | /** 61 | * 付款成功时间 62 | */ 63 | private String paymentTime; 64 | 65 | public String getReturnCode() { 66 | return returnCode; 67 | } 68 | 69 | public void setReturnCode( String returnCode ) { 70 | this.returnCode = returnCode; 71 | } 72 | 73 | public String getReturnMsg() { 74 | return returnMsg; 75 | } 76 | 77 | public void setReturnMsg( String returnMsg ) { 78 | this.returnMsg = returnMsg; 79 | } 80 | 81 | public String getMchAppid() { 82 | return mchAppid; 83 | } 84 | 85 | public void setMchAppid( String mchAppid ) { 86 | this.mchAppid = mchAppid; 87 | } 88 | 89 | public String getMchid() { 90 | return mchid; 91 | } 92 | 93 | public void setMchid( String mchid ) { 94 | this.mchid = mchid; 95 | } 96 | 97 | public String getDeviceInfo() { 98 | return deviceInfo; 99 | } 100 | 101 | public void setDeviceInfo( String deviceInfo ) { 102 | this.deviceInfo = deviceInfo; 103 | } 104 | 105 | public String getNonceStr() { 106 | return nonceStr; 107 | } 108 | 109 | public void setNonceStr( String nonceStr ) { 110 | this.nonceStr = nonceStr; 111 | } 112 | 113 | public String getResultCode() { 114 | return resultCode; 115 | } 116 | 117 | public void setResultCode( String resultCode ) { 118 | this.resultCode = resultCode; 119 | } 120 | 121 | public String getErrCode() { 122 | return errCode; 123 | } 124 | 125 | public void setErrCode( String errCode ) { 126 | this.errCode = errCode; 127 | } 128 | 129 | public String getErrCodeDes() { 130 | return errCodeDes; 131 | } 132 | 133 | public void setErrCodeDes( String errCodeDes ) { 134 | this.errCodeDes = errCodeDes; 135 | } 136 | 137 | public String getPartnerTradeNo() { 138 | return partnerTradeNo; 139 | } 140 | 141 | public void setPartnerTradeNo( String partnerTradeNo ) { 142 | this.partnerTradeNo = partnerTradeNo; 143 | } 144 | 145 | public String getPaymentNo() { 146 | return paymentNo; 147 | } 148 | 149 | public void setPaymentNo( String paymentNo ) { 150 | this.paymentNo = paymentNo; 151 | } 152 | 153 | public String getPaymentTime() { 154 | return paymentTime; 155 | } 156 | 157 | public void setPaymentTime( String paymentTime ) { 158 | this.paymentTime = paymentTime; 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /fastpay-simple-app/src/main/java/com/fastpay/wechat/gate/domain/WechatPayOrderQueryGateOutput.java: -------------------------------------------------------------------------------- 1 | package com.fastpay.wechat.gate.domain; 2 | 3 | public class WechatPayOrderQueryGateOutput { 4 | 5 | /** 6 | * 返回状态码 7 | */ 8 | private String returnCode; 9 | 10 | /** 11 | * 返回信息 12 | */ 13 | private String returnMsg; 14 | 15 | /** 16 | * 返回码 17 | */ 18 | private String resultCode; 19 | 20 | /** 21 | * 错误码 22 | */ 23 | private String errCode; 24 | 25 | /** 26 | * 错误码描述 27 | */ 28 | private String errCodeDes; 29 | 30 | /** 31 | * 微信订单号 32 | */ 33 | private String transactionId; 34 | 35 | /** 36 | * 商户订单号 37 | */ 38 | private String outTradeNo; 39 | 40 | /** 41 | * 订单状态 42 | */ 43 | private String tradeState; 44 | 45 | /** 46 | * 交易状态描述 47 | */ 48 | private String tradeStateDesc; 49 | 50 | /** 51 | * 订单结束时间 52 | */ 53 | private String timeEnd; 54 | 55 | /** 56 | * 付款银行 57 | */ 58 | private String BankType; 59 | 60 | /** 61 | * 用户标识 62 | */ 63 | private String openId; 64 | 65 | public String getReturnCode() { 66 | return returnCode; 67 | } 68 | 69 | public void setReturnCode( String returnCode ) { 70 | this.returnCode = returnCode; 71 | } 72 | 73 | public String getReturnMsg() { 74 | return returnMsg; 75 | } 76 | 77 | public void setReturnMsg( String returnMsg ) { 78 | this.returnMsg = returnMsg; 79 | } 80 | 81 | public String getResultCode() { 82 | return resultCode; 83 | } 84 | 85 | public void setResultCode( String resultCode ) { 86 | this.resultCode = resultCode; 87 | } 88 | 89 | public String getErrCode() { 90 | return errCode; 91 | } 92 | 93 | public void setErrCode( String errCode ) { 94 | this.errCode = errCode; 95 | } 96 | 97 | public String getErrCodeDes() { 98 | return errCodeDes; 99 | } 100 | 101 | public void setErrCodeDes( String errCodeDes ) { 102 | this.errCodeDes = errCodeDes; 103 | } 104 | 105 | public String getTransactionId() { 106 | return transactionId; 107 | } 108 | 109 | public void setTransactionId( String transactionId ) { 110 | this.transactionId = transactionId; 111 | } 112 | 113 | public String getOutTradeNo() { 114 | return outTradeNo; 115 | } 116 | 117 | public void setOutTradeNo( String outTradeNo ) { 118 | this.outTradeNo = outTradeNo; 119 | } 120 | 121 | public String getTradeState() { 122 | return tradeState; 123 | } 124 | 125 | public void setTradeState( String tradeState ) { 126 | this.tradeState = tradeState; 127 | } 128 | 129 | public String getTradeStateDesc() { 130 | return tradeStateDesc; 131 | } 132 | 133 | public void setTradeStateDesc( String tradeStateDesc ) { 134 | this.tradeStateDesc = tradeStateDesc; 135 | } 136 | 137 | public String getTimeEnd() { 138 | return timeEnd; 139 | } 140 | 141 | public void setTimeEnd( String timeEnd ) { 142 | this.timeEnd = timeEnd; 143 | } 144 | 145 | public String getBankType() { 146 | return BankType; 147 | } 148 | 149 | public void setBankType( String bankType ) { 150 | BankType = bankType; 151 | } 152 | 153 | public String getOpenId() { 154 | return openId; 155 | } 156 | 157 | public void setOpenId( String openId ) { 158 | this.openId = openId; 159 | } 160 | } 161 | --------------------------------------------------------------------------------