IPP Europe

SimpleCheckout Integration

You are here:

SimpleCheckout is a PCI Level 1 compliant payment-form solution, which is fairly simple to set up and easy to personalize.

The payment is part of three straight forward steps.

Create the Checkout ID

Send the request on a server-to-server to let IPP know about the incoming payment request. This ensures an always safe data-transfer of critical details.

Show the payment form

Show the payment form on your checkout page, product page or anywhere else where the customer should be able to initiate the payment procedure, and let the customer submit the payment information.

Confirm payment

Confirm the payment details received through a POST call contains the data you expect.

Create the Checkout ID

To initiate the payment, we need to perform a server-to-server request containing all critical details, including currency, order-id, amount and IPN related to this specific payment.

The response with a successful request containing a unique Checkout ID and encryption key.

Initiate the Payment Form

				
					function request($company_id,$payment_key) {
	$url = "https://api.ippworldwide.com/payments/checkout_id";
    $data["id"] = $company_id;
    $data["key2"] = $payment_key;
    $data["currency"] = "EUR";
    $data["amount"] = 800; // 8.00
    $data["order_id"] = "Order ID";
    $data["test"] = false;
    $data["transaction_type"] = "ECOM";
    $data["ipn"] = "";
    $data["origin"] = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$responseData = curl_exec($ch);
	if(curl_errno($ch)) {
		return curl_error($ch);
	}
	curl_close($ch);
	return json_decode($responseData);
}
$responseData = request("", "");


$data_url = $responseData->checkout_id;
$cryptogram = $responseData->cryptogram;

				
			

To create the payment form you need to add two lines of code.

				
					<?php
// Insert the request function here.
?>
<script src="https://pay.ippeurope.com/pay.js?checkoutId=<?php echo $data_url; ?>&cryptogram=<?php echo $cryptogram; ?>"></script>
<form action="confirmedpayment.php" class="paymentWidgets" data-brands="VISA MASTER" data-theme="divs"></form>
				
			

After the payment have been completed, the form-action will receive a POST request containing a transaction_id and transaction_key. These values are crucial to store.

Validate the payment have been confirmed.

When you have received the transaction_id and transaction_key, you can validate the payment have been confirmed and that you have received an ACK (Acknowledgement) on the payment request.

				
					function confirm_request($company_id,$payment_key,$transaction_id,$transaction_key) {
	$url = "https://api.ippworldwide.com/payments/status";
    $data["id"] = $company_id;
    $data["key2"] = $payment_key;
    $data["transaction_id"] = $transaction_id;
    $data["transaction_key"] = $transaction_key;
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$responseData = curl_exec($ch);
	if(curl_errno($ch)) {
		return curl_error($ch);
	}
	curl_close($ch);
	return json_decode($responseData);
}
$responseData = confirm_request("", "", $_POST["transaction_id"], $_POST["transaction_key"]);

print_r($responseData);

				
			

Next steps

SimpleCheckout is build to accept payments in a secure and safe environment. When the payment have been processed, you can perform captions, voids, refunds and calculations through our backoffice operations. Please follow our backoffice operations documentation on this subject.