• Resolved toad78

    (@toad78)


    I have a situation where the payment needs to have this type of functionality (which I’m having trouble accomplishing).

    1. The user has the option to either (A) Pay for a Balance or (B) Register
    (A) If the user decides to pay for their Balance, they can enter in a custom amount in a text box and then click the PayPal button to pay.
    (B) If the user decides to register there are three fixed optional amounts for them to pay, selective by a radio button.

    2. We are having difficulty setting up for the form for both Scenario A and B because we aren’t able to have multiple PayPal buttons for two different field calculable amounts.

    What I’ve tried:
    > I’ve tried setting up “Pay for a Balance” as a fixed option radio selector to work with B, but I can’t assign a text box to be fillable because B requires a fixed calculable amount. Conditional logic won’t work in this case because this has to be a custom amount entered in by the user, unlike the fixed calculable amounts in that field.

    > I’ve tried to set up a separate PayPal button in that form using conditional logic to post the variable amount from a text box for Scenario A. Again, this isn’t possible because I can’t have more than one PayPal button option.

    So I need to give users the ability to (A) Pay for a Balance by entering in a custom amount and pay with PayPal, or if they choose (B) Register by selecting any fixed amount via radio button and pay with PayPal.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @toad78

    I hope you’re well today!

    You can set it up using a single PayPal field with “variable” amount and a “mix” of calculation and conditional visibility logic.

    First, add the PayPal field and Calculations field to the form and set the Calculations field to be a source of payment amount for PayPal.

    Second, add a select field with two options: “Pay for a balance” and “Register” – this field doesn’t have (and shouldn’t have calculations enabled).

    Third, add a “Radio” field with three options, enable calculations for that field and assign a value (that will be your fixed payment value) for each of the options), then go to “Visibility” rules and set it to show only if Select field has “Register” selected.

    Then Add the “Currency” field to the form, give it a default value of 0 and set its “Visibility” to make it visible only if Select field has “Pay for a Balance” option chosen.

    Finally, edit the “Calculations” field and in its formula editor simply put a sum of both “radio” and “currency” fields.

    What will happen then is:
    – if a “Pay for a Balance” is selected, the currency field shows up but not the radio buttons choice and user can submit their own amount
    – if a “register” option is selected, the currency field is hidden but the radio button shows up
    – the “calculations” field sums up the values of these field and paypal takes it from the calculations field.

    I’m attaching an export file of an example form that works like this for you to test and get a better idea on how to set that up. You can import it to your site and take a look and I think it should give you a foundation ??

    {"type":"form","data":{"fields":[{"id":"paypal-1","element_id":"paypal-1","form_id":"wrapper-1121-624","type":"paypal","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-1121-624","mode":"sandbox","currency":"USD","amount_type":"variable","label":"checkout","color":"gold","shape":"rect","layout":"vertical","tagline":"true","locale":"en_US","debug_mode":"disable","height":"40","variable":"calculation-1"},{"id":"select-1","element_id":"select-1","form_id":"wrapper-6277-1189","type":"select","options":[{"label":"Pay for a Balance","value":"pay-for-a-balance","limit":"","calculation":"0"},{"label":"Register","value":"register","limit":"","calculation":"10"}],"cols":12,"conditions":[],"wrapper_id":"wrapper-6277-1189","value_type":"single","field_label":"Select","calculations":"false"},{"id":"radio-1","element_id":"radio-1","form_id":"wrapper-3050-9803","type":"radio","options":[{"label":"Option 1","value":"one","calculation":"4"},{"label":"Option 2","value":"two","calculation":"2"},{"label":"Option 3","value":"option-3","limit":"","default":false,"calculation":"1"}],"cols":12,"conditions":[{"element_id":"select-1","rule":"is","value":"register"}],"wrapper_id":"wrapper-3050-9803","value_type":"radio","field_label":"Radio","layout":"vertical","calculations":"true"},{"id":"currency-1","element_id":"currency-1","form_id":"wrapper-9565-4756","type":"currency","options":[],"cols":12,"conditions":[{"element_id":"select-1","rule":"is","value":"pay-for-a-balance"}],"wrapper_id":"wrapper-9565-4756","calculations":"true","limit_min":1,"limit_max":150,"currency":"USD","field_label":"Currency","placeholder":"E.g. 10","default_value":"0"},{"id":"calculation-1","element_id":"calculation-1","form_id":"wrapper-6387-5916","type":"calculation","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-6387-5916","field_label":"Calculations","placeholder":"E.g. Calculated Value","formula":"{currency-1}+{radio-1}"}],"settings":{"pagination-header":"nav","paginationData":{"pagination-header-design":"show","pagination-header":"nav"},"formName":"PP","version":"1.11.2","form-border-style":"none","form-padding":"","form-border":"","fields-style":"open","validation":"on_submit","form-style":"default","enable-ajax":"true","autoclose":"true","submission-indicator":"show","indicator-label":"Submitting...","submission-behaviour":"behaviour-thankyou","thankyou-message":"Thank you for contacting us, we will be in touch shortly.","submitData":{"custom-submit-text":"Send Message","custom-invalid-form-message":"Error: Your form is not valid, please fix the errors!"},"validation-inline":"1","form-expire":"no_expire","form-padding-top":"0","form-padding-right":"0","form-padding-bottom":"0","form-padding-left":"0","form-border-width":"0","form-border-radius":"0","cform-label-font-family":"Roboto","cform-label-custom-family":"","cform-label-font-size":"12","cform-label-font-weight":"bold","cform-title-font-family":"Roboto","cform-title-custom-family":"","cform-title-font-size":"45","cform-title-font-weight":"normal","cform-title-text-align":"left","cform-subtitle-font-family":"Roboto","cform-subtitle-custom-font":"","cform-subtitle-font-size":"18","cform-subtitle-font-weight":"normal","cform-subtitle-text-align":"left","cform-input-font-family":"Roboto","cform-input-custom-font":"","cform-input-font-size":"16","cform-input-font-weight":"normal","cform-radio-font-family":"Roboto","cform-radio-custom-font":"","cform-radio-font-size":"14","cform-radio-font-weight":"normal","cform-select-font-family":"Roboto","cform-select-custom-family":"","cform-select-font-size":"16","cform-select-font-weight":"normal","cform-multiselect-font-family":"Roboto","cform-multiselect-custom-font":"","cform-multiselect-font-size":"16","cform-multiselect-font-weight":"normal","cform-dropdown-font-family":"Roboto","cform-dropdown-custom-font":"","cform-dropdown-font-size":"16","cform-dropdown-font-weight":"normal","cform-calendar-font-family":"Roboto","cform-calendar-custom-font":"","cform-calendar-font-size":"13","cform-calendar-font-weight":"normal","cform-button-font-family":"Roboto","cform-button-custom-font":"","cform-button-font-size":"14","cform-button-font-weight":"500","cform-timeline-font-family":"Roboto","cform-timeline-custom-font":"","cform-timeline-font-size":"12","cform-timeline-font-weight":"normal","cform-pagination-font-family":"","cform-pagination-custom-font":"","cform-pagination-font-size":"16","cform-pagination-font-weight":"normal","payment_require_ssl":"","submission-file":"delete","form_status":"publish","form_name":"pp"},"client_id":null,"notifications":[]},"status":"publish","version":"1.11.2"}

    Best regards,
    Adam

    Thread Starter toad78

    (@toad78)

    I’ll make a test of what you’ve supplied and see how it goes.
    Thank you for taking the time to do this!

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @toad78

    I hope you are doing well!

    We haven’t heard from you for a while now, so I’ve marked this ticket as resolved. If you do have any followup questions or require further assistance feel free to reopen it and let us know here.

    Kind regards,
    Nastia

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multiple PayPal Button Scenario?’ is closed to new replies.