Skip to content
Snippets Groups Projects
Verified Commit 407c0b3d authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Info o platbe

parent 6a5767e4
No related branches found
No related tags found
No related merge requests found
Pipeline #12418 passed
......@@ -2,7 +2,7 @@ image: docker:20.10.9
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_VER: 0.16.0
IMAGE_VER: 0.17.0
services:
- docker:20.10.9-dind
......
......@@ -234,6 +234,31 @@ sub get ($c ) {
);
}
sub payment ($c ) {
my $order;
if ( $c->stash->{id} =~ /\D/) {
$order = $c->schema->resultset('Order')->search({
order_id => {ilike => $c->stash->{id}},
deleted => undef,
})->first;
}
else {
$order = $c->schema->resultset('Order')->find({
id => $c->stash->{id},
deleted => undef,
});
}
return $c->error(404, 'NOT FOUND') if ! $order;
my $pr = $c->_payment_request($order);
$c->render(
status => 200,
json => $pr,
);
}
sub qr ($c) {
my $order;
......
......@@ -210,3 +210,25 @@ paths:
application/json:
schema:
type: object
/orders/{id}/payment/:
get:
x-mojo-to: orders#payment
tags:
- order
summary: "Info o platbe"
operationId: getOrderPayment
parameters:
- name: "id"
in: path
required: true
description: "ID nebo Pretix ID"
schema:
type: string
responses:
200:
description: Informace o platbe
content:
application/json:
schema:
type: object
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment