npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

payfort-custom-integration

v1.0.0

Published

Unofficial Custom merchant page integration

Downloads

3

Readme

Payfort Custom merchant page integration

Payfort standard merchant page integration template offers a customizable but rapid way to start accepting payments on your website. However, you can achieve an even greater degree of customization by building your own payment form to accommodate your unique use-case, business logic, or technical requirements.

How does it work in practice?

If you choose the custom merchant page integration route you are responsible to code a form that captures your customer's payment details and that submits these details to our server using defined parameters. You integrate your custom form on your checkout page.

There is no need to change the look and feel of your merchant site. You can customize the iframe to match your site. Simply insert the Amazon Payment Services iframe in the section of your page where you want to accept credit card payments.

In practice, custom merchant page integration works like this:

  • You develop a custom payment form that collects the credit card details including card number, expiry date, CVV number.
  • Your customer fills in their card details in the custom payment form on your checkout page.
  • The Amazon Payment Services server receives the card details and attempts to authorize the customer's payment.
  • Amazon Payment Services sends a confirmation to your checkout page to complete the transaction, this confirmation includes a token.
  • You use the token to complete the Authorization or Purchase operation.

Install

npm install payfort-custom-integration --save

And here's some code! :+1:

// Initialize the payfort package
const payfort = require("payfort-custom-integration");
// Create client for payment
const client = payfort.createClient("development", {
  access_code : "your_access_code",
  merchant_identifier : "your_merchant_identifier",
  passphrase : "your_passphrase"
  purchase_url : "send this only to override default urls"
});
// Purchase data object sample
const purchaseData = {
  "amount": data.amount,
  "command" : "PURCHASE", // PURCHASE OR AUTHORIZATION
  "currency": data.currency,
  "customer_email": data.email,
  "customer_name": data.name,
  "language": "en",
  "return_url": "https://your_website.com/callback-page",
  "merchant_reference": data.order_id
};
//Send payment request
payfort.sendRequest(client, purchaseData)

Bugs or improvements

Every project needs improvements, Feel free to report any bugs or improvements. Pull requests are always welcome.

Advertise for Job/Work Contract

I am open for a good job or work contract. You can contact me directly on my email ([email protected]) or on my skype ujjwalbera.

Buy me a Coffee

Hi! I'm Ujjwal Bera, I'm an open source enthusiast and devote my free time to building projects in this field.

I'm the creator and maintainer of payfort, MNode and SNode.

I'm doing my best to provide you a good experience when using my apps, so if you like what I'm doing and wish to say "thanks!", You can appreciate me or my hard work and time spent to create this helpful structure with buying me a coffee.