PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins
/
sf-booking
/
payment-gateway
/
MangoPay
<?php namespace MangoPay; /** * Class to management MangoPay API for users */ class ApiClients extends Libraries\ApiBase { /** * Get client information * * @return \MangoPay\Client Client object returned from API */ public function Get() { return $this->GetObject('client_get', null, '\MangoPay\Client'); } /** * Save client * @param Client $client Client object to save * @return \MangoPay\Client Client object returned from API */ public function Update($client) { if (!is_null($client->HeadquartersAddress) && is_a($client->HeadquartersAddress, "MangoPay\Address") && $client->HeadquartersAddress->CanBeNull()) { $client->HeadquartersAddress = null; } return $this->SaveObject('client_save', $client, '\MangoPay\Client'); } /** * Upload a logo for client. * Only GIF, PNG, JPG, JPEG, BMP, PDF and DOC formats are accepted, * and file must be less than about 7MB * @param \MangoPay\ClientLogoUpload $logo ClientLogoUpload object */ public function UploadLogo($logoUpload, $idempotencyKey = null) { try { $this->CreateObject('client_upload_logo', $logoUpload, null, null, null, $idempotencyKey); } catch (\MangoPay\Libraries\ResponseException $exc) { if ($exc->getCode() != 204) { throw $exc; } } } /** * Upload a logo for client from file. * Only GIF, PNG, JPG, JPEG, BMP, PDF and DOC formats are accepted, * and file must be less than about 7MB * @param string $file Path of file with logo * @throws \MangoPay\Libraries\Exception */ public function UploadLogoFromFile($file, $idempotencyKey = null) { $filePath = $file; if (is_array($file)) { $filePath = $file['tmp_name']; } if (empty($filePath)) { throw new \MangoPay\Libraries\Exception('Path of file cannot be empty'); } if (!file_exists($filePath)) { throw new \MangoPay\Libraries\Exception('File not exist'); } $logoUpload = new \MangoPay\ClientLogoUpload(); $logoUpload->File = base64_encode(file_get_contents($filePath)); if (empty($logoUpload->File)) { throw new \MangoPay\Libraries\Exception('Content of the file cannot be empty'); } $this->UploadLogo($logoUpload, $idempotencyKey); } /** * View your client wallets. To see your fees or credit wallets * for each currency set second $fundsType parameter. * * @param \MangoPay\FundsType $fundsType FundsType enum * @param \MangoPay\Sorting $sorting Sorting object * * @return \MangoPay\Wallet[] List with your client wallets */ public function GetWallets($fundsType = null, $sorting = null) { $pagination = new \MangoPay\Pagination(); if (is_null($fundsType)){ return $this->GetList('client_wallets', $pagination, '\MangoPay\Wallet', null, null, $sorting); } else if ($fundsType == FundsType::FEES){ return $this->GetList('client_wallets_fees', $pagination, '\MangoPay\Wallet', null, null, $sorting); } else if ($fundsType == FundsType::CREDIT){ return $this->GetList('client_wallets_credit', $pagination, '\MangoPay\Wallet', null, null, $sorting); } throw new \MangoPay\Libraries\Exception('\MangoPay\FundsType object has wrong value and cannot get wallets'); } /** * View one of your client wallets (fees or credit) with a particular currency. * * @param \MangoPay\FundsType $fundsType FundsType enum * @param \MangoPay\CurrencyIso $currencyIso CurrencyIso enum * * @return \MangoPay\Wallet Wallets (fees or credit) with a particular currency */ public function GetWallet($fundsType, $currencyIso) { if (is_null($fundsType)){ throw new \MangoPay\Libraries\Exception( 'First parameter in function GetWallet in class ApiClients is required.'); } if (is_null($currencyIso)){ throw new \MangoPay\Libraries\Exception( 'Second parameter in function GetWallet in class ApiClients is required.'); } $methodKey = null; if ($fundsType == FundsType::FEES){ $methodKey = 'client_wallets_fees_currency'; } else if ($fundsType == FundsType::CREDIT){ $methodKey = 'client_wallets_credit_currency'; } else { throw new \MangoPay\Libraries\Exception('\MangoPay\FundsType object has wrong value and cannot get wallets'); } return $this->GetObject($methodKey, $currencyIso, '\MangoPay\Wallet'); } /** * View the transactions linked to your client wallets (fees and credit) * * @param \MangoPay\FundsType $fundsType FundsType enum * @param \MangoPay\CurrencyIso $currencyIso CurrencyIso enum * @param \MangoPay\Pagination $pagination Pagination object * @param \MangoPay\FilterTransactions $filter Object to filter data * * @return \MangoPay\Transaction[] Transactions linked to your client wallets (fees and credit) */ public function GetWalletTransactions($fundsType = null, $currencyIso = null, & $pagination = null, $filter = null) { if (is_null($fundsType)){ $methodKey = 'client_wallets_transactions'; } else if ($fundsType == FundsType::FEES){ $methodKey = 'client_wallets_transactions_fees_currency'; } else if ($fundsType == FundsType::CREDIT){ $methodKey = 'client_wallets_transactions_credit_currency'; } else { throw new \MangoPay\Libraries\Exception( '\MangoPay\FundsType object has wrong value.'); } if (!is_null($fundsType) && is_null($currencyIso)){ throw new \MangoPay\Libraries\Exception( 'If FundsType is defined the second parameter (currency) is required.'); } return $this->GetList($methodKey, $pagination, '\MangoPay\Transaction', $currencyIso, $filter, null); } }
[+]
..
[-] ApiBankingAliases.php
[edit]
[-] ClientLogoUpload.php
[edit]
[-] UboDeclarationRefusedReasonType.php
[edit]
[-] FilterDisputes.php
[edit]
[-] PayInPaymentDetailsBankWire.php
[edit]
[-] BusinessType.php
[edit]
[-] ApiCards.php
[edit]
[-] DisputeDocumentPage.php
[edit]
[-] Refund.php
[edit]
[-] Pagination.php
[edit]
[-] ApiTransfers.php
[edit]
[-] PayInExecutionDetailsExternalInstruction.php
[edit]
[-] ApiResponses.php
[edit]
[-] DocumentPageConsult.php
[edit]
[-] ApiCardRegistrations.php
[edit]
[-] PlatformCategorization.php
[edit]
[-] AVSResult.php
[edit]
[-] Event.php
[edit]
[-] ApiBankAccounts.php
[edit]
[-] PayInTemplateURLOptions.php
[edit]
[-] ApiWallets.php
[edit]
[-] ApiPayIns.php
[edit]
[-] PayOutStatus.php
[edit]
[-] Wallet.php
[edit]
[-] PayInExecutionType.php
[edit]
[-] User.php
[edit]
[-] ApiDisputeDocuments.php
[edit]
[-] PayInPaymentDetailsCard.php
[edit]
[-] Card.php
[edit]
[-] PayInExecutionDetailsWeb.php
[edit]
[-] PayInPaymentDetailsDirectDebit.php
[edit]
[-] FilterPreAuthorizations.php
[edit]
[-] PayInExecutionDetails.php
[edit]
[-] Money.php
[edit]
[-] KeyValueArray.php
[edit]
[-] Repudiation.php
[edit]
[-] ApiRefunds.php
[edit]
[-] BankAccountDetailsCA.php
[edit]
[-] PayInPaymentDetailsPaypal.php
[edit]
[-] PayOutPaymentType.php
[edit]
[-] Hook.php
[edit]
[-] NaturalUserCapacity.php
[edit]
[-] Mandate.php
[edit]
[-] CardPreAuthorizationStatus.php
[edit]
[-] ReportType.php
[edit]
[-] DeclaredUboStatus.php
[edit]
[-] ApiUboDeclarations.php
[edit]
[-] PayInPaymentDetailsPreAuthorized.php
[edit]
[-] BankAccountDetails.php
[edit]
[-] ApiReports.php
[edit]
[-] Client.php
[edit]
[-] PayOutPaymentDetails.php
[edit]
[-] ApiCardPreAuthorizations.php
[edit]
[-] ApiHooks.php
[edit]
[-] MangoPayApi.php
[edit]
[-] BankingAlias.php
[edit]
[-] Transfer.php
[edit]
[+]
Libraries
[-] Sector.php
[edit]
[+]
Psr
[-] SecurityInfo.php
[edit]
[-] ShippingAddress.php
[edit]
[-] ApiDisputes.php
[edit]
[-] Address.php
[edit]
[-] RefundReasonDetails.php
[edit]
[-] ApiMandates.php
[edit]
[-] BankingAliasIBAN.php
[edit]
[-] FilterBase.php
[edit]
[-] FundsType.php
[edit]
[-] FilterRefunds.php
[edit]
[-] EMoney.php
[edit]
[-] ReportRequest.php
[edit]
[-] DisputeReason.php
[edit]
[-] CardRegistration.php
[edit]
[-] DisputeReasonType.php
[edit]
[-] FilterReports.php
[edit]
[-] PayIn.php
[edit]
[-] FilterDisputeDocuments.php
[edit]
[-] Transaction.php
[edit]
[-] CardPreAuthorizationPaymentStatus.php
[edit]
[-] DebitedBankAccount.php
[edit]
[-] KycPage.php
[edit]
[-] DisputeStatus.php
[edit]
[-] EventType.php
[edit]
[-] Dispute.php
[edit]
[-] CardRegistrationStatus.php
[edit]
[-] PayInPaymentDetailsDirectDebitDirect.php
[edit]
[-] ApiUsers.php
[edit]
[-] DisputeDocumentType.php
[edit]
[-] PayInExecutionDetailsDirect.php
[edit]
[-] CardPreAuthorization.php
[edit]
[-] KycDocument.php
[edit]
[-] FilterTransactions.php
[edit]
[-] PayOut.php
[edit]
[-] CurrencyIso.php
[edit]
[-] BankAccountDetailsGB.php
[edit]
[-] Autoloader.php
[edit]
[-] FilterEvents.php
[edit]
[-] KycDocumentRefusedReasonType.php
[edit]
[-] LegalPersonType.php
[edit]
[-] PersonType.php
[edit]
[-] PayInWebExtendedView.php
[edit]
[-] Sorting.php
[edit]
[-] UboRefusedReasonType.php
[edit]
[-] SortDirection.php
[edit]
[-] DeclaredUbo.php
[edit]
[-] KycDocumentType.php
[edit]
[-] UboDeclaration.php
[edit]
[-] SettlementTransfer.php
[edit]
[-] ApiPayOuts.php
[edit]
[-] PayInStatus.php
[edit]
[-] CardValidity.php
[edit]
[-] PayInPaymentDetails.php
[edit]
[-] KycLevel.php
[edit]
[-] DisputeDocument.php
[edit]
[-] UboDeclarationStatus.php
[edit]
[-] ApiEvents.php
[edit]
[-] BankAccountDetailsUS.php
[edit]
[-] PayOutPaymentDetailsBankWire.php
[edit]
[-] Billing.php
[edit]
[-] autoload.php
[edit]
[-] ApiRepudiations.php
[edit]
[-] UserNatural.php
[edit]
[-] BankAccountDetailsOTHER.php
[edit]
[-] PayInPaymentType.php
[edit]
[-] BankingAliasType.php
[edit]
[-] UserLegal.php
[edit]
[-] DisputeDocumentStatus.php
[edit]
[-] FilterKycDocuments.php
[edit]
[-] DisputeType.php
[edit]
[-] ApiClients.php
[edit]
[-] Response.php
[edit]
[-] BankAccountDetailsIBAN.php
[edit]
[-] ApiKycDocuments.php
[edit]
[-] BankAccount.php
[edit]
[-] KycDocumentStatus.php
[edit]