• Resolved Mohamed

    (@eazyproo)


    Hello,

    We are trying to add a style on our payment form when we start type the card number so the payment form recognize the card and show its logo.

    however on your payment for for advanced credit cards we are unable to get the class or the code that recognize the card from the first 2 or 3 numbers typed, i will attach screenshots for a reference and your payment form.

    Reference needed stlye like him (check the card number we entered 42 and the card recognized right away,
    https://snipboard.io/x3gbVR.jpg

    your payment form when enter 42 nothing happen,
    https://snipboard.io/x3WSLz.jpg

    your payment form when we enter the full card numbers the form recofgnize the card (we want when we start type the card number so it show the style we already added when the card validated),
    https://snipboard.io/ToacSB.jpg

    Note: We tried to hire a lot of developers and all failed to do the needed task.

    kindly help.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @eazyproo

    For the most part, the logic of the hosted fields provided by the Advanced Card Processing is controlled by PayPal. This file renders the card fields, but the card type detection happens inside of the PayPal Hosted Fields SDK, as far as I am aware. This means the plugin currently doesn’t actively control at which point the card type is detected.

    In the PayPal Hosted Fields SDK, the recognition of card type and triggering of the cardTypeChange event occurs when enough digits have been entered to identify the card type. Since this detection is done internally by the PayPal SDK, I’m not sure it can be modified from the code mentioned above.

    If you want the icon to show earlier, you may need to implement your own card type detection logic outside of the PayPal SDK, which could trigger as soon as the first digits are entered. However, this could potentially be more complex and less reliable than using the SDK’s built-in functionality and would also increase the risk of handling sensitive card information.

    Some of the examples in the PayPal documentation like this one appear to trigger the card detection earlier. Though I’m unsure if there is an easy way to have the hosted fields from the plugin behave the same way.
    But to better understand possible options, I created an issue for our developers to investigate if this could be improved to detect the card earlier as per your request.
    We’ll try to let you know when we had the chance to look into this deeper.

    Kind regards,
    Niklas

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @eazyproo

    Our developers have looked into the behavior, and found a way to trigger PayPal’s card type detection earlier.

    Please give it a try with this test version. With this test version, the card type detection should be triggered after the first couple of digits, as opposed to only when the full card number is provided (how it works right now). For reference, here are the changes that made this work.

    Please let us know how this works for you.

    Kind regards,
    Niklas

    Thread Starter Mohamed

    (@eazyproo)

    Hello,

    Thank you so much it worked perfectly hope you save the changes on all of your next updates, thank you.

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @eazyproo

    Thank for the feedback. I’m glad to hear this works for you.

    The tweak will likely be included in the next update which will be released sometime within the next two weeks.

    Kind regards,
    Niklas

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    The change was merged and will be part of the upcoming update. So I will mark this thread as resolved. Thanks again for the suggestions.

    If you have any doubts or further questions, please do not hesitate to let us know.
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘payment form’ is closed to new replies.