コード例 #1
0
        <input type="text" class="form-control" id="language" name="language" value="<?php 
echo $language;
?>
">
    </div>
    <div class="form-group">
        <label for="amount">Amount</label>
        <input type="number" class="form-control" id="amount" name="amount" value="<?php 
echo $amount;
?>
">
    </div>
    <button type="submit" class="btn btn-default">Submit</button>
</form>
<?php 
$reducer = new \Icepay\Api\PaymentMethod\Reducer();
if ($currency !== null) {
    $reducer->currency($currency);
}
if ($country !== null) {
    $reducer->country($country);
}
if ($language !== null) {
    $reducer->language($language);
}
if ($amount !== null) {
    $reducer->amount($amount);
}
responseWrapper($reducer, function (\Icepay\Api\PaymentMethod\Reducer $reducer) use($client) {
    return $reducer->reduce($client->getPaymentMethods());
});
コード例 #2
0
ファイル: payment_init.php プロジェクト: boekkooi/icepay
<?php

require __DIR__ . '/common.php';
$request = new \Icepay\Api\Soap\DataContract\CheckoutRequestType(time(), 1000, 'EUR', 'NL', 'NL', $_SERVER['REMOTE_ADDR'], 'IDEAL', 'ING');
$request->setReference("My Sample Website")->setDescription("My Sample Payment");
responseWrapper($request, function ($request) use($client) {
    return $client->initializePayment($request);
});
コード例 #3
0
?>
<form method="get">
    <input name="f" type="hidden" value="<?php 
echo basename(__FILE__);
?>
" />
    <div class="form-group">
        <label for="consumerID">Consumer ID</label>
        <input type="number" class="form-control" id="consumerID" name="consumerID" value="<?php 
echo isset($_GET['consumerID']) ? $_GET['consumerID'] : 123456;
?>
">
    </div>
    <div class="form-group">
        <label for="orderID">Order ID</label>
        <input type="number" class="form-control" id="orderID" name="orderID" value="<?php 
echo isset($_GET['orderID']) ? $_GET['orderID'] : time();
?>
">
    </div>
    <button type="submit" class="btn btn-default">Submit</button>
</form>
<?php 
if (empty($_GET['orderID']) || empty($_GET['consumerID'])) {
    return;
}
$request = new \Icepay\Api\Soap\DataContract\AutomaticCheckoutRequestType($_GET['consumerID'], $_GET['orderID'], 1000, 'EUR', 'NL', 'NL', $_SERVER['REMOTE_ADDR'], 'CREDITCARD', 'CCAUTOCHECKOUT');
$request->setReference("My Sample Website")->setDescription("My Sample Payment");
responseWrapper($request, function ($request) use($client) {
    return $client->requestRecurringPayment($request);
});
コード例 #4
0
ファイル: payment_get.php プロジェクト: boekkooi/icepay
<?php

require __DIR__ . '/common.php';
?>
<form method="get">
    <input name="f" type="hidden" value="<?php 
echo basename(__FILE__);
?>
" />
    <div class="form-group">
        <label for="paymentId">Payment ID</label>
        <input type="number" class="form-control" id="paymentId" name="paymentId">
    </div>
    <button type="submit" class="btn btn-default">Submit</button>
</form>
<?php 
if (!isset($_GET['paymentId']) || (string) intval($_GET['paymentId']) !== $_GET['paymentId']) {
    return;
}
$paymentId = intval($_GET['paymentId']);
responseWrapper($paymentId, function ($paymentId) use($client) {
    return $client->getPayment($paymentId);
});
コード例 #5
0
<?php

require __DIR__ . '/common.php';
responseWrapper(null, function () use($client) {
    return $client->getPaymentMethods();
});