mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 02:58:11 +00:00
feat: (payment) add telebirr mini-app in-app payment flow
This commit is contained in:
@@ -56,7 +56,7 @@ class WaiveSupplementaryChargeDto {
|
||||
|
||||
class PaySupplementaryChargeDto {
|
||||
@ApiProperty({ enum: PaymentMethodTypeEnum, example: 'TELEBIRR' }) @IsEnum(PaymentMethodTypeEnum) method: PaymentMethodTypeEnum;
|
||||
@ApiPropertyOptional({ enum: ['web', 'mobile'], default: 'web' }) @IsOptional() @IsIn(['web', 'mobile']) platform?: 'web' | 'mobile';
|
||||
@ApiPropertyOptional({ enum: ['web', 'mobile', 'inapp'], default: 'web' }) @IsOptional() @IsIn(['web', 'mobile', 'inapp']) platform?: PaymentPlatformDto;
|
||||
}
|
||||
|
||||
@ApiTags("Payment")
|
||||
@@ -307,7 +307,14 @@ export class PaymentsController {
|
||||
})
|
||||
@ApiQuery({ name: "bookingId", required: true })
|
||||
@ApiQuery({ name: "method", enum: PaymentMethodTypeEnum, required: true })
|
||||
@ApiQuery({ name: "platform", enum: ["web", "mobile"], required: false })
|
||||
@ApiQuery({
|
||||
name: "platform",
|
||||
enum: ["web", "mobile"],
|
||||
required: false,
|
||||
description:
|
||||
"Browser-only endpoint — `inapp` is not offered here. A mini-app payer has no browser " +
|
||||
"to redirect and must go through POST /payments/initiate for the bridge payload.",
|
||||
})
|
||||
@ApiProduces("text/html")
|
||||
async checkout(
|
||||
@Query("bookingId") bookingId: string,
|
||||
|
||||
Reference in New Issue
Block a user