Answer the question
In order to leave comments, you need to log in
How to automate payments using Yandex Money API and Python?
I'm trying to make a payment from wallet to wallet and to phone in my application.
def wallet_payments(access_token, ym_account, total, api):
wallet = Wallet(access_token)
request_options = {
"pattern_id": "p2p",
"to": ym_account,
"amount_due": total,
"comment": "test payment comment from yandex-money-python",
"message": "test payment message from yandex-money-python",
"label": "testPayment",
"test_payment": True,
"test_result": "success"
}
request_result = api.request(request_options)
process_payment = api.process({
"request_id": request_result['request_id'],
"money_source": "wallet",
"ext_auth_success_uri": "http://www.omirussia.ru/",
"ext_auth_fail_uri": "https://money.yandex.ru/actions",
#"test_payment": True
})
return process_payment['status']
money_source
"money_source": request_result['money_source']
'money_source': {'payment-card': {}}
ext_auth_required
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question