Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@tosspayments/payment-sdk-react-native
Advanced tools
Payment SDK for React Native
# npm
npm install @tosspayments/payment-sdk-react-native
# yarn
yarn add @tosspayments/payment-sdk-react-native
import { PaymentContextProvider, usePaymentWidget } from "payment-sdk-react-native";
// ...
export default function App() {
const [amount, onChangeAmount] = useState<Amount>({
value: 1000,
currency: 'KRW',
country: 'KR',
});
return <PaymentContextProvider
clientKey={`test_ck_0Poxy1XQL8R4P1zpv14V7nO5Wmlg`}
customerKey={`TOSSPAYMENTS`}
onSuccess={(success) => {
Alert.alert('결제성공', `${JSON.stringify(success)}`);
}}
onFail={(fail) => {
Alert.alert(`결제실패`, `${JSON.stringify(fail)}`);
}}
>
<Widget amount={amount}>
</PaymentContextProvider>
}
function Widget({ amount }: { amount: Amount }) {
const widget = usePaymentWidget();
return (
<>
<PaymentMethodWidget
amount={amount}
variantKey={`DEFAULT`}
/>
<AgreementWidget>
<Button
title="결제요청"
onPress={() => {
const agreeement = widget?.getAgreementStatus();
if (agreeement?.agreedRequiredTerms != true) {
Alert.alert('약관에 동의하지 않았습니다.');
return;
}
widget?.requestPayments?.({
orderId: "OrderId_123",
orderName: "김토스",
cultureExpense: true,
});
}}
/>
<Button
title="선택된 결제수단"
onPress={() => {
Alert.alert(`선택된 결제수단: ${JSON.stringify(widget?.getSelectedPaymentMethod())}`);
}}
/>
</>
)
}
MIT
FAQs
Payment SDK for React Native
The npm package @tosspayments/payment-sdk-react-native receives a total of 5 weekly downloads. As such, @tosspayments/payment-sdk-react-native popularity was classified as not popular.
We found that @tosspayments/payment-sdk-react-native demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 45 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.