N
N
Nikolai Neizvestny2020-05-05 15:13:05
Python
Nikolai Neizvestny, 2020-05-05 15:13:05

Reading pdf without downloading and how to convert an EasyPay receipt into a dictionary?

EasyPay on the site by transaction ID gives information only about the status of the payment, I need the amount and
how to read the pdf without downloading and pull out the information I need?
This is how it gives out for downloading pdf https://partners.easypay.ua/order/downloadreceiptp...
where 999999999 is the transaction id,
here is the beginning with checking by id, how to continue?

import requests
base_url = 'https://partners.easypay.ua/main/GetTransactionStatus'
data = {'inputData': '999999999'}
ans = requests.post(base_url, data).json()
if ans.get ('receiptStatus') == 'Принят':
    print ("Done")
else:
    print ("Non pay")

Here is the output of the information
{'receiptStatus': 'Accepted', 'receiptContent': 'RECEIPT# 18219-1056-74019534
----------------------- -------
(Operation ID): 766326823
Date: 11/19/2019 03:31
Payment status: Accepted
------------------------- -----------
Phone call: 0-800-60-30-03
Free call at the borders of Ukraine
--------------------- ---------------
Damn, they robbed us!'}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Satisfied IT, 2020-05-05
@NHide

They have api, there are usually necessary functions
https://api.easypay.ua/docs/index
5eb1ae248e871271014721.jpeg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question