mobilpay / Node.js

Proof of concept - mobilPay integration in Node.js
8 stars 4 forks source link

Node.js

Proof of concept - NETOPIA integration in Node.js

Card Payment Module in nodejs

This module made to use as an example of implementation for online payment via Card

Where to send the Request

Payment Request Structure

In order to send the payment request to NETOPIA Payments , you need to encrypt the payment data on POST method and encapsulate the information using the following structure.

const data = {
  order: {
    $: {
      id: orderId,
      timestamp: date.getTime(),
      type: "card",
    },
    signature: "<your_netopia_seller_account_signature>",
    url: {
      return: "<your_return_URL>",
      confirm: "<your_confirm_URL>",
    },
    invoice: {
      $: {
        currency: currency,
        amount: amount,
      },
      details: "test plata",
      contact_info: {
        billing: {
          $: {
            type: "person",
          },
          first_name: "Test",
          last_name: "Test",
          address: "strada",
          email: "test@mobilpay.ro",
          mobile_phone: "mobilePhone",
        },
        shipping: {
          $: {
            type: "person",
          },
          first_name: "Test",
          last_name: "Test",
          address: "strada",
          email: "test@mobilpay.ro",
          mobile_phone: "mobilePhone",
        },
      },
    },
    ipn_cipher: "aes-256-cbc",
  },
};