Autopayment widget - transfer of custom parameters (order number or personal data)

Created: 2021-08-05
Last updated: 2021-08-05

Post view count: 642

When inserting an autopayment widget, you can pass your own data to it. You can, for example, insert the data of the user who makes the payment so that they don’t have to fill in the data on their own (of course, if you have such data in your own system), you can also pass an order number, a unique user ID, etc.

An example of how such a widget should look is available at the preview of any product that has Autopayments enabled. To see it, go to Products> Product preview> Edit> Online Sales> Online sales checkbox> Code to insert on your page

You can insert additional data into your widget using Javascript code in the place where you insert the widget on your site:


<script type="text/javascript">$(function(){$.getJSON("https://app.fakturownia.pl/a/testAccount/p/rt92222ajHABk3vK0G5c.json?lang=pl&callback=?", function(data) { $('#f_c21').html(data.f1).fadeIn();
  $('#f_oid21').val('unikalne Order ID');
  $('#payment_first_name').val('this is example of insert custom value!')
  $('#payment_last_name').val('<?= $user_last_name ?>')
});})</script>

 

Create unlimited invoices and more with InvoiceOcean. Start your 30-day free trial.

Sign up free


Back


Add Comment