Required role: | REGISUserRole |
POST | /Beanstream/Payment/Interac/Complete |
---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class BeanstreamInteracCompletionResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $approved=0,
/** @var string|null */
public ?string $message=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['approved'])) $this->approved = $o['approved'];
if (isset($o['message'])) $this->message = $o['message'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->approved)) $o['approved'] = $this->approved;
if (isset($this->message)) $o['message'] = $this->message;
return empty($o) ? new class(){} : $o;
}
}
class BeanstreamInteracPaymentCompletionRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $payment_method=null,
/** @var int */
public int $funded=0,
/** @var string|null */
public ?string $idebit_merchantdata=null,
/** @var string|null */
public ?string $idebit_track2=null,
/** @var string|null */
public ?string $idebit_isslang=null,
/** @var int */
public int $idebit_version=0,
/** @var string|null */
public ?string $idebit_issconf=null,
/** @var string|null */
public ?string $idebit_issname=null,
/** @var float */
public float $idebit_amount=0.0,
/** @var string|null */
public ?string $idebit_invoice=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['payment_method'])) $this->payment_method = $o['payment_method'];
if (isset($o['funded'])) $this->funded = $o['funded'];
if (isset($o['idebit_merchantdata'])) $this->idebit_merchantdata = $o['idebit_merchantdata'];
if (isset($o['idebit_track2'])) $this->idebit_track2 = $o['idebit_track2'];
if (isset($o['idebit_isslang'])) $this->idebit_isslang = $o['idebit_isslang'];
if (isset($o['idebit_version'])) $this->idebit_version = $o['idebit_version'];
if (isset($o['idebit_issconf'])) $this->idebit_issconf = $o['idebit_issconf'];
if (isset($o['idebit_issname'])) $this->idebit_issname = $o['idebit_issname'];
if (isset($o['idebit_amount'])) $this->idebit_amount = $o['idebit_amount'];
if (isset($o['idebit_invoice'])) $this->idebit_invoice = $o['idebit_invoice'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->payment_method)) $o['payment_method'] = $this->payment_method;
if (isset($this->funded)) $o['funded'] = $this->funded;
if (isset($this->idebit_merchantdata)) $o['idebit_merchantdata'] = $this->idebit_merchantdata;
if (isset($this->idebit_track2)) $o['idebit_track2'] = $this->idebit_track2;
if (isset($this->idebit_isslang)) $o['idebit_isslang'] = $this->idebit_isslang;
if (isset($this->idebit_version)) $o['idebit_version'] = $this->idebit_version;
if (isset($this->idebit_issconf)) $o['idebit_issconf'] = $this->idebit_issconf;
if (isset($this->idebit_issname)) $o['idebit_issname'] = $this->idebit_issname;
if (isset($this->idebit_amount)) $o['idebit_amount'] = $this->idebit_amount;
if (isset($this->idebit_invoice)) $o['idebit_invoice'] = $this->idebit_invoice;
return empty($o) ? new class(){} : $o;
}
}
PHP BeanstreamInteracPaymentCompletionRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Beanstream/Payment/Interac/Complete HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
payment_method: String,
funded: 0,
idebit_merchantdata: String,
idebit_track2: String,
idebit_isslang: String,
idebit_version: 0,
idebit_issconf: String,
idebit_issname: String,
idebit_amount: 0,
idebit_invoice: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { approved: 0, message: String }