function paymentFromComponent(data, component) {
  $.ajax({
    url: window.paymentFromComponentUrl,
    type: 'post',
    data: JSON.stringify(data),
    contentType: 'application/; charset=utf-8',
    success(data) {
      if (
        data.result &&
        data.result.fullResponse &&
        data.result.fullResponse.action
      ) {
        component.handleAction(data.result.fullResponse.action);
      } else {
        document.querySelector('#paypalStateData').value = JSON.stringify(
          'null',
        );
        $('#dwfrm_billing').trigger('submit');
      }
    },
  }).fail((/* xhr, textStatus */) => {});
}
/**
 * Makes an ajax call to the controller function PaymentFromComponent.
 * Used by certain payment methods like paypal
 */
Makes an ajax call to the controller function PaymentFromComponent.
Used by certain payment methods like paypal
Makes an ajax call to the controller function PaymentFromComponent . Used by certain payment methods like paypal
function paymentFromComponent(data, component) {
  $.ajax({
    url: window.paymentFromComponentUrl,
    type: 'post',
    data: JSON.stringify(data),
    contentType: 'application/; charset=utf-8',
    success(data) {
      if (
        data.result &&
        data.result.fullResponse &&
        data.result.fullResponse.action
      ) {
        component.handleAction(data.result.fullResponse.action);
      } else {
        document.querySelector('#paypalStateData').value = JSON.stringify(
          'null',
        );
        $('#dwfrm_billing').trigger('submit');
      }
    },
  }).fail(() => {});
}
function paymentFromComponent ( data , component ) { $ . ajax ( { url : window . paymentFromComponentUrl , type : 'post' , data : JSON . stringify ( data ) , contentType : 'application/; charset=utf-8' , success ( data ) { if ( data . result && data . result . fullResponse && data . result . fullResponse . action ) { component . handleAction ( data . result . fullResponse . action ) ; } else { document . querySelector ( '#paypalStateData' ) . value = JSON . stringify ( 'null' , ) ; $ ( '#dwfrm_billing' ) . trigger ( 'submit' ) ; } } , } ) . fail ( ( ) => { } ) ; }
Makes an ajax call to the controller function PaymentFromComponent.
Makes an ajax call to the controller function PaymentFromComponent .
/* xhr, textStatus */