Have more information about this topic. Apparently custom forms have a "Call REST Resource" submission action. This appears to be what I need to encode the form data into a JSON format. Possible issue is that I need an additional field for the Basic Auth - the merchant ID number, then the username+password+merchantID will need to be encoded in Base 64. I also need to have the form data JSON be formatted in a specific way for BPoint to recognise and process,
For example:
{
"HppParameters" : {
"TokeniseTxnCheckBoxDefaultValue" : true
},
"ProcessTxnData" : {
"Action" : "payment",
"Amount" : 0,
"Currency" : "AUD",
"Customer" : {
"Address" : {
"AddressLine1" : "123 Fake Street",
"AddressLine2" : "",
"AddressLine3" : "",
"City" : "Melbourne",
"CountryCode" : "AUS",
"PostCode" : "3000",
"State" : "VIC"
},
"ContactDetails" : {
"EmailAddress" : "john.smith@email.com",
"FaxNumber" : "",
"HomePhoneNumber" : "",
"MobilePhoneNumber" : "",
"WorkPhoneNumber" : ""
},
"CustomerNumber" : "1234",
"PersonalDetails" : {
"DateOfBirth" : "",
"FirstName" : "John",
"LastName" : "Smith",
"MiddleName" : "",
"Salutation" : "Mr"
}
},
"MerchantReference" : "test merchant ref",
"Order" : {
"BillingAddress" : {
"Address" : {
"AddressLine1" : "",
"AddressLine2" : "",
"AddressLine3" : "",
"City" : "",
"CountryCode" : "",
"PostCode" : "",
"State" : ""
},
"ContactDetails" : {
"EmailAddress" : "",
"FaxNumber" : "",
"HomePhoneNumber" : "",
"MobilePhoneNumber" : "",
"WorkPhoneNumber" : ""
},
"PersonalDetails" : {
"DateOfBirth" : "",
"FirstName" : "",
"LastName" : "",
"MiddleName" : "",
"Salutation" : ""
}
},
"OrderItems" : [{
"Comments" : "",
"Description" : "",
"GiftMessage" : "",
"PartNumber" : "",
"ProductCode" : "",
"Quantity" : 1,
"SKU" : "",
"ShippingMethod" : "",
"ShippingNumber" : "",
"UnitPrice" : 100
}, {
"Comments" : "",
"Description" : "",
"GiftMessage" : "",
"PartNumber" : "",
"ProductCode" : "",
"Quantity" : 1,
"SKU" : "",
"ShippingMethod" : "",
"ShippingNumber" : "",
"UnitPrice" : 100
}],
"ShippingAddress" : {
"Address" : {
"AddressLine1" : "",
"AddressLine2" : "",
"AddressLine3" : "",
"City" : "",
"CountryCode" : "",
"PostCode" : "",
"State" : ""
},
"ContactDetails" : {
"EmailAddress" : "",
"FaxNumber" : "",
"HomePhoneNumber" : "",
"MobilePhoneNumber" : "",
"WorkPhoneNumber" : ""
},
"PersonalDetails" : {
"DateOfBirth" : "",
"FirstName" : "",
"LastName" : "",
"MiddleName" : "",
"Salutation" : ""
}
}
},
"Crn1" : "test Crn1",
"Crn2" : "test Crn2",
"Crn3" : "test Crn3",
"BillerCode" : null,
"TokenisationMode" : 3,
"TestMode" : false,
"SubType" : "single",
"Type" : "internet",
"FraudScreeningDeviceFingerPrint" : null,
"EmailAddress" : null,
"AmexExpressCheckout" : false
},
"RedirectionUrl" : "http://www.slq.qld.gov.au",
"WebHookUrl" : null
}
Specifically the parameters of HppParameters, ProcessTxnData, MerchantReference, BillerCode, RedirectionUrl and a few more. I assume I could set up hidden form fields to contain this information to push into the JSON object. Would the process involve collecting the form field data as an array and then making a JSON object from it, i.e.
var formData = JSON.stringify($("#myForm").serializeArray());