If you would like to use the Lema widget as a pure payment module, it is possible to disable or hide most of the included features and reduce it to the very basics.
This HowTo shows you how to disable everything apart from the payment block while keeping the functionality of features within the RaiseNow Manager application and the ability to connect to CRM systems and email marketing applications using custom Javascript on your website.
First start with disabling all steps in a standard Lema that you would not like to be presented to the user:
<script type="text/javascript">
window.rnwWidget = window.rnwWidget || {};
window.rnwWidget.configureWidget = window.rnwWidget.configureWidget || [];
window.rnwWidget.configureWidget.push(function(options) {
options.widget.on('rnw-widget-loaded', function(event) {
event.widget.hideStep('donation-target');
event.widget.hideStep('amount');
event.widget.hideBlock('recurring_interval_selector');
event.widget.hideStep('customer-identity');
});
});
</script>
Note that for some payment methods, asking for specific data is mandatory.
If you want to accept Credit Card payments, you are required to ask for the customer's identity. The step customer-identity will therefore automatically show when Credit Cards is selected as a payment method. If you accept SMS payments, the widget will automatically ask for a mobile number.
Then begin filling the information you need to identify the order, customer or campaign into the widget using default values:
<script type="text/javascript">
window.rnwWidget = window.rnwWidget || {};
window.rnwWidget.configureWidget = window.rnwWidget.configureWidget || [];
window.rnwWidget.configureWidget.push(function(options) {
options.defaults['stored_campaign_id'] = '1234';
options.defaults['stored_campaign_subid'] = '1234';
// you can set most fields you find in RaiseNow Manager. Some should be filled to avoid adaptations in other places.
options.defaults['stored_rnw_purpose_text'] = 'My human-readable purpose'; // this will show in confirmation emails and on payment-slips
// everything you index with 'stored_' will be available in RaiseNow Manager as transaction-data and webhooks.
// We allow 500 characters (note that there might be encoding-overhead) per field and up to 40 custom fields.
// However - please be advised that this should not be your primary data-store. You should only include the data you need here.
options.defaults['stored_mycustomidentifyer'] = '123e4567-e89b-12d3-a456-426655440000';
options.defaults['stored_mycustomdata'] = '{"name": {"first" : "Foo", "last": "Bar"}}}';
});
</script>
In the picture below you can see an example of our Lema widget only used for the payment checkout.
If you have any questions, please do not hesitate to contact us at support@raisenow.com
Tip! We are explaining how to set custom parameters here.
Comments
0 comments
Please sign in to leave a comment.