class ApiPayIns extends ApiBase (View source)

Class to management MangoPay API for pay-ins

Properties

protected MangoPayApi $_root

Root/parent instance that holds the OAuthToken and Configuration instance

from  ApiBase

Methods

mixed
getLogger()

No description

from  ApiBase
__construct($root)

Constructor

from  ApiBase
string
GetRequestUrl(string $key)

Get URL for REST Mango Pay API

from  ApiBase
GetRequestType(string $key)

Get request type for REST Mango Pay API

from  ApiBase
object
CreateObject(string $methodKey, object $entity, object $responseClassName = null, string $entityId = null, $subEntityId = null, $idempotencyKey = null)

Create object in API

from  ApiBase
object
GetObject(string $methodKey, object $responseClassName, $firstEntityId = null, $secondEntityId = null, $thirdEntityId = null, $clientIdRequired = true)

Get entity object from API

from  ApiBase
object[]
GetList(string $methodKey, Pagination $pagination, object $responseClassName = null, string $entityId = null, object $filter = null, Sorting $sorting = null, $secondEntityId = null, $clientIdRequired = true)

Get lst with entities object from API

from  ApiBase
object
SaveObject(string $methodKey, object $entity, object $responseClassName = null, $secondEntityId = null, $thirdEntityId = null)

Save object in API

from  ApiBase
object
ExecutePostRequest($methodKey, $entity, $responseClassName, $entityId = null)

Executes a POST request

from  ApiBase
CastResponseToEntity(object $response, string $entityClassName, $asDependentObject = false)

Cast response object to entity object

from  ApiBase
array
BuildRequestData(object $entity)

Get array with request data

from  ApiBase
GetObjectForIdempotencyUrl($url)

No description

from  ApiBase
Create(PayIn $payIn, $idempotencyKey = null)

Create new pay-in object

Get(string $payInId)

Get pay-in object

CreateRefund(string $payInId, Refund $refund, $idempotencyKey = null)

Create refund for pay-in object

CreateRecurringRegistration(PayInRecurringRegistration $recurringRegistration, $idempotencyKey = null)

Create a recurring payment

GetRecurringRegistration(string $recurringRegistrationId, $idempotencyKey = null)

Get recurring payment

UpdateRecurringRegistration(PayInRecurringRegistrationUpdate $recurringUpdate, $idempotencyKey = null)

Update recurring payment

CreateRecurringPayInRegistrationCIT(RecurringPayInCIT $recurringPayInRegistrationCIT, $idempotencyKey = null)

Create a Recurring PayIn CIT

CreateRecurringPayInRegistrationMIT(RecurringPayInMIT $recurringPayInRegistrationMIT, $idempotencyKey = null)

Create a Recurring PayIn MIT

Refund[]
GetRefunds(string $payInId, Pagination $pagination = null, FilterRefunds $filter = null, Sorting $sorting = null)

Retrieves a list of Refunds pertaining to a certain PayIn

GetExtendedCardView(string $payInId)

Retrieves a more detailed view of details concerning the card used to process a Web payment.

CreateCardPreAuthorizedDepositPayIn(CreateCardPreAuthorizedDepositPayIn $payIn)

Create Card PreAuthorized Deposit PayIn

CreatePayPal(PayIn $payIn, $idempotencyKey = null)

Create new PayPal Web pay-in object

CreateGooglePay(PayIn $payIn, $idempotencyKey = null)

Create new GooglePay Direct pay-in object

GetPaymentMethodMetadata(PaymentMethodMetadata $paymentMethodMetadata, $idempotencyKey = null)

Look up metadata from BIN or Google Pay token

AddPayPalTrackingInformation($payId, PayPalWebTracking $palWebTracking)

No description

Details

protected mixed getLogger()

No description

Return Value

mixed

__construct($root)

Constructor

Parameters

$root

protected string GetRequestUrl(string $key)

Get URL for REST Mango Pay API

Parameters

string $key

Key with data

Return Value

string

protected RequestType GetRequestType(string $key)

Get request type for REST Mango Pay API

Parameters

string $key

Key with data

Return Value

RequestType

protected object CreateObject(string $methodKey, object $entity, object $responseClassName = null, string $entityId = null, $subEntityId = null, $idempotencyKey = null)

Create object in API

Parameters

string $methodKey

Key with request data

object $entity

Entity object

object $responseClassName

Name of entity class from response

string $entityId

Entity identifier

$subEntityId
$idempotencyKey

Return Value

object

Response data

protected object GetObject(string $methodKey, object $responseClassName, $firstEntityId = null, $secondEntityId = null, $thirdEntityId = null, $clientIdRequired = true)

Get entity object from API

Parameters

string $methodKey

Key with request data

object $responseClassName

Name of entity class from response

$firstEntityId
$secondEntityId
$thirdEntityId
$clientIdRequired

Return Value

object

Response data

Exceptions

Exception

protected object[] GetList(string $methodKey, Pagination $pagination, object $responseClassName = null, string $entityId = null, object $filter = null, Sorting $sorting = null, $secondEntityId = null, $clientIdRequired = true)

Get lst with entities object from API

Parameters

string $methodKey

Key with request data

Pagination $pagination

Pagination object

object $responseClassName

Name of entity class from response

string $entityId

Entity identifier

object $filter

Object to filter data

Sorting $sorting

Object to sorting data

$secondEntityId
$clientIdRequired

Return Value

