regis

<back to all web services

BeanstreamPaymentVerificationRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Beanstream/Payment/{uuid}/Verify
<?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 FinancePaymentResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $paymentUUID=null,
        /** @var string|null */
        public ?string $order_id=null,
        /** @var int */
        public int $external_payment_id=0,
        /** @var DateTime */
        public DateTime $added_date=new DateTime(),
        /** @var int */
        public int $regent_id=0,
        /** @var string|null */
        public ?string $uuid=null,
        /** @var float */
        public float $amount=0.0,
        /** @var string|null */
        public ?string $payment_type=null,
        /** @var bool|null */
        public ?bool $is_pushed_to_gl=null,
        /** @var string|null */
        public ?string $current_status=null,
        /** @var DateTime|null */
        public ?DateTime $current_status_date=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['paymentUUID'])) $this->paymentUUID = $o['paymentUUID'];
        if (isset($o['order_id'])) $this->order_id = $o['order_id'];
        if (isset($o['external_payment_id'])) $this->external_payment_id = $o['external_payment_id'];
        if (isset($o['added_date'])) $this->added_date = JsonConverters::from('DateTime', $o['added_date']);
        if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
        if (isset($o['uuid'])) $this->uuid = $o['uuid'];
        if (isset($o['amount'])) $this->amount = $o['amount'];
        if (isset($o['payment_type'])) $this->payment_type = $o['payment_type'];
        if (isset($o['is_pushed_to_gl'])) $this->is_pushed_to_gl = $o['is_pushed_to_gl'];
        if (isset($o['current_status'])) $this->current_status = $o['current_status'];
        if (isset($o['current_status_date'])) $this->current_status_date = JsonConverters::from('DateTime', $o['current_status_date']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->paymentUUID)) $o['paymentUUID'] = $this->paymentUUID;
        if (isset($this->order_id)) $o['order_id'] = $this->order_id;
        if (isset($this->external_payment_id)) $o['external_payment_id'] = $this->external_payment_id;
        if (isset($this->added_date)) $o['added_date'] = JsonConverters::to('DateTime', $this->added_date);
        if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
        if (isset($this->uuid)) $o['uuid'] = $this->uuid;
        if (isset($this->amount)) $o['amount'] = $this->amount;
        if (isset($this->payment_type)) $o['payment_type'] = $this->payment_type;
        if (isset($this->is_pushed_to_gl)) $o['is_pushed_to_gl'] = $this->is_pushed_to_gl;
        if (isset($this->current_status)) $o['current_status'] = $this->current_status;
        if (isset($this->current_status_date)) $o['current_status_date'] = JsonConverters::to('DateTime', $this->current_status_date);
        return empty($o) ? new class(){} : $o;
    }
}

class BeanstreamPaymentVerificationRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $uuid=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['uuid'])) $this->uuid = $o['uuid'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->uuid)) $o['uuid'] = $this->uuid;
        return empty($o) ? new class(){} : $o;
    }
}

PHP BeanstreamPaymentVerificationRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Beanstream/Payment/{uuid}/Verify HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<BeanstreamPaymentVerificationRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
  <uuid>String</uuid>
</BeanstreamPaymentVerificationRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<FinancePaymentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses">
  <added_date>0001-01-01T00:00:00</added_date>
  <amount>0</amount>
  <current_status>String</current_status>
  <current_status_date>0001-01-01T00:00:00</current_status_date>
  <external_payment_id>0</external_payment_id>
  <is_pushed_to_gl>false</is_pushed_to_gl>
  <order_id>String</order_id>
  <paymentUUID>String</paymentUUID>
  <payment_type>String</payment_type>
  <regent_id>0</regent_id>
  <uuid>String</uuid>
</FinancePaymentResponse>