html or php
-
How to make html or php code work in the field of alternative payments?
-
I am not sure what are you trying to do, can you explain it more clearly?
The HTML code should work out-of-box, the PHP code you cannot use inside the textarea for security reasons.
https://ibb.co/jb5fF9
https://ibb.co/gXry2pwhen we enter data for a bank transfer click on the button “place an order”, then the text appears, it must insert the code of the payment button from the service Webmoney
Sample code:
<form method=”POST” action=”https://merchant.webmoney.ru/lmi/payment_utf.asp” accept-charset=”utf-8″>
<input type=”hidden” name=”LMI_PAYMENT_AMOUNT” value=”12.08″>
<input type=”hidden” name=”LMI_PAYMENT_DESC” value=”платеж по счету”>
<input type=”hidden” name=”LMI_PAYMENT_NO” value=”1234″>
<input type=”hidden” name=”LMI_PAYEE_PURSE” value=”121233″>
<input type=”hidden” name=”LMI_SIM_MODE” value=”0″>
<input type=”hidden” name=”FIELD_1″ value=”VALUE_1″>
<input type=”hidden” name=”FIELD_2″ value=”VALUE_2″>
…
<input type=”hidden” name=”FIELD_N” value=”VALUE_N”>
…
</form>this code does not work, only on the wordpress page itself, and the service button is necessary after clicking on the “place an order” button, please help
I suppose you want the button to be shown on this page https://ibb.co/gXry2p? If so then it seems to be working fine for me, except the code you pasted for the payment button has only a form and a couple of hidden fields, so there is nothing to display for the user, try adding inside the form some submit button like
<input type="submit" value="Pay now" />where should I insert this code? in the text field this code does not work, because you have a form on java scripts how i can understand.
It is necessary that the button along with the text appears in your form. In the normal part of the page, the button works.
Ohh i see what the problem is now, you would need to add the code below in your theme functions.php file
add_action( "adverts_form_load", "form_bank_transfer_config" ); function form_bank_transfer_config( $form ) { if( adverts_request( "page" ) != "adverts-extensions" || adverts_request( "module" ) != "bank-transfer" ) { return $form; } foreach( $form["field"] as $key => $field ) { if( $field["name"] == "custom_text" ) { $form["field"][$key]["mode"] = "tinymce-full"; } } return $form; }It will enable full tinyMCE editor for the custom text field, you will then be able to paste HTML for your form.
i love you and your plugin <3
The topic ‘html or php’ is closed to new replies.