Example description: Single payment with 3DS
Fill the form with a valid email (or use default values clicking on the EXAMPLE DATA button).
paymentRequestId :
- Curl
- PHP
curl -v paymentRequest \
-u '1c1b28f2-a84b-4b30:VJezNXV9Wz#A' \
-F pointOfSaleId='9c214a4e-582e-4c60-8921-1b7dd334a38b' \
-F paymentMethod[]='TRANSACTION' \
-F currency='EUR' \
-F totalAmount= \
-F breakdown[]='{"amount":,"email":""}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://test-api.centralpay.net/v2/rest/paymentRequest');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$post = array(
'pointOfSaleId' => '9c214a4e-582e-4c60-8921-1b7dd334a38b',
'paymentMethod[]' => 'TRANSACTION',
'currency' => 'EUR',
'totalAmount' => '',
'breakdown[]' => '{"amount":,"email":""}'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_USERPWD, '1c1b28f2-a84b-4b30' . ':' . 'VJezNXV9Wz#A');
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
<form method="post" data-centralpay="form" action="https://example.centralpay.net/v2/process/request">
<div data-centralpay="errors"></div>
<div class="row mx-0 text-center">
<div class="col-4 px-0">
<div class="card card-offer">
<div class="card-header">
<label for="amount0">
<span data-display="offer-name">Basic</span>
</label>
</div>
<div class="card-body">
<p class="text-price">
<span data-display="amount">19</span>
<span data-display="currency-symbol">,00€</span>
</p>
<input type="radio" name="amount" id="amount0" value="1900" data-select="amount" required ng-model="totalAmount"/>
</div>
</div>
</div>
<div class="col-4 px-0">
<div class="card card-offer">
<div class="card-header">
<label for="amount1">
<span data-display="offer-name">Standard</span>
</label>
</div>
<div class="card-body">
<p class="text-price">
<span data-display="amount">290</span>
<span data-display="currency-symbol">,00€</span>
</p>
<input type="radio" name="amount" id="amount1" value="29000" data-select="amount" ng-model="totalAmount"/>
</div>
</div>
</div>
<div class="col-4 px-0">
<div class="card card-offer">
<div class="card-header">
<label for="amount2">
<span data-display="offer-name">Premium</span>
</label>
</div>
<div class="card-body">
<p class="text-price">
<span data-display="amount">3900</span>
<span data-display="currency-symbol">,00€</span>
</p>
<input type="radio" name="amount" id="amount2" value="390000" data-select="amount" ng-model="totalAmount"/>
</div>
</div>
</div>
<p data-form="main-description" class="mt-3 mb-0">Breakdown</p>
<div class="form-row" data-form="breakdown-validation" data-toggle="popover-example-data">
<div class="form-group col-12">
<div class="has-feedback input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<div class="ico ico-envelope"></div>
</div>
</div>
<input data-centralpay="email_1" type="email" name="email_1" ng-model="email" autocomplete="off" class="form-control" data-form="email_1" placeholder="E-mail" required="required"/>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-12">
<div class="has-feedback form-check">
<input data-centralpay="isPartial" type="checkbox" id="isPartial" class="form-check-input"name="isPartial" ng-model="isPartial" ng-init="isPartial=false"data-form="isPartial">
<label for="isPartial" class="form-check-label">Free amount: allow your customer to choose an amount to pay with several cards</label>
<input data-centralpay="scenarioId" type="text" id="scenarioId" class="d-none" name="scenarioId" ng-model="scenarioId" data-form="scenarioId">
</div>
</div>
</div>
<input type="hidden" name="pointOfSaleId" value="9c214a4e-582e-4c60-8921-1b7dd334a38b"ng-model="pointOfSaleId" ng-init="pointOfSaleId='9c214a4e-582e-4c60-8921-1b7dd334a38b'"/>
<input type="hidden" name="currency" value="EUR" ng-model="currency" ng-init="currency='EUR'"/>
<input type="hidden" name="paymentMethod" value="TRANSACTION" ng-model="paymentMethod" ng-init="paymentMethod='TRANSACTION'"/>
<div class="text-center mt-2">
<button class="btn btn-cpay" type="submit" value="submit" data-form="submit" data-toggle="popover" data-placement="bottom" data-trigger="hover">
<div class="np-button-content">
<span data-display="submit-value">Pay</span>
<div class="np-loader"></div>
</div>
</button>
</div>
</form>
×