Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

payfast javascript

<input type="hidden" name="subscription_type" value="2"> 
Comment

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())
Comment

payfast javascript integration

<form action="https://www.payfast.co.za/eng/process" method="POST">
          <input type="hidden" name="merchant_id" value="...." />
          <input type="hidden" name="merchant_key" value="....." />
          <input type="hidden" name="return_url" value="https://yourApplication/paymentscreen" />
          <input type="hidden" name="cancel_url" value="https://yourApplication/paymentscreen" />
          <input type="hidden" name="notify_url" value="https://yourApplication/paymentscreen" />
          <input type="hidden" name="name_first" value={name} />
          <input type="hidden" name="email_address" value={email} />
          <input type="hidden" name="m_payment_id" value={unique_id_for_user} />
          <input type="hidden" name="amount" value={amount} />
          <input type="hidden" name="item_name" value={payment_name} />
          <input type="hidden" name="item_description" value={description_if_any} />
          <input type="hidden" name="custom_int1" value={custome_integer_value_if_any} />
          <input type="hidden" name="custom_str1" value={custome_string_value_if_any} />
          <input type="hidden" name="custom_str2" value={custome_string_value_if_any} />
          <input type="hidden" name="passphrase" value="passphrase" />
          <input type="hidden" name="signature" value={MD5Signature} />
          <div className="row" style={{display: 'flex', justifyContent: 'center', alignItems: 'center'}}>
            <div className="col-lg-6">
              <img alt="payfast" src="../public/upload/payfastpaynow.png" vspace="3" width="100%" height="100%" />
            </div>
            <div className="col-lg-6">
                <input style={{marginRight: 20, float: 'right'}} name="disable" type="submit" disabled={isEnablePayment} width="100%" height="100%" alt="Submit" align="bottom" value="Purchase" />
            </div>
          </div>
        </form>
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to call mixin in vuex 
Javascript :: js event handlers 
Javascript :: email valid javascript 
Javascript :: react fetch data in for loop 
Javascript :: js class 
Javascript :: jquery fedein background color 
Javascript :: The reduce() method executes a reducer function on each element of the array and returns a single output value. 
Javascript :: how to use react-native-vector-icons 
Javascript :: array.length in mongoose query 
Javascript :: global scope js 
Javascript :: canvas setup 
Javascript :: moment js date between two dates 
Javascript :: javascript addeventlistener click multiple elements 
Javascript :: get latlong of address in here map api javascript 
Javascript :: chrome.browseraction.getbadgetext 
Javascript :: Warning: Internal React error: Expected static flag was missing. Please notify the React team. 
Javascript :: store object in input value 
Javascript :: filter buttons react 
Javascript :: join on JSON field 
Javascript :: How to change height of bottom material tab navigator from react-naviagtion 
Javascript :: add marker on map geocoder result mapbox 
Javascript :: upload bloob javascript 
Javascript :: React Native drawer navigation screen header title and buttons 
Javascript :: reset event listener javascript 
Javascript :: speech to text in js 
Javascript :: case switch javascript 
Javascript :: Iterate with JavaScript Do...While Loops 
Javascript :: js include another 
Javascript :: javascript keylogger 
Javascript :: inline style to change background color javascript 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =