• Resolved lem1298

    (@lem1298)


    Hi,

    when searching this support forum I found a similar request from a year ago that was closed but never really resolved: https://www.ads-software.com/support/topic/hide-paypal-credit-in-options/

    Currently, different PayPal “Smart Payment Buttons” are presented to the user depending on their location and other factors. Therefor, the form looks like this for me for example: https://imgur.com/a/Dbvuq9F

    I am looking for an option to disable certain smart payment options (e.g. hide “giropay”). While I do think that some advanced PayPal settings like these inside Forminator would really benefit the plugin (that is otherwise really great!) in the long run, I was hoping for a workaround solution to quickly solve this issue.

    I found some PayPal resources about disabling those payment options, but obviously just pasting the script tag on the page of the form is not sufficient: https://developer.paypal.com/docs/checkout/reference/customize-sdk/#disable-funding

    Do you have any ideas how this could be quickly accomplished by any chance?

    Thanks so much in advance!

    • This topic was modified 3 years, 12 months ago by lem1298.
Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @lem1298

    I hope you are doing good today.

    I pinged our Forminator Team about your query. We will post an update here as soon as more information is available.

    Kind Regards,
    Kris

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi again

    I spoke with our developers and originally the plan was to remove “PayPal Credit” funding sources because that was the only additional funding source back then. It was also a part of the first release but we removed the feature during testing because it was conflicting with the PayPal payments. Our developers will revisit this and if the conflict isn’t there anymore, We will support disabling all new funding sources, although, it won’t happen in the next 2 or 3 releases.

    Kind Regards,
    Kris

    Thread Starter lem1298

    (@lem1298)

    Hi there,

    Thank you very much for checking!

    I am hopeful that the conflict is resolved, as PayPal is now officially offering the option to disable certain funding sources via API (please see link in inital post), but your developers will know better than I do.

    If I may add the wish to have the ability to disable all kinds of funding sources and not only a single one (just like you have the option for certain credit cards already), this would be amazing. Thank you so much for your continued support on this already great plugin!

    In the meantime, there is no interim solution via mu-plugins etc that you know of by any chance? I guess I could add the disable-funding parameter to the paypal_script_argument function in front-render.php (l. 497), but I am afraid of screwing things up. Especially if the topic at hand is as sensible as a PayPal transaction.

    Kind regards,
    Linus

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @lem1298,

    I’m afraid at the moment there isn’t any quick workaround that we could share regarding this via mu-plugins. Editing the plugin files directly isn’t something we could recommend at the moment as we cannot say how it would affect the existing transarcitons.

    I’ll be checking with our Forminator team to see if there is anything specific that could be looked as a workaround or whether it would require too much custom coding.

    Will keep you posted once we get further feedback asap.

    Kind Regards,
    Nithin

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @lem1298 ,

    I’m sorry for the delay on our end.

    Our developer suggested checking this code snippet https://gist.github.com/wpmudev-sls/daf61c2485fd51098ade5305aa126808 in combination with way described here https://developer.paypal.com/docs/checkout/reference/customize-sdk/#disable-funding
    So use disable-funding=giropay,sepa etc in the script tag
    Find this line$paypal_src = @ $forminator_cform->paypal_script_argument( 'https://www.paypal.com/sdk/js' );and update the URL.

    We would suggest checking first on a test site using Must Use plugin
    https://premium.wpmudev.org/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
    https://www.youtube.com/watch?v=lrRs53zZt2I

    kind regards,
    Kasia

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @lem1298 ,

    We haven’t heard from you for a while now, so it looks like you solved this issue with proposed code.

    Please feel free to re-open it if needed.

    kind regards,
    Kasia

    Thread Starter lem1298

    (@lem1298)

    Hi Kasia,

    Sorry for not responding earlier.

    Unfortunately, this didn’t quite solve my issue. While the other payment options are indeed gone using the snippet, now the PayPal window opens only momentarily before closing again and Forminator Form showing a payment error in Live mode.

    Will try to follow up with more details soon…

    Kind regards,
    Linus

    Thread Starter lem1298

    (@lem1298)

    Hi Kasia,

    First of all, I forgot to thank you for trying to fix my issue in the earlier post. So this time: Thank you very much!

    Let me give you some more details of what I tried, and what is happening.

    I added the Code Snippet provided by you to the mu-plugins folder. Before doing so, I exchanged the line 53

    $paypal_src = @ $forminator_cform->paypal_script_argument( 'https://www.paypal.com/sdk/js' );

    to

    $paypal_src = @ $forminator_cform->paypal_script_argument( 'https://www.paypal.com/sdk/js?disable-funding=credit,bancontact,blik,eps,giropay,ideal,mercadopago,mybank,p24,sepa,sofort,venmo' );.

    When using the Forminator Form, the other buttons are indeed gone! However, I can’t finish the payment using either the PayPal or Credi/Debit card button (the only ones not disabled via Script above). When clicked, the default PayPal popup opens briefly before closing again after a second. The Forminator Form shows the following error after the closure: Error! Something went wrong when verifying the payment

    When I look at the developer tools of my browser, I can see that a GET request to PayPal is made initially https://www.paypal.com/sdk/js?disable-funding=credit,bancontact,blik,eps,giropay,ideal,mercadopago,mybank,p24,sepa,sofort,venmo&client-id=[My-Id-Here]

    However, all following requests are sent to sandbox.paypal.com (even though I am 100% sure I am in Live Mode) before the popup closes eventually and the error mentioned above is shown.

    Any ideas what could be going on?

    Thanks again,
    Linus

    Hi @lem1298,

    Thank you for following up.

    Checking the script src you use in comparison to the example given on here:https://developer.paypal.com/docs/checkout/reference/customize-sdk/#disable-funding

    It shows you are missing the client-id=YOUR_CLIENT_ID portion. Could you please double-check and make sure the src format is the same as documentation and test it again?

    Best,
    Jonathan S

    Thread Starter lem1298

    (@lem1298)

    Hi Jonathan,

    Thanks for your quick response!

    Without further reviewing the Code Snippet provided earlier (my PHP knowledge is quite limited anyways), I was assuming that Forminator would append the client-id to the request automatically, given that the PayPal client-id gets configured in the Forminator backend already. Hardcoding the id into the code snippet seems very counterintuitive to me. Also, I was able to detect in the developer tools that Forminator does in fact seem to append the id to the GET request (see earlier post).

    Nevertheless I followed your suggestion and sadly have to report, that it has exactly the same outcome as without client-id hardcoded into the URL.

    Happy for any other ideas or maybe even news on an officially supported feature as hinted by Kris earlier.

    Thanks again,
    Linus

    Hi @lem1298,

    I will be checking with our Plugin team, but this improvement is still being investigated/considered, so it won’t be available within the next release or 2. Were you able to double-check that you are currently using your live mode PayPal account and not Sandbox when doing this test? Could you confirm the page URL where you are currently testing the form?

    Best,
    Jonathan S

    Hi @lem1298,

    A new plugin version will be going live today. Could you update your plugin and test with this version to see if perhaps the issue is fixed? Please make sure to use your live account when doing the test.

    Best,
    Jonathan S

    Thread Starter lem1298

    (@lem1298)

    Hi @wpmudev-support9 ,

    thanks once more for your help.

    Yes, I am certain that I am using the Live account. This is also underlined by the fact, that the PayPal popup opens the regular PayPal domain (not the sandbox.paypal.com subdomain) as soon as I remove the Code Snippet.

    I will try updating the plugin as soon as it becomes available and report back.

    Best,
    Linus

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @lem1298 ,

    We just released a new version of the plugin. Can you update it and see if the issue is fixed on your site?

    kind regards,
    Kasia

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @lem1298 ,

    We haven’t heard from you for a week now, so it looks like the new version fixed problem on your site.

    Please feel free to re-open this ticket if needed.

    kind regards,
    Kasia

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘PayPal – Disable certain payment forms’ is closed to new replies.