I
I
Ivan Ivanovich2019-12-21 19:00:29
PHP
Ivan Ivanovich, 2019-12-21 19:00:29

Where is the error when working with api?

Hello.
I'm trying to do automatic billing on qiwi.
Before the form in html did:

<?php
$publicKey = '...';
$amount = (int)$info['price'];

$link = 'https://oplata.qiwi.com/create?publicKey='.$publicKey.'&amount='.$amount.'';
?>

Further form
<form class="form" action="<?php echo $link; ?>" method="POST">
     <input class="email" type="email" name="email" placeholder="Email адрес">
     <input class="button-inp" type="submit" name="submit" value="Далее">
     </form>

I have not yet taken into account the email address in the form.
After sending the data, a link like
https://oplata.qiwi.com/create?publicKey=...&amount=599
and a 405 error message opens.
BUT if I click on this link in the address bar, it will be highlighted and I will press enter, then the normal form will open, which should be.
I don't understand why it doesn't open right away?
Please tell me how to fix this.
api - https://developer.qiwi.com/ru/bill-payments/?php#http
PS If I make the form a GET method and input fields with hidden, then everything will work fine.
5dfe4139e2cd1114608445.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arthur, 2019-12-22
@IwanQ

The form sends a post request, but you can only get

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question