Zum Hauptinhalt springen
Zurück zu plugins
@capgo/capacitor-pay
Anleitung
@capgo/capacitor-pay

Zahlung

Akzeptieren Sie Zahlungen mit Apple Pay und Google Pay für einen reibungslosen Checkout-Erlebnis

Ansehen auf __CAPGO_KEEP_0__

Anleitung

Mit @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 bereitstellt

  • isPayAvailable - Überprüft, ob die native Zahlung auf dem aktuellen Betriebssystem verfügbar ist. Auf iOS wird Apple Pay und auf Android wird Google Pay bewertet.
  • requestPayment - Präsentiert die native Zahlungsschaltfläche für das aktuelle Betriebssystem. Geben Sie die Apple Pay-Konfiguration auf iOS und die Google Pay-Konfiguration auf Android an.

Beispielanwendung

isPayAvailable

- Überprüft, ob die native Zahlung auf dem aktuellen Betriebssystem verfügbar ist. Auf iOS wird Apple Pay und auf Android wird Google Pay bewertet.

import { Pay } from '@capgo/capacitor-pay';

await Pay.isPayAvailable();

requestPayment

- Präsentiert die native Zahlungsschaltfläche für das aktuelle Betriebssystem. Geben Sie die Apple Pay-Konfiguration auf iOS und die Google Pay-Konfiguration auf Android an.

import { Pay } from '@capgo/capacitor-pay';

await Pay.requestPayment({} as PayPaymentOptions);

Vollständige Referenz

Weitermachen von Using @capgo/capacitor-pay

Wenn Sie Using verwenden Using @capgo/capacitor-pay um Zahlungen und Kaufpläne zu planen, verbinden Sie es mit @capgo/capacitor-pay für die Implementierungsdetails in @capgo/capacitor-pay Einstieg für die Implementierungsdetails in Einstieg Capgo-Preise für den Produktworkflow in Capgo-Pricing, Zahlungssystem für die Implementierungsdetails in Zahlungssystem, und für die Implementierungsdetails in @capgo/native-purchases. for the implementation detail in @capgo/native-purchases.