Skip to content

Conversation

harlan-zw
Copy link
Collaborator

@harlan-zw harlan-zw commented Sep 18, 2025

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

ℹ️ This is work contributed by @OrbisK, moved to a new PR so I could fix a couple of typos and progress it.

Adds comprehensive PayPal SDK support to Nuxt Scripts with three main components:

  • useScriptPayPal() - Loads the PayPal SDK script with automatic sandbox detection
  • <ScriptPayPalButtons> - Embeds PayPal payment buttons with full event handling
  • <ScriptPayPalMarks> - Displays PayPal payment marks/logos
  • <ScriptPayPalMessages> - Shows PayPal promotional messages

Usage

  pnpm add -D @paypal/paypal-js
<script lang="ts">
const script = useScriptPayPal()
</script>
  <template>
    <ScriptPayPalButtons 
      :button-options="{ style: { layout: 'vertical' } }"
      @approve="handleApproval"
    />
    <ScriptPayPalMarks />
    <ScriptPayPalMessages />
  </template>

Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
scripts-docs Error Error Sep 18, 2025 5:37am
scripts-playground Ready Ready Preview Comment Sep 18, 2025 5:37am

Copy link

pkg-pr-new bot commented Sep 18, 2025

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/scripts/@nuxt/scripts@503

commit: df55f09

@harlan-zw harlan-zw merged commit c4cb191 into main Sep 18, 2025
9 of 10 checks passed
@harlan-zw harlan-zw deleted the feature/paypal branch September 18, 2025 05:50
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

Successfully merging this pull request may close these issues.

2 participants