Git Product home page Git Product logo

react-acceptjs's People

Contributors

brendanbond avatar sbamniya avatar tylerjohanson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-acceptjs's Issues

Adding key on hosted form stops opening payment modal

I have implemented this library in Next.js app. This works fine, as a standalone page. I am having an issue, as I have 5 options in my page to select from, the problem I am having is, even if I change the selection from sidebar, the modal doesn't get updated state. I am sure this is not an issue with React implementation, as same is working with other Payment provider like Stripe and PayPal. I tried adding key to the component so it gets recreated on change, but when I add key, it stops opening modal. If I remove it, it works correctly.

<HostedForm
    buttonClassName={clsx(
      "use-focus-outline",
      "flex grow cursor-pointer items-center",
      "rounded-full xl:rounded-10",
      "px-7",
      "h-10 xs:h-11 xl:h-9",
      "xl:min-w-[22.5rem] 3xl:min-w-[18rem]",
      selectedPaymentMethod !== "paypal"
        ? "bg-my-purple text-white"
        : "bg-[#d8d8d8] dark:bg-[#707070]"
    )}
    buttonText="Pay with Authorize.net"
    formHeaderText="Complete your purchase"
    authData={authData}
    onSubmit={(response: any) => {
      handleSubmit(response);
    }}
    environment="PRODUCTION"
    key={tokenPackage}
  />

Styling the Accept Hosted form?

We are currently trying to use the accept hosted implementation from your lib and are failing to style it, so I wanted to generally know, what options are even possible here? What is the recommended implementation?
In point 3 you are writing:

A note on styling: a goal of this library is to invert control of the UI to the developer. Each of the <AcceptHosted /> compound compontents (<Button />, <IFrameBackdrop />, <IFrameContainer />, and <IFrame />) have both className and style object props, allowing the default styles to be overridden. At this moment, this is not recommended.

-> what is alternatively recommended from your side? The docs are missing details here..

HostedForm is not showing up

I have observed that when the HostedForm is properly working, you should see the code existing inside the body of the page when you inspect its element. In our system, we are using react with material UI and placing the HostedForm inside the material Drawer, When I close the drawer and re-open it, the on-click function of the HostedForm form does not work anymore. It seems like the functionality that adds the class="show" to the element that makes the form appear is not working.

Expiry Date Problem

Always showing { code: "E_WC_07", text: "Please provide valid expiration year." } and { code: "E_WC_06", text: "Please provide valid expiration month." } errors.

Please help me.

Onsubmit is calling twice in HostedForm

<HostedForm authData={clientSecret}
                        onSubmit={handleSubmit}
                        errorTextStyle={{ fontSize: "12px", color: "red" }}
                        buttonText={t("affiliate.buyNow")}
                        buttonClassName={style.buy_button}
                        disabled={false}
                        onCancel={(e) => onWindowCncel(e)}
                        environment="SANDBOX"
                      />

Onsubmit is calling handleSubmit function twice how can i prevent this issue ?

How to Position the HostedForm?

I've got a working implementation, thanks for that!

I have a form with shipping address, billing address, payment info (via HostedForm), and then a Final Review button.

I input all the info and at the bottom I click the button generated by HostedForm.

That action opens the lightbox with the Authorize.net form, but it also renders that form near the top of the page and scrolls me up... forcing me to scroll all the way back down again to click Final Review.

How can we position the HostedForm?

Ideally, it wouldn't be a modal at all, but could be contained within a div I provide.

OR, how can I position it so that is pops up center screen at the current scroll location, and not at the top of the page?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.