Giter VIP home page Giter VIP logo

Comments (3)

nsarno avatar nsarno commented on September 21, 2024

This is what the payload sent to /payments looks like (in our ruby code)

{
  merchantAccount: merchant_account,
  reference: reference,
  shopperReference: shopper_reference,
  shopperEmail: shopper_email,
  shopperStatement: shopper_statement,
  paymentMethod: payment_method,
  enableRecurring: true,
  recurringProcessingModel: RECURRING_PROCESSING_MODEL,
  storePaymentMethod: true,
  returnUrl: return_url,
  amount: {
    currency: currency,
    value: 0 # if I replace this with `100`, everything works as expected. But then we don't have dynamic zero auth.
  }
}

And this is how I create the Paypal component on the frontend:

const paypalComponent = checkout
  .create("paypal", {
    environment,
    amount: {
      currency,
      value: 0,
    },
    intent: "authorize",
    merchantId,
    onSubmit: (state, component) => {
      const data = {
        returnUrl,
        ...state.data,
      };

      initiatePayment(data, component)
        .then((res) => handleServerResponse(res, component))
        .catch((error) => {
          throw Error(error);
        });
    },
    onCancel: (data, component) => {
      component.setStatus("ready");
    },
    onError: (error, component) => {
      component.setStatus("ready");
    },
    onAdditionalDetails: (state, component) => {
      submitPaymentDetails(state.data, component)
        .then((result) => {
          finalRedirect(result);
        })
        .catch((error) => {
          throw Error(error);
        });
    },
  })
  .mount("#paypal-container");

from adyen-web.

pabloai avatar pabloai commented on September 21, 2024

Hi @nsarno,

Thanks for the extensive report!
We're currently investigating this and get back to you once we have a clear answer. Cheers!

from adyen-web.

ribeiroguilherme avatar ribeiroguilherme commented on September 21, 2024

Hi @nsarno ,

Seems like this issue is stale. I hope you managed to go around this problem. Might be worth to mention that we introduced PayPal ZeroAuth (#1311) on v5.3.0 .

I am going to close this ticket for now, but feel free to reach out if you still have issues with the library. I can reopen this issue or you can create a new one. Thanks!

from adyen-web.

Related Issues (20)

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.