object[]

Response data

protected object SaveObject(string $methodKey, object $entity, object $responseClassName = null, $secondEntityId = null, $thirdEntityId = null)

Save object in API

Parameters

string $methodKey

Key with request data

object $entity

Entity object to save

object $responseClassName

Name of entity class from response

$secondEntityId
$thirdEntityId

Return Value

object

Response data

protected object ExecutePostRequest($methodKey, $entity, $responseClassName, $entityId = null)

Executes a POST request

Parameters

$methodKey

Key with request data

$entity

Entity object

$responseClassName

Name of entity class from response

$entityId

Entity identifier

Return Value

object

Response data

protected CastResponseToEntity(object $response, string $entityClassName, $asDependentObject = false)

Cast response object to entity object

Parameters

object $response

Object from API response

string $entityClassName

Name of entity class to cast

$asDependentObject

protected array BuildRequestData(object $entity)

Get array with request data

Parameters

object $entity

Entity object to send as request data

Return Value

array

protected GetObjectForIdempotencyUrl($url)

No description

Parameters

$url

PayIn Create(PayIn $payIn, $idempotencyKey = null)

Create new pay-in object

Parameters

PayIn $payIn

\MangoPay\PayIn object

$idempotencyKey

Return Value

PayIn

Object returned from API

PayIn Get(string $payInId)

Get pay-in object

Parameters

string $payInId

Pay-in identifier

Return Value

PayIn

Object returned from API

Refund CreateRefund(string $payInId, Refund $refund, $idempotencyKey = null)

Create refund for pay-in object

Parameters

string $payInId

Pay-in identifier

Refund $refund

Refund object to create

$idempotencyKey

Return Value

Refund

Object returned by REST API

PayInRecurringRegistrationRequestResponse CreateRecurringRegistration(PayInRecurringRegistration $recurringRegistration, $idempotencyKey = null)

Create a recurring payment

Parameters

PayInRecurringRegistration $recurringRegistration
$idempotencyKey

Return Value

PayInRecurringRegistrationRequestResponse

PayInRecurringRegistrationGet GetRecurringRegistration(string $recurringRegistrationId, $idempotencyKey = null)

Get recurring payment

Parameters

string $recurringRegistrationId
$idempotencyKey

Return Value

PayInRecurringRegistrationGet

PayInRecurringRegistrationGet UpdateRecurringRegistration(PayInRecurringRegistrationUpdate $recurringUpdate, $idempotencyKey = null)

Update recurring payment

Parameters

PayInRecurringRegistrationUpdate $recurringUpdate
$idempotencyKey

Return Value

PayInRecurringRegistrationGet

PayInRecurring CreateRecurringPayInRegistrationCIT(RecurringPayInCIT $recurringPayInRegistrationCIT, $idempotencyKey = null)

Create a Recurring PayIn CIT

Parameters

RecurringPayInCIT $recurringPayInRegistrationCIT
$idempotencyKey

Return Value

PayInRecurring

PayInRecurring CreateRecurringPayInRegistrationMIT(RecurringPayInMIT $recurringPayInRegistrationMIT, $idempotencyKey = null)

Create a Recurring PayIn MIT

Parameters

RecurringPayInMIT $recurringPayInRegistrationMIT
$idempotencyKey

Return Value

PayInRecurring

Refund[] GetRefunds(string $payInId, Pagination $pagination = null, FilterRefunds $filter = null, Sorting $sorting = null)

Retrieves a list of Refunds pertaining to a certain PayIn

Parameters

string $payInId

ID of PayIn for which to retrieve Refunds

Pagination $pagination

Pagination object

FilterRefunds $filter

Filtering object

Sorting $sorting

Sorting object

Return Value

Refund[]

List of the PayIn's Refunds

PayInWebExtendedView GetExtendedCardView(string $payInId)

Retrieves a more detailed view of details concerning the card used to process a Web payment.

Parameters

string $payInId

ID of the PayIn to retrieve card details for

Return Value

PayInWebExtendedView

Object returned from API

PayIn CreateCardPreAuthorizedDepositPayIn(CreateCardPreAuthorizedDepositPayIn $payIn)

Create Card PreAuthorized Deposit PayIn

Parameters

CreateCardPreAuthorizedDepositPayIn $payIn

PayIn object to create

Return Value

PayIn

Deposit object returned from API

PayIn CreatePayPal(PayIn $payIn, $idempotencyKey = null)

Create new PayPal Web pay-in object

Parameters

PayIn $payIn

\MangoPay\PayIn object

$idempotencyKey

Return Value

PayIn

Object returned from API

PayIn CreateGooglePay(PayIn $payIn, $idempotencyKey = null)

Create new GooglePay Direct pay-in object

Parameters

PayIn $payIn

\MangoPay\PayIn object

$idempotencyKey

Return Value

PayIn

Object returned from API

PaymentMethodMetadata GetPaymentMethodMetadata(PaymentMethodMetadata $paymentMethodMetadata, $idempotencyKey = null)

Look up metadata from BIN or Google Pay token

Parameters

PaymentMethodMetadata $paymentMethodMetadata

\MangoPay\PaymentMethodMetadata object

$idempotencyKey

Return Value

PaymentMethodMetadata

Object returned from API

AddPayPalTrackingInformation($payId, PayPalWebTracking $palWebTracking)

No description

Parameters

$payId
PayPalWebTracking $palWebTracking