Initializing the payment request

When the buyer validates his or her order, the application generates a "payload" containing the details of the shopping cart, the buyer contact information, the shipping details, etc...

The provided example uses the following data:

	"email": "",
	"orderId": "myOrderId-1",
	"amount": "200",
	"currency": "978",
	"mode": "TEST",
	"language": "fr",
	"cardType": ""

The mobile application transmits the payment request to the merchant server via a POST request method.

Excerpt from the sample code for Android:

val conn = URL(serverUrl).openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.setRequestProperty("Content-type", "application/json")
conn.setRequestProperty("Accept", "*/*")
conn.doInput = true
conn.doOutput = true
conn.connectTimeout = 15000
val os = conn.outputStream
val writer = BufferedWriter(OutputStreamWriter(os, "UTF-8"))
val out = OutputStreamWriter(conn.outputStream)				

Excerpt from the sample code for iOS:

/// Build an URLRequest according required payment information : server url, email, amount, mode, lang
/// - Returns: URLRequest object
func buildRequest() -> URLRequest? {
	let serverUrl: NSURL = NSURL(string: PayZenPayment.SERVER_URL)!
	var urlRequest = URLRequest(url:serverUrl as URL)
	urlRequest.httpMethod = "POST"
	var params: [String: String] = ["amount": paymentInfo.amount, "currency": paymentInfo.currency, "mode": paymentInfo.mode, "language": paymentInfo.lang]
	if !{
		params["email"] =
	if !paymentInfo.cardType.isEmpty{
		params["cardType"] = paymentInfo.cardType
		let jsonParam = try params, options: [])
		urlRequest.httpBody = jsonParam
		return nil
	return urlRequest