I have successfully added new checkout form, following the instructions are given on:


When I submit the form i get the data in,

/*global define*/
], function(Component) {
    'use strict';
    return Component.extend({
        initialize: function () {
            // component initialization logic
            return this;

         * Form submit handler
         * This method can have any name.
        onSubmit: function() {
            // trigger form validation
            this.source.set('params.invalid', false);

            // verify that form data is valid
            if (!this.source.get('params.invalid')) {
                // data is retrieved from data provider by value of the customScope property
                var formData = this.source.get('customCheckoutForm');
                // do something with form data

Now I want to add this formData in checkout session so that I can insert my custom fields in DB when the user places the order. Where and How should I make the HTTP call?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.