Example description: Payment with installment
- Payments in 3 times every 1 day
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 paymentMethod[]='INSTALLMENT' \
-F installment[iterationCount]='3' \
-F installment[intervalCount]='1' \
-F installment[intervalUnit]='DAY' \
-F currency='EUR' \
-F totalAmount= \
-F breakdown[]='{"amount":,"email":""}' \
-F scenarioId='' \
$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(
'paymentMethod[]' => 'INSTALLMENT',
'installment[iterationCount]' => '3',
'installment[intervalCount]' => '1',
'installment[intervalUnit]' => 'DAY',
'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>
</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>
<input data-centralpay="isPartial" type="checkbox" id="isPartial" name="isPartial" ng-model="isPartial" ng-init="isPartial=false" data-form="isPartial" style="display:none;">
<input data-centralpay="scenarioId" type="text" id="scenarioId" name="scenarioId" ng-model="scenarioId" data-form="scenarioId" style="display: none">
<input type="hidden" name="currency" value="EUR" ng-model="currency" ng-init="currency='EUR'" />
<input type="hidden" name="paymentMethod" value="INSTALLMENT" ng-model="paymentMethod" ng-init="paymentMethod='INSTALLMENT'" />
<input type="hidden" name="intervalUnit" value="DAY" ng-model="intervalUnit" ng-init="intervalUnit='DAY'" />
<input type="hidden" name="intervalCount" value="1" ng-model="intervalCount" ng-init="intervalCount='1'" />
<input type="hidden" name="iterationCount" value="3" ng-model="iterationCount" ng-init="iterationCount='3'" />
<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>
×