Verwendung von @capgo/capacitor-pay
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 Betriebssystem verfügbar ist. Auf iOS wird Apple Pay bewertet, auf Android wird Google Pay bewertet.requestPayment- Präsentiert die native Zahlungsschüssel für das aktuelle Betriebssystem. Bereitstellen Sie die Apple Pay-Konfiguration auf iOS und die Google Pay-Konfiguration auf Android.
Beispiel für die Verwendung
isPayAvailable
- Überprüft, ob die native Zahlung auf dem aktuellen Betriebssystem verfügbar ist. Auf iOS wird Apple Pay bewertet, auf Android wird Google Pay bewertet.
import { Pay } from '@capgo/capacitor-pay';
await Pay.isPayAvailable();
requestPayment
Presents the native pay sheet for the current platform. Provide the Apple Pay configuration on iOS and the Google Pay configuration on 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/
Fortsetzen von Using @capgo/capacitor-pay
Wenn Sie Using @capgo/capacitor-pay zur Planung von Zahlungen und Käufen verwenden @capgo/capacitor-pay mit @capgo/capacitor-pay verbinden Sie @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-pay, für die Implementierungsdetails in @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-pay, Für die Implementierungsdetails in Getting Started, Capgo Preisgestaltung Für die Produktworkflow in Capgo Preisgestaltung, Zahlungssystem Für die Implementierungsdetails in Zahlungssystem und @capgo/native-purchases for the implementation detail in @capgo/native-purchases.