Answer the question
In order to leave comments, you need to log in
How to accept and process XML from PrivatBank in Drupal 7?
Hello!
Can you tell me how difficult to create a Drupal 7 module I am describing?
There is an "Invoice" node, it has the following fields:
- field_payment_id
- field_payment_price
- field_payment_status
Based on these data, payment is generated in Privat24 by the form
<form method="POST" action="https://api.privatbank.ua/p24api/ishop">
<input type="hidden" name="amt" value="<?php echo $field_payment_price ?>" />
<input type="hidden" name="ccy" value="UAH" />
<input type="hidden" name="merchant" value="12345" />
<input type="hidden" name="order" value="<?php echo $field_payment_id ?>" />
<input type="hidden" name="details" value="Детали платежя" />
<input type="hidden" name="ext_details" value="Описание" />
<input type="hidden" name="pay_way" value="privat24" />
<input type="hidden" name="return_url" value="http://..." />
<input type="hidden" name="server_url" value="http://..." />
<button formtarget="_blank" class="privat" type="submit"></button>
</form>
<?xml version="1.0" encoding="UTF-8"?>
<request version="1.0">
<merchant>
<id>12345</id>
<signature>d66d192cb123456788e08cfe1ca171535</signature>
</merchant>
<data>
<oper>cmt</oper>
<wait>0</wait>
<test>0</test>
<payment>
<prop name="id" value="1234567" />
<prop name="ref" value="P24A02509023364489" />
</payment>
</data>
</request>
<?xml version="1.0" encoding="UTF-8"?>
<response version="1.0">
<merchant>
<id>12345</id>
<signature>37aad972d7461234567893802230be38</signature>
</merchant>
<data>
<oper>cmt</oper>
<payment id="1234567" status="ok" message="Исполнен" ref="P24A02509023364480" />
</data>
</response>
Answer the question
In order to leave comments, you need to log in
Thank you. Yes, I have already shoveled and picked it more than once. But so far no results. I'll try again. Thank you.
Question Resolved!
I think you need to find any payment and take it as a basis.
here it seems to be ready for Drupal
https://www.drupal.org/node/729116
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question