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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add Paypal Donate SDK inplemetation #570

Open
Vladi-ed opened this issue Oct 13, 2024 · 2 comments
Open

[Feature] Add Paypal Donate SDK inplemetation #570

Vladi-ed opened this issue Oct 13, 2024 · 2 comments

Comments

@Vladi-ed
Copy link

🚀 Feature Proposal

There is no Donate SDK implementation in @paypal/paypal-js

Motivation

I just want to gather donation in my SPA but there is no implementation i can find inside @paypal/paypal-js

Example

Example for how this feature would be used:

import { loadDonationScript } from "@paypal/paypal-js";

let paypal;

try {
    paypal = await loadDonationScript();
} catch (error) {
    console.error("failed to load the PayPal JS SDK script", error);
}

if (paypal) {
    try {
        await paypal.DonateButton({
          env: 'production',
          hosted_button_id: '123',
          image: {
            src: 'assets/donate.png',
            alt: 'Donate',
            title: 'Support my work',
          }
      } ).render("#your-container-element");
    } catch (error) {
        console.error("failed to render the PayPal Buttons", error);
    }
}
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Stale label Jan 12, 2025
@DaleCam
Copy link

DaleCam commented Jan 17, 2025

bump

@github-actions github-actions bot removed the Stale label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants