0.0.6 • Published 3 years ago

@miccoh/payfast-react v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

React Payfast Integration

Usage

const options = {
  merchant: {
    merchant_id: '10000100',
    merchant_key: '46f0cd694581a',
    return_url: window.location.origin + '/success',
    cancel_url: window.location.origin + '/cancelled',
    notify_url: 'https://yournotificationurl.com',
  },
  customer: {
    name_first: 'Test',
    name_last: 'Test',
    email_address: 'test@test.com',
  },
  transaction: {
    m_payment_id: 'sonme_unique_id',
    amount: 100,
    item_name: 'cookies',
    item_description: 'a bag of cookies',
  },
}

      <ReactPayfast {...payfastOptions} sandbox> //toggle the payfast sandbox with the sandbox prop
        <button type="submit">Pay Now</button> // make sure to include the submit button for the form. You can style this yourself.
      </ReactPayfast>
0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago