-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create ahamove request for momo processing (#83)
Co-authored-by: NHT <[email protected]>
- Loading branch information
1 parent
0de1d44
commit 5b43472
Showing
10 changed files
with
466 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/database/migrations/1710911376008-UpdateMomoTransactionTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class UpdateMomoTransactionTable1710911376008 | ||
implements MigrationInterface | ||
{ | ||
name = 'UpdateMomoTransactionTable1710911376008'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE \`MomoTransaction\` | ||
CHANGE COLUMN \`partnerCode\` \`partnerCode\` VARCHAR(50) NULL , | ||
CHANGE COLUMN \`requestId\` \`requestId\` VARCHAR(50) NULL , | ||
CHANGE COLUMN \`amount\` \`amount\` DECIMAL(10,2) NULL , | ||
CHANGE COLUMN \`orderId\` \`orderId\` VARCHAR(50) NULL , | ||
CHANGE COLUMN \`transId\` \`transId\` BIGINT NULL , | ||
CHANGE COLUMN \`responseTime\` \`responseTime\` BIGINT NULL , | ||
CHANGE COLUMN \`orderInfo\` \`orderInfo\` VARCHAR(255) NULL , | ||
CHANGE COLUMN \`type\` \`type\` VARCHAR(10) NULL , | ||
CHANGE COLUMN \`resultCode\` \`resultCode\` INT NULL , | ||
CHANGE COLUMN \`redirectUrl\` \`redirectUrl\` VARCHAR(255) NULL , | ||
CHANGE COLUMN \`ipnUrl\` \`ipnUrl\` VARCHAR(255) NULL , | ||
CHANGE COLUMN \`extraData\` \`extraData\` TEXT NULL , | ||
CHANGE COLUMN \`requestType\` \`requestType\` VARCHAR(50) NULL , | ||
CHANGE COLUMN \`signature\` \`signature\` VARCHAR(255) NULL , | ||
CHANGE COLUMN \`lang\` \`lang\` VARCHAR(2) NULL DEFAULT 'en' ; | ||
`, | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`DELETE FROM \`MomoTransaction\` where id > 0`); | ||
await queryRunner.query( | ||
`ALTER TABLE \`MomoTransaction\` | ||
CHANGE COLUMN \`partnerCode\` \`partnerCode\` VARCHAR(50) NOT NULL , | ||
CHANGE COLUMN \`requestId\` \`requestId\` VARCHAR(50) NOT NULL , | ||
CHANGE COLUMN \`amount\` \`amount\` DECIMAL(10,2) NOT NULL , | ||
CHANGE COLUMN \`orderId\` \`orderId\` VARCHAR(50) NOT NULL , | ||
CHANGE COLUMN \`transId\` \`transId\` BIGINT NOT NULL , | ||
CHANGE COLUMN \`responseTime\` \`responseTime\` BIGINT NOT NULL , | ||
CHANGE COLUMN \`orderInfo\` \`orderInfo\` VARCHAR(255) NOT NULL , | ||
CHANGE COLUMN \`type\` \`type\` VARCHAR(10) NOT NULL , | ||
CHANGE COLUMN \`resultCode\` \`resultCode\` INT NOT NULL , | ||
CHANGE COLUMN \`redirectUrl\` \`redirectUrl\` VARCHAR(255) NOT NULL , | ||
CHANGE COLUMN \`ipnUrl\` \`ipnUrl\` VARCHAR(255) NOT NULL , | ||
CHANGE COLUMN \`extraData\` \`extraData\` TEXT NOT NULL , | ||
CHANGE COLUMN \`requestType\` \`requestType\` VARCHAR(50) NOT NULL , | ||
CHANGE COLUMN \`signature\` \`signature\` VARCHAR(255) NOT NULL , | ||
CHANGE COLUMN \`lang\` \`lang\` VARCHAR(2) NOT NULL DEFAULT 'en' ; | ||
`, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export class CreateMomoPaymentRequest { | ||
invoiceId: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export class CreateMomoPaymentResponse { | ||
invoiceId: number; | ||
amount: number; | ||
payUrl: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.