コード例 #1
0
 * Credit Card Expiration Month
 * Credit Card Expiration Year
 * Credit Card CVV (Security Code)
 * Credit Card Owner
 */
$card = new Card('4111111111111111', '12', 2016, 123, 'Card Owner Name');
/**
 * Create new Request with params:
 *
 * Config object
 * Order object
 * Billing object
 * Delivery (or Billing object again, if you want to have the delivery address the same as the billing address)
 * User object
 */
$request = new Request($cfg, $order, $billing, $delivery, $user);
/**
 * Add the Credit Card to the Request
 */
$request->setCard($card);
/**
 * Create new API Client, passing the Config object as parameter
 */
$client = new Client($cfg);
/**
 * Will throw different Exceptions on errors
 */
try {
    /**
     * Sends the Request to ALU and returns a Response
     *
コード例 #2
0
ファイル: payByClick.php プロジェクト: PayU/alu-client-php
 * Create new CardToken with params:
 *
 * Pay by click token
 * Card CVV
 */
$cardToken = new CardToken('2943002', '277');
/**
 * Create new Request with params:
 *
 * Config object
 * Order object
 * Billing object
 * Delivery (or Billing object again, if you want to have the delivery address the same as the billing address)
 * User object
 */
$request = new Request($cfg, $order, $billing, $delivery, $user);
/**
 * Add the Card Token to the Request
 */
$request->setCardToken($cardToken);
/**
 * Create new API Client, passing the Config object as parameter
 */
$client = new Client($cfg);
/**
 * Will throw different Exceptions on errors
 */
try {
    /**
     * Sends the Request to ALU and returns a Response
     *
コード例 #3
0
 public function makeRequestHash(Request $request)
 {
     $params = $request->getRequestParams();
     return $this->computeHash($params);
 }