WS-RESTRICTED_API Host [RESTRICTED_API] : D5290-staging

<back to all web services

payment_webhook

Payment

Paiements : webhooks - retour des formulaires de règlements

The following routes are available for this service:
GET,POST/payment_webhook/{payment_target}/{payment_run_mode}/{webhook_callback}Paiements : webhooks - retour des formulaires de règlements
<?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};


enum eapi_payment_target_enum : string
{
    case LABANQUEPOSTALE = 'LABANQUEPOSTALE';
    case PAYBOX = 'PAYBOX';
    case MILLIET = 'MILLIET';
}

enum eapi_payment_run_mode_enum : string
{
    case TEST = 'TEST';
    case LIVE = 'LIVE';
    case FORCE_LIVE = 'FORCE_LIVE';
}

/** @description Paiements : webhooks - retour des formulaires de règlements */
// @Api(Description="Paiements : webhooks - retour des formulaires de règlements")
class payment_webhook implements JsonSerializable
{
    public function __construct(
        /** @var eapi_payment_target_enum|null */
        public ?eapi_payment_target_enum $payment_target=null,
        /** @var eapi_payment_run_mode_enum|null */
        public ?eapi_payment_run_mode_enum $payment_run_mode=null,
        /** @var string|null */
        public ?string $webhook_callback=null,
        /** @var string|null */
        public ?string $type=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['payment_target'])) $this->payment_target = JsonConverters::from('eapi_payment_target_enum', $o['payment_target']);
        if (isset($o['payment_run_mode'])) $this->payment_run_mode = JsonConverters::from('eapi_payment_run_mode_enum', $o['payment_run_mode']);
        if (isset($o['webhook_callback'])) $this->webhook_callback = $o['webhook_callback'];
        if (isset($o['type'])) $this->type = $o['type'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->payment_target)) $o['payment_target'] = JsonConverters::to('eapi_payment_target_enum', $this->payment_target);
        if (isset($this->payment_run_mode)) $o['payment_run_mode'] = JsonConverters::to('eapi_payment_run_mode_enum', $this->payment_run_mode);
        if (isset($this->webhook_callback)) $o['webhook_callback'] = $this->webhook_callback;
        if (isset($this->type)) $o['type'] = $this->type;
        return empty($o) ? new class(){} : $o;
    }
}

PHP payment_webhook DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /payment_webhook/{payment_target}/{payment_run_mode}/{webhook_callback} HTTP/1.1 
Host: milliet.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"payment_target":"LABANQUEPOSTALE","payment_run_mode":"TEST","webhook_callback":"String","type":"String"}