rn-ios-apple-pay
v1.0.0
Published
Welcome to the easiest way to add Apple Pay to your React Native iOS app for smooth, secure payments.
Downloads
93
Maintainers
Readme
rn-ios-apple-pay
Welcome to the easiest way to add Apple Pay to your React Native iOS app for smooth, secure payments.
Installation
npm install rn-ios-apple-pay
yarn add rn-ios-apple-pay
Demo
Usage
import React from 'react';
import { useApplePay } from 'rn-ios-apple-pay';
const App = () => {
const { initiateApplePayPayment, isApplePayAvailable } = useApplePay();
const available = isApplePayAvailable();
// Example usage:
const handlePayment = async () => {
const paymentResult = await initiateApplePayPayment();
/* provide amount, currencyCode, merchantId, countryCode */
// Handle payment result
};
return (
<>
<Button onPress={handlePayment} title="Make Payment" />
</>
);
};
export default App;
Payment Result
{
"paymentData": {
"data": "",
"signature": "",
"header": {
"publicKeyHash": "",
"ephemeralPublicKey": "",
"transactionId": ""
},
"version": ""
},
"paymentMethod": {
"displayName": "",
"network": "",
"type": ""
},
"transactionIdentifier": ""
}
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT