Skip to content

React Native App Sample using Google Pay and Apple Pay to make payments

Notifications You must be signed in to change notification settings

marialuisacp/payment-sample-app

Repository files navigation

Sample Payment Integration App

TypeScript React React Native React Router Styled Components Yarn Swift Kotlin Jest Testing-Library GitHub CircleCI

This is a sample React Native application that demonstrates how to implement native payment methods using Apple Pay and Google Pay. The app provides a user-friendly interface to showcase the payment process and handle transactions seamlessly.

explication-image explication-image

Note: Make sure you have completed the React Native - Environment Setup instructions till "Creating a new application" step, before proceeding.

Table of Contents

Install Dependencies

  1. Clone the repository:

    git clone https://github.com/yourusername/payment-integration-app.git
    cd payment-integration-app
    
  2. Install dependencies:

    npm install
    
  3. Link native dependencies (if required):

    npx react-native link
    
  4. Set up the project for iOS:

    Navigate to the ios directory and install CocoaPods:

    cd ios
    pod install
    
  5. Run the app:

    For iOS:

    npx react-native run-ios
    

    For Android:

    npx react-native run-android
    

Features

  • Support for Apple Pay and Google Pay
  • Simple and intuitive user interface
  • Demonstration of payment processing and response handling
  • Example transactions for testing purposes

Technologies Used

  • React Native - A framework for building native apps using React

Usage

  1. Open the app on your device or emulator.
  2. Choose the payment method (Apple Pay or Google Pay).
  3. Follow the prompts to complete a transaction.

Configuration

Apple Pay

  1. Ensure you have an Apple Developer account.
  2. Set up Apple Pay in your Xcode project.
  3. Update your merchant identifier and add the necessary capabilities in Xcode.

Google Pay

  1. Ensure you have a Google Developer account.
  2. Configure your Google Pay API in the Google Developer Console.
  3. Add the necessary permissions in your AndroidManifest.xml.

Testing

  • Use the sandbox environments provided by Apple Pay and Google Pay for testing transactions.
  • Make sure to test on actual devices, as emulators may not fully support payment features.

Contributing

Contributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

React Native App Sample using Google Pay and Apple Pay to make payments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published