Anleitung
Tutorial zu Zahlung
Mit @capgo/capacitor-zahlung verwenden
Capacitor-Plugin zum Auslösen der nativen Zahlung für iOS (Apple Pay) und Android (Google Pay).
Installieren
bun add @capgo/capacitor-pay
bunx cap sync
Was dieses Plugin enthüllt
isPayAvailable- Überprüft, ob die native Zahlung auf dem aktuellen Gerät verfügbar ist. Auf iOS wird Apple Pay, auf Android wird Google Pay bewertet.requestPayment- Präsentiert die native Zahlungsschaltfläche für das aktuelle Gerät. Geben Sie die Apple Pay-Konfiguration auf iOS und die Google Pay-Konfiguration auf Android an.
Beispiel für die Verwendung
isPayAvailable
Überprüft, ob native Zahlungen auf der aktuellen Plattform verfügbar sind. Auf iOS wird Apple Pay und auf Android Google Pay bewertet.
import { Pay } from '@capgo/capacitor-pay';
await Pay.isPayAvailable();
requestPayment
Präsentiert das native Zahlungsbildschirm für die aktuelle Plattform. Bereitstellen Sie die Apple Pay-Konfiguration auf iOS und die Google Pay-Konfiguration auf Android.
import { Pay } from '@capgo/capacitor-pay';
await Pay.requestPayment({} as PayPaymentOptions);
Vollständige Referenz
- GitHub https://github.com/Cap-go/capacitor-pay/
- Dokumentation: /docs/plugins/pay/