{"_id":"@adembacaj/react-native-apple-pay","name":"@adembacaj/react-native-apple-pay","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@adembacaj/react-native-apple-pay","version":"1.0.0","description":"React Native Apple Pay module","private":false,"main":"lib/commonjs/index","module":"lib/module/index","types":"lib/typescript/src/index.d.ts","react-native":"src/index","source":"src/index","scripts":{"example":"yarn workspace react-native-apple-pay-example","test":"jest","typecheck":"tsc --noEmit","lint":"eslint \"**/*.{js,ts,tsx}\"","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","prepare":"bob build","release":"release-it"},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"https://github.com/adembacajdev/react-native-apple-pay/react-native-apple-pay"},"author":{"name":"Adem Bacaj","email":"adembacajdev@gmail.com","url":"https://github.com/adembacajdev/react-native-apple-pay"},"license":"MIT","bugs":{"url":"https://github.com/adembacajdev/react-native-apple-pay/react-native-apple-pay/issues"},"homepage":"https://github.com/adembacajdev/react-native-apple-pay/react-native-apple-pay#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"devDependencies":{"@commitlint/config-conventional":"^17.0.2","@evilmartians/lefthook":"^1.5.0","@react-native/eslint-config":"^0.72.2","@release-it/conventional-changelog":"^5.0.0","@types/jest":"^28.1.2","@types/react":"~17.0.21","@types/react-native":"0.70.0","commitlint":"^17.0.2","del-cli":"^5.0.0","eslint":"^8.4.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.0.0","jest":"^28.1.1","pod-install":"^0.1.0","prettier":"^2.0.5","react":"18.2.0","react-native":"0.72.7","react-native-builder-bob":"^0.20.0","release-it":"^15.0.0","turbo":"^1.10.7","typescript":"^5.0.2"},"resolutions":{"@types/react":"17.0.21"},"peerDependencies":{"react":"*","react-native":"*"},"workspaces":["example"],"packageManager":"yarn@3.6.1","engines":{"node":">= 18.0.0"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"eslintConfig":{"root":true,"extends":["@react-native","prettier"],"rules":{"prettier/prettier":["error",{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"react-native-builder-bob":{"source":"src","output":"lib","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]},"gitHead":"66be2c9dca90aaba68ffe3fd667429c586b47069","_id":"@adembacaj/react-native-apple-pay@1.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-zYOIpJKiAhRuaxzTuUA8+qccM7flTwTPqAFbHsEb4ljySLc0iUdGye8kByqIyKpbBXGjh8NDEMsTGrV3GsauAg==","shasum":"d352a21f7103c4855777d8001c31e28a67fede23","tarball":"https://registry.npmjs.org/@adembacaj/react-native-apple-pay/-/react-native-apple-pay-1.0.0.tgz","fileCount":52,"unpackedSize":41975,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDQ+WmGjGGYB28/S79jk4r/FMyqXVq9ajgrqZJWqtFBbAiEAr3yi+Rnsl4icRlkU+nOpnCqHAbf1isS+5FfhP0Pfp0M="}]},"_npmUser":{"name":"adembacaj","email":"adembacajdev@gmail.com"},"directories":{},"maintainers":[{"name":"adembacaj","email":"adembacajdev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-apple-pay_1.0.0_1700244225657_0.15728399739607468"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-17T18:03:45.548Z","1.0.0":"2023-11-17T18:03:45.874Z","modified":"2023-11-17T18:03:46.218Z"},"maintainers":[{"name":"adembacaj","email":"adembacajdev@gmail.com"}],"description":"React Native Apple Pay module","homepage":"https://github.com/adembacajdev/react-native-apple-pay/react-native-apple-pay#readme","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"https://github.com/adembacajdev/react-native-apple-pay/react-native-apple-pay"},"author":{"name":"Adem Bacaj","email":"adembacajdev@gmail.com","url":"https://github.com/adembacajdev/react-native-apple-pay"},"bugs":{"url":"https://github.com/adembacajdev/react-native-apple-pay/react-native-apple-pay/issues"},"license":"MIT","readme":"# @adembacaj/react-native-apple-pay\n\nApple Pay native modules for React-Native\n\n## Installation\n\n```sh\nnpm install @adembacaj/react-native-apple-pay\nor\nyarn add @adembacaj/react-native-apple-pay\n```\n\n## iOS Extra Actions\n\n```sh\nnpx pod-install\nor\ncd ios && pod install\n```\n\n### Check canMakeApplePayPayments\n\nBefore using Apple Pay, if you want to enable/disable or show/hide Apple Pay button, you need to call this function to check if device is ready to pay or not.\n\n```js\nimport { canMakeApplePayPayments } from '@adembacaj/react-native-apple-pay';\n\nconst canPayWithApple: boolean = await canMakeApplePayPayments();\n```\n\n### Direct Apple Payment\n\nYou can use different payment gateways, but you can also use direct payment.\n\n```js\nimport { makeApplePayPayment } from '@adembacaj/react-native-apple-pay';\n\n// ...\n//Check if device/creditcard is ready to pay\nif (canPayWithApple) {\n  const result = await makeApplePayPayment(100, 'USD', 'Test', 'Test');\n  Alert.alert('Results', results);\n}\n```\n\n### ApplePayButton\n\nYou can also use Apple Pay Button.\n\n```js\nimport { ApplePayButton } from 'react-native-apple-pay';\n\nconst App = () => {\n  return (\n    <ApplePayButton\n      buttonType={'plain'} // 'plain' | 'inStore' | 'buy' | 'setUp'\n      buttonStyle={'black'} // 'black' | 'white' | 'whiteOutline'\n      onPress={() => console.log('payWithApple')}\n      width={120}\n      height={44}\n      cornerRadius={4}\n    />\n  );\n};\n```\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","readmeFilename":"README.md"}