ActionCollectPaymentSettings.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit;
  2. return apply_filters( 'ninja_forms_action_collect_payment_settings', array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Payment Gateways
  6. |--------------------------------------------------------------------------
  7. */
  8. 'payment_gateways' => array(
  9. 'name' => 'payment_gateways',
  10. 'type' => 'select',
  11. 'label' => __( 'Payment Gateways', 'ninja-forms' ),
  12. 'options' => array(
  13. array(
  14. 'label' => '--',
  15. 'value' => ''
  16. ),
  17. ),
  18. 'value' => '',
  19. 'width' => 'full',
  20. 'group' => 'primary',
  21. ),
  22. /*
  23. |--------------------------------------------------------------------------
  24. | Payment Type
  25. |--------------------------------------------------------------------------
  26. */
  27. //building the payment type selector box
  28. 'payment_total_type' => array(
  29. 'name' => 'payment_total_type',
  30. 'type' => 'select',
  31. 'label' => __( 'Get Total From', 'ninja-forms' ),
  32. 'width' => 'one-half',
  33. 'group' => 'primary',
  34. 'options' => array(
  35. array( 'label' => __( '- Select One', 'ninja-forms' ), 'value' => '' ),
  36. array( 'label' => __( 'Calculation', 'ninja-forms' ), 'value' => 'calc' ),
  37. array( 'label' => __( 'Field', 'ninja-forms' ), 'value' => 'field' ),
  38. array( 'label' => __( 'Fixed Amount', 'ninja-forms' ), 'value' => 'fixed' ),
  39. ),
  40. ),
  41. //building the calc selector.
  42. 'payment_total_calc' => array(
  43. 'name' => 'payment_total',
  44. 'total_type' => 'calc',
  45. 'type' => 'select',
  46. 'label' => __( 'Select Calculation', 'ninja-forms' ),
  47. 'width' => 'one-half',
  48. 'group' => 'primary',
  49. 'deps' => array(
  50. 'payment_total_type' => 'calc',
  51. ),
  52. 'default_options' => array(
  53. 'label' => __( '- Select One', 'ninja-forms' ),
  54. 'value' => '0',
  55. ),
  56. 'use_merge_tags' => TRUE,
  57. ),
  58. //building the field selector.
  59. 'payment_total_field' => array(
  60. 'name' => 'payment_total',
  61. 'total_type' => 'field',
  62. 'type' => 'select',
  63. 'label' => __( 'Select Field', 'ninja-forms' ),
  64. 'width' => 'one-half',
  65. 'group' => 'primary',
  66. 'deps' => array(
  67. 'payment_total_type' => 'field',
  68. ),
  69. 'default_options' => array(
  70. 'label' => __( '- Select One', 'ninja-forms' ),
  71. 'value' => '0',
  72. ),
  73. 'use_merge_tags' => TRUE,
  74. ),
  75. //building the field selector.
  76. 'payment_total_fixed' => array(
  77. 'name' => 'payment_total',
  78. 'total_type' => 'fixed',
  79. 'type' => 'textbox',
  80. 'label' => __( 'Enter Amount', 'ninja-forms' ),
  81. 'width' => 'one-half',
  82. 'group' => 'primary',
  83. 'value' => '0',
  84. 'deps' => array(
  85. 'payment_total_type' => 'fixed',
  86. ),
  87. ),
  88. ));