Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

payfast javascript integration

const params = new URLSearchParams({
  merchant_id: "....",
  merchant_key: "....",
  return_url: "https://yourApplication/paymentscreen",
  cancel_url: "https://yourApplication/paymentscreen",
  notify_url: "https://yourApplication/paymentscreen",
  name_first: name,
  email_address: email,
  m_payment_id: unique_id_for_user,
  amount: amount,
  item_name: payment_name,
  item_description: description_if_any,
  custom_int1: custome_integer_value_if_any,
  custom_str1: custome_string_value_if_any,
  custom_str2: custome_string_value_if_any,
  passphrase: passphrase_set_in_payfast_account.
});

// Create an MD5 signature of it.
const MD5Signature = md5(params.toString())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #payfast #javascript #integration
ADD COMMENT
Topic
Name
9+5 =