Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Property 'PayoutsAAC' does not exist on type 'PayPalNamespace'. #351

Open
AJDowds opened this issue Mar 28, 2023 · 3 comments
Open

Comments

@AJDowds
Copy link

AJDowds commented Mar 28, 2023

馃悶 Describe the Bug

When initiating the paypal object via any of the methods listed on the paypal website (script in index.html or loadScript method) and adding either:

<script src="https://www.paypalobjects.com/payouts/js/payouts_aac.js"></script> to index
or
components: "buttons,marks,payout",

Trying to access window.paypal?.PayoutsAAC results in Property 'PayoutsAAC' does not exist on type 'PayPalNamespace'..

Console logging out the window.paypal object, I can see that the PayoutsAAC property does exist.

馃敩 Minimal Reproduction

  • Follow the steps to integrate the paypal object into your react project under window.paypal
  • Attempt to use window.paypal?.PayoutsAAC

馃槙 Actual Behavior

See Describe the Bug

馃 Expected Behavior

The typescript definition of PayPalNamespace should allow for other properties beside Buttons

馃實 Environment

  • Node.js/npm: v18.12.1
  • OS: Windows
  • Browser: Chrome
@wsbrunson
Copy link
Member

hi @AJDowds can you share the link you were using to integrate with PayPal?

@AJDowds
Copy link
Author

AJDowds commented Mar 5, 2024

I thought that if I used: (buttons,payout in components)

  <PayPalScriptProvider
    options={{
      clientId:
        (process.env.MODE === "development"
          ? process.env.SANDBOX_CLIENT_ID
          : process.env.PRODUCTION_CLIENT_ID) ?? "",
      currency: "GBP",
      components: "buttons,payout",
    }}
  >

Then I didn't actually need to use a link to integrate? Having said that, I have also tried including:
<script src="https://www.paypalobjects.com/payouts/js/payouts_aac.js"></script>
and
<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID"></script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@wsbrunson @AJDowds and others