Skip to content

Conversation

Anurag-05-prog
Copy link
Contributor

@Anurag-05-prog Anurag-05-prog commented Feb 19, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

EFT is a bank redirect payment method. This PR involves adding EFT as a payment method in the Hyperswitch SDK.

EFT accepts ZAR as currency.

Implementation Summary

  • Added EFT as a payment method in PaymentDetails.res, defining its type, icon, and display name.
  • Updated PaymentMethodsRecord.res to include EFT in paymentMethodsFields.
  • Modified PaymentModeType.res to add EFT as a payment type, map "eft" to EFT, and include it in defaultOrder for proper display sequencing.
  • Generated a JSON structure for EFT in PaymentBody.res, temporarily setting the provider name as ozow.
  • Added EFT as a bank payment method type in PaymentUtils.res.

How did you test it?

  1. Set up the Hyperswitch Backend locally using this documentation.
  2. Used the cURL commands provided in this PR in Postman to:
    • Set up a merchant account
    • Generate Hyperswitch API keys
    • Create a Paystack connector
  3. Setup Hyperswitch SDK locally using this documentation
    • Gave this paymentData in server.js file to imitate Payments - Create call:
      const paymentData = {
        "amount": 6540,
        "currency": "ZAR",
        "confirm": false,
        "amount_to_capture": 6540,
        "customer_id": "StripbmnxeCustomer",
        "email": "[email protected]",
        "description": "Its my first payment request",
        "return_url": "https://google.com",
        "payment_method": "bank_redirect",
        "payment_method_type": "eft",
        "payment_method_data": {
          "bank_redirect": {
            "eft": {
              "provider": "ozow"
            }
          }
        }
      };
  4. Ran the application on localhost, initiated a payment intent, and manually tested EFT by clicking the Pay Now button.

Screen recoding of the test:
https://github.com/user-attachments/assets/4668f766-50f4-4700-86ac-9e5779a68794

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

Copy link

semanticdiff-com bot commented Feb 19, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  public/icons/orca.svg  0% smaller
  src/PaymentDetails.res Unsupported file format
  src/Payments/PaymentMethodsRecord.res Unsupported file format
  src/Types/PaymentModeType.res Unsupported file format
  src/Utilities/PaymentBody.res Unsupported file format
  src/Utilities/PaymentUtils.res Unsupported file format

Copy link
Contributor

@PritishBudhiraja PritishBudhiraja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add videos and a description for the following payment method. Has the Backend PR been merged for this payment method?

@PritishBudhiraja PritishBudhiraja added the Ready for Review PR with label Ready for Review should only be reviewed. label Mar 17, 2025
sakksham7
sakksham7 previously approved these changes Mar 17, 2025
@PritishBudhiraja PritishBudhiraja merged commit 976dc6f into main Mar 17, 2025
5 of 6 checks passed
@PritishBudhiraja PritishBudhiraja deleted the feat/eft-payment-method branch March 17, 2025 10:47
@github-actions github-actions bot added Closed Label will be automatically added when the PR will get merged to main and removed Ready for Review PR with label Ready for Review should only be reviewed. labels Mar 17, 2025
Shivam25092001 pushed a commit that referenced this pull request Mar 17, 2025
# [0.118.0](v0.117.7...v0.118.0) (2025-03-17)

### Features

* add EFT as a payment method ([#910](#910)) ([976dc6f](976dc6f)), closes [Anurag-Sin#WPMHJ5619](https://github.com/Anurag-Sin/issues/WPMHJ5619)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Label will be automatically added when the PR will get merged to main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add EFT as a Payment Method Integrate EFT into Hyperswitch SDK South African EFT Payment Method Integration via Paystack
4 participants