
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@abdelrahman.rabie/payment-sdk-react-native
Advanced tools
React Native SDK for payment processing with E_API and E_LINKS support
A comprehensive React Native SDK for payment processing with E_API and E_LINKS support, including Apple Pay and Google Pay integration.
npm install @abdelrahman.rabie/payment-sdk-react-native
# or
yarn add @abdelrahman.rabie/payment-sdk-react-native
For iOS projects using CocoaPods:
```bash
cd ios && pod install
import { PaymentSDK } from "payment-sdk-react-native";
const sdk = new PaymentSDK({
baseURL: "https://your-payment-api.com",
paymentPageApiToken: "your-api-token",
paymentCoreURL: "https://your-payment-core-api.com", // optional
});
import React from "react";
import { View, Button, Text } from "react-native";
import {
usePayment,
EPaymentProduct,
EPaymentMethods,
ELanguages,
} from "payment-sdk-react-native";
const PaymentScreen = () => {
const { loading, error, paymentInfo, executePayment, initializePayment } =
usePayment({ sdk });
const handleInitialize = async () => {
await initializePayment(EPaymentProduct.E_API, "your-payment-token");
};
const handlePayment = async () => {
await executePayment(EPaymentProduct.E_API, "your-payment-token", {
paymentMethod: EPaymentMethods.VISA,
language: ELanguages.EN,
});
};
return (
<View>
<Button title="Initialize Payment" onPress={handleInitialize} />
<Button
title="Pay with Visa"
onPress={handlePayment}
disabled={loading}
/>
{error && <Text style={{ color: "red" }}>{error}</Text>}
{paymentInfo && <Text>Amount: {paymentInfo.data.amount.value}</Text>}
</View>
);
};
import { useApplePay } from "payment-sdk-react-native";
const ApplePayComponent = () => {
const { loading, error, validateMerchant } = useApplePay({ sdk });
const handleApplePayValidation = async (validationURL: string) => {
await validateMerchant(validationURL);
};
// Use with Apple Pay button implementation
};
Main SDK class for payment operations.
initializePayment(product, paymentToken)
- Get payment informationexecutePayment(product, paymentToken, payload)
- Process paymentgetPaymentStatus(product, paymentToken)
- Get payment statusvalidateApplePayMerchant(validationURL)
- Validate Apple Pay merchantReact hook for payment operations.
Returns:
loading
- Loading stateerror
- Error messagepaymentInfo
- Payment informationpaymentResult
- Payment resultinitializePayment()
- Initialize payment functionexecutePayment()
- Execute payment functiongetPaymentStatus()
- Get status functionReact hook for Apple Pay operations.
Returns:
loading
- Loading stateerror
- Error messageapplePaySession
- Apple Pay session datavalidateMerchant()
- Validate merchant functionEPaymentProduct.E_API
- API-based paymentsEPaymentProduct.E_LINKS
- Link-based paymentsEPaymentMethods.VISA
EPaymentMethods.MASTERCARD
EPaymentMethods.APPLE_PAY
EPaymentMethods.GOOGLE_PAY
EPaymentMethods.KNET
The SDK provides comprehensive error handling:
try {
const result = await sdk.executePayment(product, token, payload);
if (result.success) {
// Payment successful
console.log("Payment completed:", result.data);
} else {
// Payment failed
console.error("Payment failed:", result.error);
}
} catch (error) {
console.error("SDK error:", error.message);
}
The SDK is fully typed with TypeScript. All interfaces and types are exported for use in your application.
MIT
payment-sdk-react-native/ ├── src/ │ ├── core/PaymentSDK.ts # Main SDK class │ ├── services/ │ │ ├── httpClient.ts # HTTP client for API calls │ │ └── paymentService.ts # Payment logic extracted from your app │ ├── hooks/ │ │ ├── usePayment.ts # React hook for payments │ │ └── useApplePay.ts # React hook for Apple Pay │ ├── types/payment.types.ts # All TypeScript interfaces │ ├── constants/endpoints.ts # API endpoints and regex │ └── index.ts # Main exports ├── example/App.tsx # Complete usage example ├── package.json # NPM package config ├── tsconfig.json # TypeScript config └── README.md # Documentation
FAQs
React Native SDK for payment processing with E_API and E_LINKS support
The npm package @abdelrahman.rabie/payment-sdk-react-native receives a total of 2 weekly downloads. As such, @abdelrahman.rabie/payment-sdk-react-native popularity was classified as not popular.
We found that @abdelrahman.rabie/payment-sdk-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.