Open extra topbar

Modifying the fiat withdrawal form

I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Modifying the fiat withdrawal form

dashed-slug.net Forums Fiat Coin Adapter extension support Modifying the fiat withdrawal form

  • This topic has 6 replies, 2 voices, and was last updated 1 month ago by Plug.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10907
    Plug
    Participant

    Sir, I wish to have only the amount input side of the Withdrawal form authenticated while having having the banking account numbers details unauthenticated so that I can have a custom input for users for withdrawal. I attached images showing this here.

    Eg., Swift/IBAN can be selected to match any custom input the boxes by users. It could be Account Number only, then a country section. The second and third radio button could match any other input I wish to have, like any international money transfer app and the user just have to indicate his username/ID of such app to receive funds. I.e Radio button for Routing could be replaced with Barter by Flutterwave then the corresponding input box can allow the user input his user ID for such app, just as I tried doing with Paypal but the Js scripts ain’t my thing and I couldn’t mess up with it well. Help me with any custom edit to this. Those authentication is not giving me and the users flexibility on bank account details. SEE IMAGES ATTACHED.

    Attachments:
    You must be logged in to view attached files.
    #10910
    Plug
    Participant

    Can anybody hear me pleaseeeee?

    #10912
    alexg
    Keymaster

    Hello,

    You are right, I am aware that currently it is not possible to edit the fields in the [wallets_fiat_withdraw] shortcode without modifying the plugin code.

    I have provided support for the most common banking systems, but it’s not possible for me to add such features for every possible payment system.

    Furthermore, I am not currently accepting any new feature requests before the wallets6 release.

    Having said this; with wallets6, the UI markups are encapsulated together with their JS and CSS code, so that all the code will be easily overridable via the templating system. Furthermore, the fiat coin adapter is being deprecated as a separate adapter, and will be merged into the parent plugin as “Fiat Bank Wallet adapter”.

    Once wallets6 is released, I can provide you with instructions on how to modify the template.

    with regards

    P.S. I have moved this thread into the Fiat coin adapter forum.

    #10916
    Plug
    Participant

    Oh. I understand. Can you just point to the the js file bearing the right authentications so that I can disable them and change the banking details texts myself please. It’s not a feature request but rather I just need to stop the authentication of the parts I showed in the attachments and have whatever user inputs sent across to my mail box than waiting for the authentication which most of them can’t really understand and it’s time consuming disturbing me through contact forms.

    #10917
    Plug
    Participant

    Just look at that pix I just attached now. If u can point at what JS scripts to stop the validation, I will be glad. I can change the texts. Just look at this last image please. Next time, I will post it in the right place coz I thought here is general discussion.

    Attachments:
    You must be logged in to view attached files.
    #10920
    alexg
    Keymaster

    Hello,

    OK I understand. Here’s how you can hack the code to do this:

    1. Before changing the plugin code, read and understand the FAQ section “I want to do changes to the plugin’s code.”.

    2. To change the validation code, check out the file: wp-content/plugins/wallets-fiat/assets/scripts/wallets-fiat.js. You want to remove the validation extenders.

    For example, where you see:

    self.fiatWithdrawRoutingNum       = ko.observable( '' ).extend( {
    	validation: [
    		{
    			validator: function( val ) {
    				if ( 'undefined' == typeof( val ) ) {
    					// do not show error while initializing the form
    					return true;
    				}
    				if ( self.fiatWithdrawMethod() != 'routing' ) {
    					// do not validate this field if not used
    					return true;
    				}
    				return val.match( /^\s*\d{9}\s*$/ );
    			},
    			message: wallets_fiat_i18n.routingnum_invalid
    		}
    	]
    } );
    

    The above would become:

    self.fiatWithdrawRoutingNum = ko.observable( '' );

    Ensure that you remove the .extend() parts only, from all observables.

    If you edit the JS file, you must also remove the minified version of the file (wallets-fiat-0.6.3-beta.min.js), so that the plugin will choose to load the unminified version. Alternatively, you can minify the edited version yourself.

    3. The withdraw template is in wp-content/plugins/wallets-fiat/templates/withdraw.php. You can edit the file yourself, or copy it, or better yet, you can modify the labels using the provided filters, like so:

    add_filter(
        'wallets_fiat_ui_text_iban',
        function( $label ) {
            return 'YOUR OWN LABEL TEXT GOES HERE';
        }
    );

    I think that’s it. Just keep in mind that all of this will soon change and become much easier.

    with regards

    #10922
    Plug
    Participant

    Just what I wanted.
    God bless you sooo much
    .

    More fruitful and happy coding as we wait for the new journey into Wallet6. *Smiles 😊

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.