Skip to content

Commit

Permalink
Add DecryptPaymentDataRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
czigor committed Jan 25, 2018
1 parent 920a4b2 commit b6be85d
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/DecryptPaymentDataRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace CommerceGuys\AuthNet;

use GuzzleHttp\Client;
use CommerceGuys\AuthNet\Request\RequestInterface;
use CommerceGuys\AuthNet\DataTypes\OpaqueData;

/**
* Use this method to decrypt the VISA Checkout data.
*
* @link http://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-credit-card
*/
class DecryptPaymentDataRequest extends BaseApiRequest
{
protected $opaqueData;
protected $refId = '';
protected $callId = '';

public function __construct(
Configuration $configuration,
Client $client,
OpaqueData $opaqueData = null,
$refId,
$callId
) {
parent::__construct($configuration, $client);
$this->opaqueData = $opaqueData;
$this->refId = $refId;
$this->callId = $callId;
}

protected function attachData(RequestInterface $request)
{
$request->addDataType($this->opaqueData);
$request->addData('refId', $this->refId);
$request->addData('callId', $this->callId);
}
}

0 comments on commit b6be85d

Please sign in to comment.