From 76dc11319bce3b308c5df1ae26fd9a1a620c63de Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:01:20 +0600 Subject: [PATCH 01/37] fix: Fatal error: Uncaught Error: Class "PhpCsFixer\Finder" not found --- .php_cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.php_cs b/.php_cs index 0c58b541..b32060ed 100644 --- a/.php_cs +++ b/.php_cs @@ -1,5 +1,7 @@ in(__DIR__.'/MangoPay') ->in(__DIR__.'/tests') From 591629c8d296f09d2cd3dd85128572de2fef6123 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:01:49 +0600 Subject: [PATCH 02/37] added: required and optional properties --- MangoPay/PayOut.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index 0f10bff8..b06e0e7b 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -7,6 +7,18 @@ */ class PayOut extends Transaction { + /** + * The unique identifier of the bank account. + * @var string + */ + public $BankAccountId; + + /** + * Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. + * @var string + */ + public $BankWireRef; + /** * Debited wallet Id * @var string @@ -19,12 +31,24 @@ class PayOut extends Transaction */ public $PaymentType; + /** + * One of PayOutPaymentDetails implementations, depending on $PaymentType + * @var \MangoPay\PayOutPaymentDetailsBankWire + */ + public $PayoutPaymentDetails; + /** * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var object + * @var \MangoPay\PayOutPaymentDetailsBankWire */ public $MeanOfPaymentDetails; + /** + * Payout mode requested, default is 'STANDARD', Allowed values are + * 'STANDARD', 'INSTANT_PAYMENT', 'INSTANT_PAYMENT_ONLY' + * @var string + */ + public $PayoutModeRequested = 'STANDARD'; /** * Get array with mapping which property depends on other property From b81fb0ba588b0eef814cab1fc1bdbf5de1c35e54 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:22:09 +0600 Subject: [PATCH 03/37] chore(composer): Updated to the latest version and config file also --- .gitignore | 2 +- .php-cs-fixer.cache | 1 + .php-cs-fixer.php | 20 ++++++++++++++++++++ .php_cs | 19 ------------------- composer.json | 2 +- 5 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 .php-cs-fixer.cache create mode 100644 .php-cs-fixer.php delete mode 100644 .php_cs diff --git a/.gitignore b/.gitignore index 8df94255..a2c6d56e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,6 @@ composer.lock .* !.github -!.php_cs +!.php-cs-fixer.* !.gitignore !.gitattributes diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache new file mode 100644 index 00000000..33c1c544 --- /dev/null +++ b/.php-cs-fixer.cache @@ -0,0 +1 @@ +{"php":"8.3.6","version":"3.54.0:v3.54.0#2aecbc8640d7906c38777b3dcab6f4ca79004d08","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":{"elements":["property","method"]},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"fully_qualified_strict_types":true,"array_syntax":{"syntax":"short"}},"hashes":{"MangoPay\/DepositStatus.php":"c5e74558b55f4ef2f47b2bb53f9362c2","MangoPay\/ShippingAddress.php":"d947fe7120cfa529297c224af48aeb0b","MangoPay\/DisputeDocumentPage.php":"acbe40fd680eaefdebdff33770c2bf1a","MangoPay\/CardInfo.php":"561eb46b996f0cbbe1a724e2c05cbf8e","MangoPay\/UboDeclarationStatus.php":"93c1a9fe9179526b6e385b9bca7c9646","MangoPay\/Card.php":"f6088c89b0dee02cf67b5ea4453311e7","MangoPay\/InstantPayout.php":"47a33e70333a48deaaccbfa8233280ba","MangoPay\/Deposit.php":"2bd227e6ae6e19abd62dab8729d505c5","MangoPay\/CreateDeposit.php":"bf8ab5220418c8157e2b7daabb074bdc","MangoPay\/UserLegal.php":"4669f7f2c95dccf7b3669a051308de0d","MangoPay\/PayOutPaymentDetailsBankWire.php":"cedf0c748a86c1b0aee42de6c7f62454","MangoPay\/CardRegistration.php":"9b8edd056acc85d3077879a538f5a663","MangoPay\/ReportStatus.php":"256d09cb0bdeea982a0fc12f0b992c7a","MangoPay\/ShippingPreference.php":"467810bd0ff78f60db7c4131f8c48cf1","MangoPay\/ApiRepudiations.php":"4f417ce17e580b920d509f85294aca2b","MangoPay\/PayOut.php":"5c2149c973148ba913cd24f3c04b6525","MangoPay\/ApiEvents.php":"2da2a03e57117d436c21f591c4bb32ac","MangoPay\/Transaction.php":"3d26d113d6cef86cead4fd55d5947886","MangoPay\/Conversion.php":"92c453c36c7671fd1989a389101817ae","MangoPay\/Refund.php":"9ebd65639d361754f75650601dde93a5","MangoPay\/Event.php":"7915af0901bebb95eaa7c1c94f32e82e","MangoPay\/BankingAlias.php":"836f17ff67ffe29ba3f1162d8f97b0bc","MangoPay\/ConversionQuote.php":"14295ea17da8165d99f41ed84c95713c","MangoPay\/ReportRequest.php":"8b06aa91b783f838590e57a0b6deca62","MangoPay\/PayInRecurringRegistrationUpdate.php":"8f0ad1aa6fc4b04c6c10d2660f46dcc1","MangoPay\/CardValidity.php":"63a06d959c451343d0ade31a43f01e58","MangoPay\/ApiHooks.php":"50838cfc311904a8744574c110dc10ee","MangoPay\/DisputeType.php":"348c117a275e1a041be6d0e4121bf46d","MangoPay\/UboDeclarationRefusedOrIncompleteReasonType.php":"88c449ceb6dc9afe5708935ea23770de","MangoPay\/MandateStatus.php":"44cdca914b2f899d527400f12f2238b9","MangoPay\/RecurringPayInMIT.php":"4381a5c54e7405178efb7c6394f8c1aa","MangoPay\/Wallet.php":"7583276d0bba7732f489086e9e1c44dc","MangoPay\/ApiPayOuts.php":"3146860b4620521629a6059a1612ae09","MangoPay\/KycPage.php":"4dc12a16a289981e636911bbf6cdd778","MangoPay\/KeyValueArray.php":"5fc7a707ae67f3489c0c5cde10d114b9","MangoPay\/ApiReports.php":"47dbc94a2f99912a354f50fbbf2a3def","MangoPay\/FilterBase.php":"85417808e88d8f8b6a8ad1e879455b96","MangoPay\/ApiTransfers.php":"349902f6ce2c620f1e6bdec6774a6d72","MangoPay\/MangoPayApi.php":"23e686e02df3753eb5905085f1652e43","MangoPay\/DebitedBankAccount.php":"4a5ddb892c0c4a60baa24058b6a5bb14","MangoPay\/UserBlockStatus.php":"6959e13098ba4cf4bf1fc2802e26c9ab","MangoPay\/FilterDisputeDocuments.php":"19a85f53c1770859c31c964fd917fa32","MangoPay\/PayInPaymentDetailsMbway.php":"90794aef5acccf026476a23d861611bd","MangoPay\/PayInExecutionDetailsWeb.php":"49b2fee05ecf62eff427116ca8a27d94","MangoPay\/PayInRecurring.php":"ca65de284baa7c0f81879eee0f6f5926","MangoPay\/PaymentMethodMetadata.php":"d3e67d1c6da156035ee074544cc54713","MangoPay\/PayInPaymentDetailsPreAuthorized.php":"71c92dc9d8ad198c8283ad4bacbd400d","MangoPay\/PayOutPaymentType.php":"c3c64904ddc3a4dc1b90bd9a72d00092","MangoPay\/DisputeReasonType.php":"9049d7d67f6d8cc20c4032d42a7f5348","MangoPay\/PayInPaymentDetailsIdeal.php":"47e3a713b18cc8aefd8e46d2f77166fb","MangoPay\/SettlementTransfer.php":"b61390f435150e04279110ed14bb7628","MangoPay\/BusinessType.php":"2c9b3ddb23177cdfb5e3941901c0edb7","MangoPay\/ApiDeposits.php":"e8b152f7f0d23496d235eb7977c754ba","MangoPay\/Pagination.php":"ff528c35d8a32b9f1a88a92f2a581361","MangoPay\/RefundStatus.php":"0df1f0a78cd7f3ce3538c13688247319","MangoPay\/Ubo.php":"45ee190470a30fd2ad70a4e75aed4a34","MangoPay\/PayInRecurringRegistrationGet.php":"b2dfe5af60958982596670f1e32c6e8f","MangoPay\/BankingAliasOTHER.php":"e65dfcd99571fa9083114e72fa247333","MangoPay\/Shipping.php":"5cbf7de0fe9daa722229946833442b72","MangoPay\/Response.php":"f9d9788b69ac72350a35d62957b20190","MangoPay\/PayInPaymentDetailsDirectDebitDirect.php":"7eb675ee724bf2c0cf52ec46516a37bd","MangoPay\/Address.php":"468a26b89a32be2b7ccb999dc344e704","MangoPay\/RecurringPayInCurrentState.php":"0de91dfe2b84071acab730ff6f5c6e11","MangoPay\/SortDirection.php":"79a30de12b21f71445b4af4a723c6c5c","MangoPay\/PersonType.php":"7ab6c6186c01b41cb487f8f59ff1b265","MangoPay\/Hook.php":"845fa0a01f5813fd6f42743efa9f696f","MangoPay\/KycLevel.php":"8f195262405035aa22a87bd311ad16f2","MangoPay\/PayInTemplateURLOptions.php":"351b253b44dbd16e67f2f589e8c83ac7","MangoPay\/ClientLogoUpload.php":"ff0842a868cea8c2d3c6e78f97514298","MangoPay\/PayInPaymentDetailsPayconiq.php":"db8785a218e17d51152d176333967b05","MangoPay\/Sorting.php":"3eb1af265ee46597c996586609453e7c","MangoPay\/PayIn.php":"13524c0bffd04ed4c863f58b2731d0f7","MangoPay\/FilterEvents.php":"67fdb4afd296ae4ea07ae63190d2b250","MangoPay\/ApiWallets.php":"cff52f43c833c6c5c969575e692f669b","MangoPay\/NaturalUserCapacity.php":"ab7da6f45c010d360ff9714ddd30e9f8","MangoPay\/PayInWebExtendedView.php":"6dfd596609bdf9593d9651d5bc1102e4","MangoPay\/DeclaredUbo.php":"2ce0dfaa479eae894200e8ed2e3e4842","MangoPay\/BankAccountDetailsCA.php":"37caeedc0198f1156e66f704191146da","MangoPay\/UboRefusedReasonType.php":"1b7b835b60c7fbe4baba5904099fcbb3","MangoPay\/FilterBankAccounts.php":"293e311e26defe58be9071ffa6e56c7c","MangoPay\/AVSResult.php":"a1bd07221e57bd8e99581addf007f709","MangoPay\/FilterCards.php":"cc3a3d509da4dd24b5933eb11c1226aa","MangoPay\/CardPreAuthorization.php":"5d5dc7d4dff27ec034262ab696812fd1","MangoPay\/User.php":"55599407a1cdba0f59bbfcff62f1d784","MangoPay\/ApiCardPreAuthorizations.php":"8026cc5e928f73689e85de8603e24934","MangoPay\/FilterReports.php":"09e747a24bf8c9db514768397f129e0c","MangoPay\/HookStatus.php":"a38da5f0a8f6c13c75a1ddcb7125c321","MangoPay\/PayInExecutionDetailsDirect.php":"5e439abfb4a668d7000b6fc0da697c97","MangoPay\/ReportType.php":"5946eae62c38d9d0d39e1374654dbbf2","MangoPay\/Libraries\/RestTool.php":"98bc061973ae14602066c97fbc19a2fe","MangoPay\/Libraries\/Document.php":"5517f6864791795ab5db4997c1d0fdf9","MangoPay\/Libraries\/IStorageStrategy.php":"fa5f309eb14566d4c1ce970b4bae6224","MangoPay\/Libraries\/Dto.php":"c80d676977c321f322941f1e52b0ac8a","MangoPay\/Libraries\/AuthenticationHelper.php":"7a2272437209840e53b5391def82dad6","MangoPay\/Libraries\/HttpBase.php":"338500e29612cdb01e1e20098e7ad7df","MangoPay\/Libraries\/UrlTool.php":"8b95a646b560edac31a67d4c705041f2","MangoPay\/Libraries\/Logs.php":"d74ef8e4189de5d1c60050834cbe0b8d","MangoPay\/Libraries\/HttpResponse.php":"57fbf00901140f61dd3272c1a3561064","MangoPay\/Libraries\/AuthorizationTokenManager.php":"6fed73223925745eaf174970d101a571","MangoPay\/Libraries\/ApiOAuth.php":"de46232677c88ac23b6d0a7b7b852f17","MangoPay\/Libraries\/ResponseException.php":"a36888f88f627ab66037fa2b267cd47d","MangoPay\/Libraries\/Configuration.php":"a634a5ab6fd69da815627dbdf4d4aa90","MangoPay\/Libraries\/DefaultStorageStrategy.php":"5a37cd1befcd0005c4c58cf7cc1b15b8","MangoPay\/Libraries\/Error.php":"a7aaad5ccbf119e886f2717d1d2204b8","MangoPay\/Libraries\/Upload.php":"b52fb70e67f5816f25a1bab355fd3804","MangoPay\/Libraries\/EntityBase.php":"5960f5f4a6f7ff5be8b314373852b24e","MangoPay\/Libraries\/RequestType.php":"4d0e46db5da8efb4c3e0a54ce246ec43","MangoPay\/Libraries\/Exception.php":"345db775625839d68d5ced99497b713d","MangoPay\/Libraries\/ApiBase.php":"b4dd80763288040ddcf4d0489633515d","MangoPay\/Libraries\/HttpCurl.php":"137c74cf8db65546e98ea19bfa3e9cd0","MangoPay\/Libraries\/OAuthToken.php":"1707ada8e0deb6e889eda8620a7aee72","MangoPay\/Birthplace.php":"287f7d219b5f4b2ffb2764228ecffe53","MangoPay\/PayInPaymentDetails.php":"441ec552b55b5db6f97e046049c828bd","MangoPay\/Dispute.php":"6d0340786cd72c125ad33e855bfc45b7","MangoPay\/PayInRecurringRegistration.php":"fe964ea36194dcb588c76e3c2ae4070e","MangoPay\/DocumentPageConsult.php":"c6bf75b40dd32f0dd9f4a11c12bab765","MangoPay\/FilterKycDocuments.php":"3aab65a018a28295cd5da98ebc69f106","MangoPay\/ApiDisputes.php":"c99810adad4f6200febea335b34cfcfc","MangoPay\/DisputeStatus.php":"a43b2909b392e9f3447a26e571c4ea5c","MangoPay\/BankingAliasType.php":"c66d0c47f3f4a136e9aa119bc3f77e2e","MangoPay\/Transfer.php":"fbbe688542ecb279f321bf9ed5cad505","MangoPay\/KycDocumentType.php":"ba3bac13281bca7a261d541f6b6ff7ca","MangoPay\/KycDocument.php":"3270ee0a02087835ae88477361ebb48c","MangoPay\/PayInPaymentDetailsDirectDebit.php":"cf16d7bb626d6aa4a96c878e508533b5","MangoPay\/RefundReasonDetails.php":"d1668fa893e28e1a55e746c01c516260","MangoPay\/PayInStatus.php":"ccc9c4c085f53ab44b0d210ce370e1ac","MangoPay\/HookValidity.php":"dce4e339dee09693082d17ff1ce9ab31","MangoPay\/CountryAuthorization.php":"f3fb6d622ff795f88d96a2c55e776983","MangoPay\/CreateQuotedConversion.php":"90585279e3f177f2e3730cd430fde039","MangoPay\/UserCategory.php":"3f8729fc7805d98e58a10cdfc661996a","MangoPay\/BrowserInfo.php":"d26238ae3a545e8ea0fcbed17a262191","MangoPay\/Sector.php":"6c5a8e55bd4b816f7d2c7e89836e67e0","MangoPay\/PlatformCategorization.php":"7f56b08fc669b2ca34721c5fe062b69f","MangoPay\/PayinsLinked.php":"5b20d445e4b15ab661f0a48d27d43092","MangoPay\/TransactionStatus.php":"ec6889aa991fd5bad5760034624f5312","MangoPay\/ApiBankAccounts.php":"7ac840b57e0e09525dc7126518c16cdb","MangoPay\/PayInPaymentDetailsKlarna.php":"f5df86a44de85106094facafa9ea7a13","MangoPay\/CurrencyIso.php":"8daaf73243ebcd96769d548290123be7","MangoPay\/DisputeDocumentStatus.php":"c32a510fdacf361c34299fce42a0ec68","MangoPay\/CompanyNumberDetails.php":"d51ef3247b2b79de141ce5d11b254898","MangoPay\/CardPreAuthorizationPaymentStatus.php":"6a03c9cbe63160d80b016d2892c419b7","MangoPay\/ApiRefunds.php":"379a993792bf01f5007c9094fa036ae5","MangoPay\/BankAccountDetailsUS.php":"cd72af713cf461ad96ed19cc3250a30b","MangoPay\/PayInRecurringRegistrationRequestResponse.php":"50be93f33b671c8f6cbffe5d3e1eb668","MangoPay\/ApiCards.php":"474eb0e76f4fe7e15738b7cacd98ecfa","MangoPay\/DisputeDocument.php":"5ad25f0af621aeb840fd4e22878885dc","MangoPay\/ApiUsers.php":"d83b0a39c5da822022c3a66efe36c14e","MangoPay\/ScopeBlocked.php":"b06beb6f82568e6b72bb8cb04413e21d","MangoPay\/CompanyNumber.php":"61ff35f4d2880703eaafddea84b93ed2","MangoPay\/PayInPaymentDetailsMultibanco.php":"d96f2d54642f62ddaa84eff347f00936","MangoPay\/PayInCardTemplateURLOptions.php":"c7b30345e2883f510b2e2ccae1d9dbc5","MangoPay\/ApiPayIns.php":"e731b4f12e33cc7642f75a09027b7615","MangoPay\/ApiKycDocuments.php":"c3d24976e54d0e8e6afa134f30d19360","MangoPay\/ApiCardRegistrations.php":"91119c6012a67d009e58ed2c752da0b9","MangoPay\/Money.php":"ff794df47b535692c9964c71f52a3cad","MangoPay\/ConversionRate.php":"020cfcac5b05e676c7314df32c17e434","MangoPay\/ApiBankingAliases.php":"8eab9267183ccdac0ff3147d317d54d5","MangoPay\/FilterPreAuthorizations.php":"5d4acdd72eed5aa020073cb1908db83c","MangoPay\/LineItem.php":"e8c507314a14a139dcb36fab4ad0af6c","MangoPay\/CreateCardPreAuthorizedDepositPayIn.php":"3412c13f2af02dcbff5f68d7b709e99e","MangoPay\/ApiDisputeDocuments.php":"f7973f7d83aad382aa8cbd46bff78798","MangoPay\/TransactionNature.php":"a598596c4345cc24685c1f155359480c","MangoPay\/ApiResponses.php":"61239d96092d9ce57c84aa94a8f8cdac","MangoPay\/FallbackReason.php":"bfeb1afb8bb5acef0f0d5cc17bc8a4bd","MangoPay\/ApiMandates.php":"0a23c28b65ba9a8026b9452b316cd7dc","MangoPay\/PayInPaymentDetailsPaypal.php":"b5a2b1144cef9731b60ff18376935f4f","MangoPay\/SecurityInfo.php":"f238e241822ccd26a9b31888d2b97287","MangoPay\/PaymentData.php":"1c318135842edc07407f9388e9427c00","MangoPay\/BankAccountDetails.php":"613ce3a7fccc4cfd2f0a02aae8d89202","MangoPay\/PayInPaymentDetailsGooglePay.php":"1e8ef31742de3cc176314e0ecf7275f1","MangoPay\/KycDocumentStatus.php":"c571099565ae1b551716adfd8e6ee8e9","MangoPay\/ApiConversions.php":"ab10fa7280b1decc08909e050dc35b2d","MangoPay\/PayOutStatus.php":"828e32a9105b155e3b632bb8af6a4b30","MangoPay\/PayInExecutionDetailsExternalInstruction.php":"916dfd43361b5509c282418787b1b82f","MangoPay\/BankingAliasIBAN.php":"9ecc6d5525531305615beb33c2418c31","MangoPay\/TransactionType.php":"93a08ffcca945002a5eef45cd6a0d305","MangoPay\/BankAccountDetailsOTHER.php":"46a511f4cea4b057dfcad4ba41da2e0c","MangoPay\/CreateInstantConversion.php":"54cb69ddd85935f71fe26ee4292f15a3","MangoPay\/PayInPaymentType.php":"5dcdbd7e0e6fcb93afa3226b5b7b89e6","MangoPay\/CardValidationStatus.php":"05734f46262e3a37e25ba98387af2e5d","MangoPay\/KycDocumentRefusedReasonType.php":"7b00461c84028abe377749f63e48a09d","MangoPay\/RateLimit.php":"962fa82cbcd45e739f1659d14b2d15c4","MangoPay\/ApiRegulatory.php":"62ff807a31964d4204b41551c8e7b744","MangoPay\/FundsType.php":"654614749967108aa6daa8de0da2aaf6","MangoPay\/FilterRefunds.php":"c1535dbad874891bfb11e2dbcc378e98","MangoPay\/BankAccountDetailsGB.php":"c0e4a74c4986ff8449b01a548244f5d6","MangoPay\/BankAccount.php":"6dd3b9c12f927b1ce0e88923a025f492","MangoPay\/PayInPaymentDetailsApplePay.php":"369f6e45949dbd7fd96b9b654d006cc0","MangoPay\/PayInPaymentDetailsSatispay.php":"38120857a1fa659e685ac027aea2a4d2","MangoPay\/UserNatural.php":"d9d0624f7afb2ea01c099227d6e98beb","MangoPay\/FilterTransactions.php":"1d037bc826a84722e155fdc90692459f","MangoPay\/BankAccountDetailsIBAN.php":"6f302319b7f4bb7e81b46d053b0cff10","MangoPay\/CardRegistrationStatus.php":"742888ac5d0a61afa66bfbd9048f6563","MangoPay\/Repudiation.php":"4d567f84b9318f19e4f7af5aeed7ba9e","MangoPay\/CountryAuthorizationData.php":"5831f0876cbcbb0d2b8368fcd4eef5e9","MangoPay\/PayInExecutionDetails.php":"9449109287d9db3c3c1934c40843e8db","MangoPay\/PayOutPaymentDetails.php":"81a35a67c6de892d0160569215c339b8","MangoPay\/ApiUboDeclarations.php":"bbe6c8b41adc65bc0786db2648f987e5","MangoPay\/Billing.php":"e11d6e554fade650207e9f1b9ddd33a8","MangoPay\/PayPalWebTracking.php":"69404331bf166bee338a77fc6ec3b81e","MangoPay\/FilterDisputes.php":"2915bc736f9a701548b97d85ce515bb9","MangoPay\/Mandate.php":"725dda053777283677a2ec6b2a88779a","MangoPay\/DisputeDocumentType.php":"2ae8191b36ef36cb6078028abafbb313","MangoPay\/ApiClients.php":"ac99854276006807768ddd394651c6b4","MangoPay\/LegalPersonType.php":"23671eeba43334ac6fdfc6870cb4f5c7","MangoPay\/CardPreAuthorizationStatus.php":"dbaf899616645b596c0f0c40cda487bf","MangoPay\/UboDeclaration.php":"b7fe4f22984ee613702546005ecad5b1","MangoPay\/Autoloader.php":"5c9ac088f7f992c76c7c0b629001eaf4","MangoPay\/EventType.php":"ed53d81c390cd2d705018e1005993bbf","MangoPay\/EMoney.php":"8460b068b3c7a6635d837a0b0c5ef414","MangoPay\/PayOutEligibilityResponse.php":"e9d36df4d11314822080d79c975c8bd9","MangoPay\/DeclaredUboStatus.php":"7822b5b22e20da01804196b236adef81","MangoPay\/PayInExecutionType.php":"e0feb88acf73627f4e2ab7ec7391f4ed","MangoPay\/PayInPaymentDetailsBankWire.php":"1c1b6698b0a0298fd7131973223df24b","MangoPay\/CardValidation.php":"1f97686066a2b9d5e7ee5f5eaca14396","MangoPay\/DisputeReason.php":"4b4a6fb68dc5b61c2565a87f9398d511","MangoPay\/Client.php":"bb1fa3e61cd56063f0b35f61652cc249","MangoPay\/PayInPaymentDetailsGiropay.php":"c180d47308a9041d425c2856338c92dd","MangoPay\/PayInPaymentDetailsBlik.php":"3ee2b5f65e5bfde161c69ad8baf1b5f8","MangoPay\/CancelDeposit.php":"63a4cd6ba00d009cd86404449cf5f3b5","MangoPay\/PayInPaymentDetailsCard.php":"0e96ec20e2215e53b32c74484bf51195","MangoPay\/PayOutEligibilityRequest.php":"06bd74bc9941c03aec3d66c62fd62021","MangoPay\/RecurringPayInCIT.php":"96b58ffd6f0a0c711d712e76402b34c2","MangoPay\/UboDeclarationRefusedReasonType.php":"b238aaa7400dc890a9640c60b255f227","tests\/Mocks\/MockStorageStrategy.php":"f8e1a1a5956ff891b01851621e034a6c","tests\/Cases\/RateLimitTest.php":"129472fa4e50404058a2bc7577d4a665","tests\/Cases\/CardPreAuthorizationsTest.php":"26a6e899e126b5ca24172b0398694dbc","tests\/Cases\/PayInsTest.php":"e0e55d551c5eb82aafc07d7e7b7abdbe","tests\/Cases\/WalletsTest.php":"79d8badbfe3a5144f152ba646ed42463","tests\/Cases\/EventsTest.php":"e3b6e2f9e108eb932b1cf409c6a52c2a","tests\/Cases\/TransfersTest.php":"21312ba55feb0e5be7cb607631a51c3a","tests\/Cases\/UsersTest.php":"1f2f8965536051da234f2c89e1fcf4c8","tests\/Cases\/ReportsTest.php":"cfe3c38e9a0d2494071c0979a6ae0be4","tests\/Cases\/RegulatoryTest.php":"2dc25d75013eda5f5922afa2d5ba671c","tests\/Cases\/KycDocumentsTest.php":"12f653c7e5cad23ff2d1a936b9f4ece8","tests\/Cases\/IdempotencyTest.php":"df94903a0bbd97fc15c33ce2950a5267","tests\/Cases\/PayOutsTest.php":"e3db81115a7f36862cf0e7c7511b3f61","tests\/Cases\/DepositTest.php":"d5dbc60f761283a508c1616e6cfc0508","tests\/Cases\/MandatesTest.php":"07f7ee8e40c876618decfe114ce5b74e","tests\/Cases\/CardRegistrationsTest.php":"bf212fa0cbfed9ff78babb0bc24f56ef","tests\/Cases\/ConversionsTest.php":"339926d76685b6e3a3989689bd1c4ea1","tests\/Cases\/BankAccountsTest.php":"6deab0b50fa61e54d747ab5538ea3014","tests\/Cases\/Constants.php":"f6e58873a03b5f02863e57411c4cd638","tests\/Cases\/UboDeclarationsTest.php":"0634a315ff5a1c4c3d4ead6de28f154f","tests\/Cases\/HooksTest.php":"a81aa42b18abb170adde6919db6f2621","tests\/Cases\/CardsTest.php":"e25f5ed34dad0b8541c52ce940d55265","tests\/Cases\/Base.php":"d0db664038da596e1b28dfa2a0e06674","tests\/Cases\/ConfigurationTest.php":"c184305eac6c7602b66172564219b300","tests\/Cases\/DisputesTest.php":"ac2b402bd072975b955463aa8412029b","tests\/Cases\/ErrorTests.php":"97f14579a7f9ddebc5899e475458cd79","tests\/Cases\/TokensTest.php":"f17c0817633983a79347b0c4774afea1","tests\/Cases\/BankingAliasTest.php":"49b4a44067fb5b838ad0821fc825e789","tests\/Cases\/RefundsTest.php":"96f896bc4f10d17c5dcbc59a67f1df80","tests\/Cases\/ClientTest.php":"ee475a64280fa5b0602dc5ef6b45da28"}} \ No newline at end of file diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 00000000..6aba95ff --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,20 @@ +in(__DIR__.'/MangoPay') + ->in(__DIR__.'/tests') +; + +return (new PhpCsFixer\Config()) + ->setRules([ + '@PSR12' => true, + 'fully_qualified_strict_types' => true, + 'array_syntax' => ['syntax' => 'short'], + 'visibility_required' => [ + 'elements' => ['property', 'method'], // 'const' is removed for old PHP compat + ], + ]) + ->setFinder($finder) + ; \ No newline at end of file diff --git a/.php_cs b/.php_cs deleted file mode 100644 index b32060ed..00000000 --- a/.php_cs +++ /dev/null @@ -1,19 +0,0 @@ -in(__DIR__.'/MangoPay') - ->in(__DIR__.'/tests') -; - -$config = new PhpCsFixer\Config(); - -return $config->setRules([ - '@PSR12' => true, - 'fully_qualified_strict_types' => true, - 'array_syntax' => ['syntax' => 'short'], - 'visibility_required' => ['property', 'method'],// 'const' is removed for old PHP compat - ]) - ->setFinder($finder) -; diff --git a/composer.json b/composer.json index 0b07c1c1..840755b8 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,6 @@ }, "require-dev": { "phpunit/phpunit": ">=5.7.27 <10", - "friendsofphp/php-cs-fixer": "^2.18" + "friendsofphp/php-cs-fixer": "^3.54" } } From fad9d563bb553ca43b0ec062243444f7e902e0de Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:22:23 +0600 Subject: [PATCH 04/37] added: docker file for 8.1 and 8.2 --- php_env/PHP_8.1/Dockerfile | 28 ++++++++++++++++++++++++++++ php_env/PHP_8.1/composer.sh | 17 +++++++++++++++++ php_env/PHP_8.2/Dockerfile | 28 ++++++++++++++++++++++++++++ php_env/PHP_8.2/composer.sh | 17 +++++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 php_env/PHP_8.1/Dockerfile create mode 100644 php_env/PHP_8.1/composer.sh create mode 100644 php_env/PHP_8.2/Dockerfile create mode 100644 php_env/PHP_8.2/composer.sh diff --git a/php_env/PHP_8.1/Dockerfile b/php_env/PHP_8.1/Dockerfile new file mode 100644 index 00000000..f0993f8a --- /dev/null +++ b/php_env/PHP_8.1/Dockerfile @@ -0,0 +1,28 @@ +FROM php:8.1-cli + +# Update and import specific required librairies + +RUN apt-get update && apt-get install -y apt-utils +RUN apt-get install -y \ + unzip \ + libicu-dev \ + libonig-dev \ + gcc \ + wget \ + zlib1g-dev \ + libzip-dev + +# Parametrize PHP + +RUN docker-php-ext-install mbstring +RUN docker-php-ext-install intl +RUN docker-php-ext-install zip +RUN docker-php-ext-install pcntl +RUN docker-php-source delete + +# Install composer +COPY composer.sh / +RUN chmod +x composer.sh +RUN /composer.sh +RUN mv composer.phar /usr/local/bin/composer +RUN mkdir /.composer && chmod o+rwx /.composer diff --git a/php_env/PHP_8.1/composer.sh b/php_env/PHP_8.1/composer.sh new file mode 100644 index 00000000..a61aff80 --- /dev/null +++ b/php_env/PHP_8.1/composer.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + +if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] +then + >&2 echo 'ERROR: Invalid installer checksum' + rm composer-setup.php + exit 1 +fi + +php composer-setup.php --quiet +RESULT=$? +rm composer-setup.php +exit $RESULT diff --git a/php_env/PHP_8.2/Dockerfile b/php_env/PHP_8.2/Dockerfile new file mode 100644 index 00000000..266375cb --- /dev/null +++ b/php_env/PHP_8.2/Dockerfile @@ -0,0 +1,28 @@ +FROM php:8.2-cli + +# Update and import specific required librairies + +RUN apt-get update && apt-get install -y apt-utils +RUN apt-get install -y \ + unzip \ + libicu-dev \ + libonig-dev \ + gcc \ + wget \ + zlib1g-dev \ + libzip-dev + +# Parametrize PHP + +RUN docker-php-ext-install mbstring +RUN docker-php-ext-install intl +RUN docker-php-ext-install zip +RUN docker-php-ext-install pcntl +RUN docker-php-source delete + +# Install composer +COPY composer.sh / +RUN chmod +x composer.sh +RUN /composer.sh +RUN mv composer.phar /usr/local/bin/composer +RUN mkdir /.composer && chmod o+rwx /.composer diff --git a/php_env/PHP_8.2/composer.sh b/php_env/PHP_8.2/composer.sh new file mode 100644 index 00000000..a61aff80 --- /dev/null +++ b/php_env/PHP_8.2/composer.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + +if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] +then + >&2 echo 'ERROR: Invalid installer checksum' + rm composer-setup.php + exit 1 +fi + +php composer-setup.php --quiet +RESULT=$? +rm composer-setup.php +exit $RESULT From f4e69f4d7856e708d99c0440f1f5a8c9aafa0fa5 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:24:37 +0600 Subject: [PATCH 05/37] fix: PHP Coding standards issues --- MangoPay/ApiBankAccounts.php | 8 +- MangoPay/ApiBankingAliases.php | 18 +- MangoPay/ApiCardPreAuthorizations.php | 10 +- MangoPay/ApiCardRegistrations.php | 10 +- MangoPay/ApiCards.php | 26 +-- MangoPay/ApiClients.php | 50 ++--- MangoPay/ApiConversions.php | 6 +- MangoPay/ApiDisputeDocuments.php | 10 +- MangoPay/ApiDisputes.php | 78 ++++---- MangoPay/ApiEvents.php | 6 +- MangoPay/ApiHooks.php | 12 +- MangoPay/ApiKycDocuments.php | 10 +- MangoPay/ApiMandates.php | 20 +- MangoPay/ApiPayIns.php | 46 ++--- MangoPay/ApiPayOuts.php | 14 +- MangoPay/ApiRefunds.php | 2 +- MangoPay/ApiRegulatory.php | 6 +- MangoPay/ApiReports.php | 14 +- MangoPay/ApiRepudiations.php | 6 +- MangoPay/ApiResponses.php | 2 +- MangoPay/ApiTransfers.php | 16 +- MangoPay/ApiUboDeclarations.php | 4 +- MangoPay/ApiUsers.php | 92 ++++----- MangoPay/ApiWallets.php | 12 +- MangoPay/BankingAlias.php | 2 +- MangoPay/BankingAliasIBAN.php | 2 +- MangoPay/Billing.php | 2 +- MangoPay/CardPreAuthorization.php | 12 +- MangoPay/CardRegistration.php | 2 +- MangoPay/CardValidation.php | 4 +- MangoPay/Client.php | 4 +- MangoPay/Conversion.php | 6 +- MangoPay/ConversionQuote.php | 6 +- MangoPay/DeclaredUbo.php | 4 +- MangoPay/Dispute.php | 12 +- MangoPay/DisputeDocument.php | 4 +- MangoPay/DisputeReason.php | 2 +- MangoPay/Event.php | 2 +- MangoPay/EventType.php | 2 +- MangoPay/FilterDisputeDocuments.php | 4 +- MangoPay/FilterDisputes.php | 2 +- MangoPay/FilterEvents.php | 2 +- MangoPay/FilterKycDocuments.php | 4 +- MangoPay/FilterPreAuthorizations.php | 4 +- MangoPay/FilterRefunds.php | 2 +- MangoPay/FilterTransactions.php | 6 +- MangoPay/Hook.php | 6 +- MangoPay/KycDocument.php | 4 +- MangoPay/Libraries/ApiOAuth.php | 2 +- MangoPay/Libraries/AuthenticationHelper.php | 6 +- .../Libraries/AuthorizationTokenManager.php | 8 +- MangoPay/Libraries/DefaultStorageStrategy.php | 12 +- MangoPay/Libraries/IStorageStrategy.php | 4 +- MangoPay/Libraries/RestTool.php | 2 +- MangoPay/Mandate.php | 2 +- MangoPay/MangoPayApi.php | 14 +- MangoPay/PayInExecutionDetailsDirect.php | 4 +- ...yInExecutionDetailsExternalInstruction.php | 2 +- MangoPay/PayInExecutionDetailsWeb.php | 2 +- MangoPay/PayInPaymentDetailsApplePay.php | 2 +- MangoPay/PayInPaymentDetailsBankWire.php | 6 +- MangoPay/PayInRecurringRegistration.php | 12 +- MangoPay/PayOut.php | 44 ++--- MangoPay/RecurringPayInCIT.php | 2 +- MangoPay/RecurringPayInMIT.php | 4 +- MangoPay/Refund.php | 2 +- MangoPay/ReportRequest.php | 6 +- MangoPay/Repudiation.php | 10 +- MangoPay/SettlementTransfer.php | 4 +- MangoPay/Transaction.php | 12 +- MangoPay/UboDeclaration.php | 4 +- tests/Cases/Base.php | 108 +++++------ tests/Cases/CardPreAuthorizationsTest.php | 20 +- tests/Cases/CardsTest.php | 4 +- tests/Cases/ConversionsTest.php | 1 + tests/Cases/DepositTest.php | 38 ++-- tests/Cases/DisputesTest.php | 4 +- tests/Cases/PayInsTest.php | 176 +++++++++--------- tests/Cases/UsersTest.php | 8 +- tests/Cases/WalletsTest.php | 2 +- 80 files changed, 553 insertions(+), 552 deletions(-) diff --git a/MangoPay/ApiBankAccounts.php b/MangoPay/ApiBankAccounts.php index c57e85f7..0e3247de 100644 --- a/MangoPay/ApiBankAccounts.php +++ b/MangoPay/ApiBankAccounts.php @@ -10,10 +10,10 @@ class ApiBankAccounts extends Libraries\ApiBase /** * Retrieves a list of Transactions pertaining to a certain Bank Account * @param string $bankAccountId Bank Account identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterTransactions $filter Filtering object - * @param \MangoPay\Sorting $sorting Sorting object - * @throws \MangoPay\Libraries\Exception + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Filtering object + * @param Sorting $sorting Sorting object + * @throws Libraries\Exception */ public function GetTransactions($bankAccountId, & $pagination = null, $filter = null, $sorting = null) { diff --git a/MangoPay/ApiBankingAliases.php b/MangoPay/ApiBankingAliases.php index d66252ae..2ecd67ce 100644 --- a/MangoPay/ApiBankingAliases.php +++ b/MangoPay/ApiBankingAliases.php @@ -10,7 +10,7 @@ class ApiBankingAliases extends Libraries\ApiBase /** * Get a banking alias * @param string $bankingAliasId Banking alias identifier - * @return \MangoPay\BankingAlias returned from API + * @return BankingAlias returned from API */ public function Get($bankingAliasId) { @@ -20,8 +20,8 @@ public function Get($bankingAliasId) /** * Create a banking alias - * @param \MangoPay\BankingAlias $bankingAlias Banking alias - * @return \MangoPay\BankingAlias returned from API + * @param BankingAlias $bankingAlias Banking alias + * @return BankingAlias returned from API * @throws Libraries\Exception */ public function Create($bankingAlias) @@ -39,8 +39,8 @@ public function Create($bankingAlias) /** * Update banking alias - * @param \MangoPay\BankingAlias $bankingAlias Card object to save - * @return \MangoPay\BankingAlias Card object returned from API + * @param BankingAlias $bankingAlias Card object to save + * @return BankingAlias Card object returned from API */ public function Update($bankingAlias) { @@ -50,8 +50,8 @@ public function Update($bankingAlias) /** * Get all banking aliases - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data * @param string $walletId Wallet identifier * @return \MangoPay\BankingAlias[] List of banking aliases */ @@ -64,8 +64,8 @@ public function GetAll($walletId, & $pagination = null, $sorting = null) /** * Get correct banking alias object * @param object $response Response from API - * @return \MangoPay\BankingAlias BankingAlias object returned from API - * @throws \MangoPay\Libraries\Exception If occur unexpected response from API + * @return BankingAlias BankingAlias object returned from API + * @throws Libraries\Exception If occur unexpected response from API */ private function GetBankingAliasResponse($response) { diff --git a/MangoPay/ApiCardPreAuthorizations.php b/MangoPay/ApiCardPreAuthorizations.php index 6a70bf5c..40efef61 100644 --- a/MangoPay/ApiCardPreAuthorizations.php +++ b/MangoPay/ApiCardPreAuthorizations.php @@ -9,8 +9,8 @@ class ApiCardPreAuthorizations extends Libraries\ApiBase { /** * Create new pre-authorization object - * @param \MangoPay\CardPreAuthorization $cardPreAuthorization PreAuthorization object to create - * @return \MangoPay\CardPreAuthorization PreAuthorization object returned from API + * @param CardPreAuthorization $cardPreAuthorization PreAuthorization object to create + * @return CardPreAuthorization PreAuthorization object returned from API */ public function Create($cardPreAuthorization, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($cardPreAuthorization, $idempotencyKey = null) /** * Get pre-authorization object * @param string $cardPreAuthorizationId PreAuthorization identifier - * @return \MangoPay\CardPreAuthorization Card registration object returned from API + * @return CardPreAuthorization Card registration object returned from API */ public function Get($cardPreAuthorizationId) { @@ -29,8 +29,8 @@ public function Get($cardPreAuthorizationId) /** * Update pre-authorization object - * @param \MangoPay\CardPreAuthorization $cardPreAuthorization PreAuthorization object to save - * @return \MangoPay\CardPreAuthorization PreAuthorization object returned from API + * @param CardPreAuthorization $cardPreAuthorization PreAuthorization object to save + * @return CardPreAuthorization PreAuthorization object returned from API */ public function Update($cardPreAuthorization) { diff --git a/MangoPay/ApiCardRegistrations.php b/MangoPay/ApiCardRegistrations.php index e45ab7c0..aac662a0 100644 --- a/MangoPay/ApiCardRegistrations.php +++ b/MangoPay/ApiCardRegistrations.php @@ -9,8 +9,8 @@ class ApiCardRegistrations extends Libraries\ApiBase { /** * Create new card registration - * @param \MangoPay\CardRegistration $cardRegistration Card registration object to create - * @return \MangoPay\CardRegistration Card registration object returned from API + * @param CardRegistration $cardRegistration Card registration object to create + * @return CardRegistration Card registration object returned from API */ public function Create($cardRegistration, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($cardRegistration, $idempotencyKey = null) /** * Get card registration * @param string $cardRegistrationId Card Registration identifier - * @return \MangoPay\CardRegistration Card registration object returned from API + * @return CardRegistration Card registration object returned from API */ public function Get($cardRegistrationId) { @@ -29,8 +29,8 @@ public function Get($cardRegistrationId) /** * Update card registration - * @param \MangoPay\CardRegistration $cardRegistration Card registration object to save - * @return \MangoPay\CardRegistration Card registration object returned from API + * @param CardRegistration $cardRegistration Card registration object to save + * @return CardRegistration Card registration object returned from API */ public function Update($cardRegistration) { diff --git a/MangoPay/ApiCards.php b/MangoPay/ApiCards.php index 33e3f484..9d699730 100644 --- a/MangoPay/ApiCards.php +++ b/MangoPay/ApiCards.php @@ -10,7 +10,7 @@ class ApiCards extends Libraries\ApiBase /** * Get card * @param string $cardId Card identifier - * @return \MangoPay\Card object returned from API + * @return Card object returned from API */ public function Get($cardId) { @@ -22,8 +22,8 @@ public function Get($cardId) * The fingerprint is a hash uniquely generated per 16-digit card number. * * @param string $fingerprint The fingerprint hash - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Sorting object * @return \MangoPay\Card[] List of Cards corresponding to provided fingerprint */ public function GetByFingerprint($fingerprint, & $pagination = null, $sorting = null) @@ -33,8 +33,8 @@ public function GetByFingerprint($fingerprint, & $pagination = null, $sorting = /** * Update card - * @param \MangoPay\Card $card Card object to save - * @return \MangoPay\Card Card object returned from API + * @param Card $card Card object to save + * @return Card Card object returned from API */ public function Update($card) { @@ -44,9 +44,9 @@ public function Update($card) /** * Gets a Card's PreAuthorizations * @param int $cardId ID of the Card for which to retrieve PreAuthorizations - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterPreAuthorizations filter Filtering object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param FilterPreAuthorizations filter Filtering object + * @param Sorting $sorting Sorting object * @return \MangoPay\CardPreAuthorization[] List of the Card's PreAuthorizations */ public function GetPreAuthorizations($cardId, $pagination = null, $filter = null, $sorting = null) @@ -57,9 +57,9 @@ public function GetPreAuthorizations($cardId, $pagination = null, $filter = null /** * Retrieves a list of Transactions pertaining to a certain Card * @param string $cardId Card identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterTransactions $filter Filtering object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Filtering object + * @param Sorting $sorting Sorting object * @return \MangoPay\Transaction[] */ public function GetTransactions($cardId, & $pagination = null, $filter = null, $sorting = null) @@ -70,7 +70,7 @@ public function GetTransactions($cardId, & $pagination = null, $filter = null, $ /** * Validate a card * @param $cardId - * @return \MangoPay\CardValidation + * @return CardValidation * @throws Libraries\Exception */ public function ValidateCard($cardId, $cardValidation) @@ -81,7 +81,7 @@ public function ValidateCard($cardId, $cardValidation) /** * Get card validation * @param $cardId, $cardValidationId - * @return \MangoPay\Card + * @return Card * @throws Libraries\Exception */ public function GetCardValidation($cardId, $cardValidationId) diff --git a/MangoPay/ApiClients.php b/MangoPay/ApiClients.php index 584b5027..53aa348a 100644 --- a/MangoPay/ApiClients.php +++ b/MangoPay/ApiClients.php @@ -10,7 +10,7 @@ class ApiClients extends Libraries\ApiBase /** * Get client information * - * @return \MangoPay\Client Client object returned from API + * @return Client Client object returned from API */ public function Get() { @@ -20,7 +20,7 @@ public function Get() /** * Save client * @param Client $client Client object to save - * @return \MangoPay\Client Client object returned from API + * @return Client Client object returned from API */ public function Update($client) { @@ -37,13 +37,13 @@ public function Update($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 + * @param 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) { + } catch (Libraries\ResponseException $exc) { if ($exc->getCode() != 204) { throw $exc; } @@ -55,7 +55,7 @@ public function UploadLogo($logoUpload, $idempotencyKey = null) * 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 + * @throws Libraries\Exception */ public function UploadLogoFromFile($file, $idempotencyKey = null) { @@ -65,18 +65,18 @@ public function UploadLogoFromFile($file, $idempotencyKey = null) } if (empty($filePath)) { - throw new \MangoPay\Libraries\Exception('Path of file cannot be empty'); + throw new Libraries\Exception('Path of file cannot be empty'); } if (!file_exists($filePath)) { - throw new \MangoPay\Libraries\Exception('File not exist'); + throw new Libraries\Exception('File not exist'); } - $logoUpload = new \MangoPay\ClientLogoUpload(); + $logoUpload = new 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'); + throw new Libraries\Exception('Content of the file cannot be empty'); } $this->UploadLogo($logoUpload, $idempotencyKey); @@ -86,14 +86,14 @@ public function UploadLogoFromFile($file, $idempotencyKey = null) * 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 + * @param FundsType $fundsType FundsType enum + * @param Sorting $sorting Sorting object * * @return \MangoPay\Wallet[] List with your client wallets */ public function GetWallets($fundsType = null, $sorting = null) { - $pagination = new \MangoPay\Pagination(); + $pagination = new Pagination(); if (is_null($fundsType)) { return $this->GetList('client_wallets', $pagination, '\MangoPay\Wallet', null, null, $sorting); @@ -103,27 +103,27 @@ public function GetWallets($fundsType = null, $sorting = null) 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'); + throw new 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 + * @param FundsType $fundsType FundsType enum + * @param CurrencyIso $currencyIso CurrencyIso enum * - * @return \MangoPay\Wallet Wallet (fees or credit) with a particular currency + * @return Wallet Wallet (fees or credit) with a particular currency */ public function GetWallet($fundsType, $currencyIso) { if (is_null($fundsType)) { - throw new \MangoPay\Libraries\Exception( + throw new Libraries\Exception( 'First parameter in function GetWallet in class ApiClients is required.' ); } if (is_null($currencyIso)) { - throw new \MangoPay\Libraries\Exception( + throw new Libraries\Exception( 'Second parameter in function GetWallet in class ApiClients is required.' ); } @@ -134,7 +134,7 @@ public function GetWallet($fundsType, $currencyIso) } elseif ($fundsType == FundsType::CREDIT) { $methodKey = 'client_wallets_credit_currency'; } else { - throw new \MangoPay\Libraries\Exception('\MangoPay\FundsType object has wrong value and cannot get wallets'); + throw new Libraries\Exception('\MangoPay\FundsType object has wrong value and cannot get wallets'); } return $this->GetObject($methodKey, '\MangoPay\Wallet', $currencyIso); @@ -143,10 +143,10 @@ public function GetWallet($fundsType, $currencyIso) /** * 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 + * @param FundsType $fundsType FundsType enum + * @param CurrencyIso $currencyIso CurrencyIso enum + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Object to filter data * * @return \MangoPay\Transaction[] Transactions linked to your client wallets (fees and credit) */ @@ -159,13 +159,13 @@ public function GetWalletTransactions($fundsType = null, $currencyIso = null, & } elseif ($fundsType == FundsType::CREDIT) { $methodKey = 'client_wallets_transactions_credit_currency'; } else { - throw new \MangoPay\Libraries\Exception( + throw new Libraries\Exception( '\MangoPay\FundsType object has wrong value.' ); } if (!is_null($fundsType) && is_null($currencyIso)) { - throw new \MangoPay\Libraries\Exception( + throw new Libraries\Exception( 'If FundsType is defined the second parameter (currency) is required.' ); } diff --git a/MangoPay/ApiConversions.php b/MangoPay/ApiConversions.php index 874299ff..6fefe241 100644 --- a/MangoPay/ApiConversions.php +++ b/MangoPay/ApiConversions.php @@ -13,7 +13,7 @@ class ApiConversions extends Libraries\ApiBase * The rate returned is given in real time. * @param string $debitedCurrency The sell currency – the currency of the wallet to be debited * @param string $creditedCurrency The buy currency – the currency of the wallet to be credited. - * @return \MangoPay\ConversionRate object returned from API + * @return ConversionRate object returned from API */ public function GetConversionRate($debitedCurrency, $creditedCurrency) { @@ -24,7 +24,7 @@ public function GetConversionRate($debitedCurrency, $creditedCurrency) * This endpoint allows the platform to move funds between two * wallets of different currencies instantaneously. * @param CreateInstantConversion $instantConversion - * @return \MangoPay\Conversion object returned from API + * @return Conversion object returned from API */ public function CreateInstantConversion($instantConversion) { @@ -46,7 +46,7 @@ public function CreateQuotedConversion($quotedConversion) * This endpoint allows the platform to get * the details of a conversion which has been carried out. * @param string $id The unique identifier of the conversion. - * @return \MangoPay\Conversion object returned from API + * @return Conversion object returned from API */ public function GetConversion($id) { diff --git a/MangoPay/ApiDisputeDocuments.php b/MangoPay/ApiDisputeDocuments.php index ab5523ed..e4fe6fa0 100644 --- a/MangoPay/ApiDisputeDocuments.php +++ b/MangoPay/ApiDisputeDocuments.php @@ -15,7 +15,7 @@ class ApiDisputeDocuments extends Libraries\ApiBase /** * Gets dispute's document * @param string $documentId Dispute's document identifier - * @return \MangoPay\DisputeDocument Dispute's document object returned from API + * @return DisputeDocument Dispute's document object returned from API */ public function Get($documentId) { @@ -24,9 +24,9 @@ public function Get($documentId) /** * Gets dispute's documents for client - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data - * @param \MangoPay\FilterKycDocuments $filter Filtering object + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data + * @param FilterKycDocuments $filter Filtering object * @return \MangoPay\DisputeDocument[] List of dispute documents returned from API */ public function GetAll(& $pagination = null, $sorting = null, $filter = null) @@ -38,7 +38,7 @@ public function GetAll(& $pagination = null, $sorting = null, $filter = null) * Creates temporary URLs where each page of a dispute document can be viewed. * * @param string $documentId Identification of the document whose pages to view - * @param \MangoPay\Pagination $pagination Pagination object + * @param Pagination $pagination Pagination object * @return \MangoPay\DocumentPageConsult[] Array of consults for viewing the dispute document's pages */ public function CreateDisputeDocumentConsult($documentId, & $pagination = null) diff --git a/MangoPay/ApiDisputes.php b/MangoPay/ApiDisputes.php index de041b1a..d0961b61 100644 --- a/MangoPay/ApiDisputes.php +++ b/MangoPay/ApiDisputes.php @@ -15,7 +15,7 @@ class ApiDisputes extends Libraries\ApiBase /** * Gets dispute * @param string $disputeId Dispute identifier - * @return \MangoPay\Dispute Dispute instance returned from API + * @return Dispute Dispute instance returned from API */ public function Get($disputeId) { @@ -24,9 +24,9 @@ public function Get($disputeId) /** * Get all disputes - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data - * @param \MangoPay\FilterDisputes $filter Filtering object + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data + * @param FilterDisputes $filter Filtering object * @return \MangoPay\Dispute[] Array with disputes */ public function GetAll(& $pagination = null, $sorting = null, $filter = null) @@ -36,8 +36,8 @@ public function GetAll(& $pagination = null, $sorting = null, $filter = null) /** * List Disputes that need settling - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data * @return \MangoPay\Dispute[] Array with disputes */ public function GetPendingSettlements(& $pagination = null, $sorting = null) @@ -47,8 +47,8 @@ public function GetPendingSettlements(& $pagination = null, $sorting = null) /** * Updates dispute's tag - * @param \MangoPay\Dispute Dispute object to update - * @return \MangoPay\Dispute Transfer instance returned from API + * @param Dispute Dispute object to update + * @return Dispute Transfer instance returned from API */ public function Update($dispute) { @@ -58,8 +58,8 @@ public function Update($dispute) /** * Contests dispute * @param string $disputeId Dispute identifier - * @param \MangoPay\Money $contestedFunds Contested funds - * @return \MangoPay\Dispute Dispute instance returned from API + * @param Money $contestedFunds Contested funds + * @return Dispute Dispute instance returned from API */ public function ContestDispute($disputeId, $contestedFunds) { @@ -72,7 +72,7 @@ public function ContestDispute($disputeId, $contestedFunds) /** * This method is used to resubmit a Dispute if it is reopened requiring more docs * @param string $disputeId Dispute identifier - * @return \MangoPay\Dispute Dispute instance returned from API + * @return Dispute Dispute instance returned from API */ public function ResubmitDispute($disputeId) { @@ -84,7 +84,7 @@ public function ResubmitDispute($disputeId) /** * Close dispute * @param string $disputeId Dispute identifier - * @return \MangoPay\Dispute Dispute instance returned from API + * @return Dispute Dispute instance returned from API */ public function CloseDispute($disputeId) { @@ -96,9 +96,9 @@ public function CloseDispute($disputeId) /** * Gets dispute's transactions * @param string $disputeId Dispute identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data - * @param \MangoPay\FilterTransactions $filter Filtering object + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data + * @param FilterTransactions $filter Filtering object * @return \MangoPay\Transaction[] List of Transaction instances returned from API * @throws Libraries\Exception */ @@ -110,9 +110,9 @@ public function GetTransactions($disputeId, & $pagination = null, $sorting = nul /** * Gets dispute's documents for wallet * @param string $walletId Wallet identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data - * @param \MangoPay\FilterDisputes $filter Filtering object + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data + * @param FilterDisputes $filter Filtering object * @return \MangoPay\Dispute[] List of dispute instances returned from API * @throws Libraries\Exception */ @@ -124,9 +124,9 @@ public function GetDisputesForWallet($walletId, & $pagination = null, $sorting = /** * Gets user's disputes * @param string $userId User identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data - * @param \MangoPay\FilterDisputes $filter Filtering object + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data + * @param FilterDisputes $filter Filtering object * @return \MangoPay\Dispute[] List of Dispute instances returned from API * @throws Libraries\Exception */ @@ -138,7 +138,7 @@ public function GetDisputesForUser($userId, & $pagination = null, $sorting = nul /** * Gets repudiation * @param string $repudiationId Repudiation identifier - * @return \MangoPay\Repudiation Repudiation instance returned from API + * @return Repudiation Repudiation instance returned from API */ public function GetRepudiation($repudiationId) { @@ -147,9 +147,9 @@ public function GetRepudiation($repudiationId) /** * Creates settlement transfer - * @param \MangoPay\SettlementTransfer $settlementTransfer Settlement transfer + * @param SettlementTransfer $settlementTransfer Settlement transfer * @param string $repudiationId Repudiation identifier - * @return \MangoPay\Transfer Transfer instance returned from API + * @return Transfer Transfer instance returned from API */ public function CreateSettlementTransfer($settlementTransfer, $repudiationId, $idempotencyKey = null) { @@ -159,7 +159,7 @@ public function CreateSettlementTransfer($settlementTransfer, $repudiationId, $i /** * Gets settlement transfer * @param string $settlementTransferId Settlement transfer identifier - * @return \MangoPay\SettlementTransfer Transfer instance returned from API + * @return SettlementTransfer Transfer instance returned from API */ public function GetSettlementTransfer($settlementTransferId) { @@ -169,9 +169,9 @@ public function GetSettlementTransfer($settlementTransferId) /** * Gets documents for dispute * @param string $disputeId Dispute identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data - * @param \MangoPay\FilterDisputeDocuments $filter Filtering object + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data + * @param FilterDisputeDocuments $filter Filtering object * @return \MangoPay\DisputeDocument[] List of DisputeDocument instances returned from API * @throws Libraries\Exception */ @@ -183,8 +183,8 @@ public function GetDocumentsForDispute($disputeId, & $pagination = null, $sortin /** * Update dispute document * @param string $disputeId Dispute identifier - * @param \MangoPay\DisputeDocument $disputeDocument Dispute document to save - * @return \MangoPay\DisputeDocument Document returned from API + * @param DisputeDocument $disputeDocument Dispute document to save + * @return DisputeDocument Document returned from API */ public function UpdateDisputeDocument($disputeId, $disputeDocument) { @@ -194,8 +194,8 @@ public function UpdateDisputeDocument($disputeId, $disputeDocument) /** * Creates document for dispute * @param string $disputeId Dispute identifier - * @param \MangoPay\DisputeDocument $disputeDocument Dispute document to be created - * @return \MangoPay\DisputeDocument Dispute document returned from API + * @param DisputeDocument $disputeDocument Dispute document to be created + * @return DisputeDocument Dispute document returned from API */ public function CreateDisputeDocument($disputeId, $disputeDocument, $idempotencyKey = null) { @@ -206,13 +206,13 @@ public function CreateDisputeDocument($disputeId, $disputeDocument, $idempotency * Creates document's page for dispute * @param string $disputeId Dispute identifier * @param string $disputeDocumentId Dispute document identifier - * @param \MangoPay\DisputeDocumentPage $disputeDocumentPage Dispute document page object + * @param DisputeDocumentPage $disputeDocumentPage Dispute document page object */ public function CreateDisputeDocumentPage($disputeId, $disputeDocumentId, $disputeDocumentPage, $idempotencyKey = null) { try { $this->CreateObject('disputes_document_page_create', $disputeDocumentPage, null, $disputeId, $disputeDocumentId, $idempotencyKey); - } catch (\MangoPay\Libraries\ResponseException $exc) { + } catch (Libraries\ResponseException $exc) { if ($exc->getCode() != 204) { throw $exc; } @@ -224,7 +224,7 @@ public function CreateDisputeDocumentPage($disputeId, $disputeDocumentId, $dispu * @param string $disputeId Dispute identifier * @param string $disputeDocumentId Dispute document identifier * @param string $file File path - * @throws \MangoPay\Libraries\Exception + * @throws Libraries\Exception */ public function CreateDisputeDocumentPageFromFile($disputeId, $disputeDocumentId, $file, $idempotencyKey = null) { @@ -234,18 +234,18 @@ public function CreateDisputeDocumentPageFromFile($disputeId, $disputeDocumentId } if (empty($filePath)) { - throw new \MangoPay\Libraries\Exception('Path of file cannot be empty'); + throw new Libraries\Exception('Path of file cannot be empty'); } if (!file_exists($filePath)) { - throw new \MangoPay\Libraries\Exception('File not exist'); + throw new Libraries\Exception('File not exist'); } - $disputeDocumentPage = new \MangoPay\DisputeDocumentPage(); + $disputeDocumentPage = new DisputeDocumentPage(); $disputeDocumentPage->File = base64_encode(file_get_contents($filePath)); if (empty($disputeDocumentPage->File)) { - throw new \MangoPay\Libraries\Exception('Content of the file cannot be empty'); + throw new Libraries\Exception('Content of the file cannot be empty'); } $this->CreateDisputeDocumentPage($disputeId, $disputeDocumentId, $disputeDocumentPage, $idempotencyKey); diff --git a/MangoPay/ApiEvents.php b/MangoPay/ApiEvents.php index 3b6059f4..0c221a2f 100644 --- a/MangoPay/ApiEvents.php +++ b/MangoPay/ApiEvents.php @@ -9,9 +9,9 @@ class ApiEvents extends Libraries\ApiBase { /** * Get events - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterEvents $filter Object to filter data - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param FilterEvents $filter Object to filter data + * @param Sorting $sorting Object to sorting data * * @return \MangoPay\Event[] Events list */ diff --git a/MangoPay/ApiHooks.php b/MangoPay/ApiHooks.php index 12e92680..c2622e7a 100644 --- a/MangoPay/ApiHooks.php +++ b/MangoPay/ApiHooks.php @@ -11,7 +11,7 @@ class ApiHooks extends Libraries\ApiBase * Create new hook * @param Hook $hook * @param string $idempotencyKey Idempotency key for response replication - * @return \MangoPay\Hook Hook object returned from API + * @return Hook Hook object returned from API */ public function Create($hook, $idempotencyKey = null) { @@ -21,7 +21,7 @@ public function Create($hook, $idempotencyKey = null) /** * Get hook * @param string $hookId Hook identifier - * @return \MangoPay\Hook Wallet object returned from API + * @return Hook Wallet object returned from API */ public function Get($hookId) { @@ -30,8 +30,8 @@ public function Get($hookId) /** * Save hook - * @param \MangoPay\Hook $hook Hook object to save - * @return \MangoPay\Hook Hook object returned from API + * @param Hook $hook Hook object to save + * @return Hook Hook object returned from API */ public function Update($hook) { @@ -40,8 +40,8 @@ public function Update($hook) /** * Get all hooks - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Sorting object * @return \MangoPay\Hook[] Array with objects returned from API * @throws Libraries\Exception */ diff --git a/MangoPay/ApiKycDocuments.php b/MangoPay/ApiKycDocuments.php index 64a060b2..3bd28c60 100644 --- a/MangoPay/ApiKycDocuments.php +++ b/MangoPay/ApiKycDocuments.php @@ -9,9 +9,9 @@ class ApiKycDocuments extends Libraries\ApiBase { /** * Get all KYC documents - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data - * @param \MangoPay\FilterKycDocuments $filter Object to filter data + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data + * @param FilterKycDocuments $filter Object to filter data * @return \MangoPay\KycDocument[] Array with objects returned from API */ public function GetAll(& $pagination = null, $sorting = null, $filter = null) @@ -22,7 +22,7 @@ public function GetAll(& $pagination = null, $sorting = null, $filter = null) /** * Get KYC document * @param string $kycDocumentId Document identifier - * @return \MangoPay\KycDocument Document returned from API + * @return KycDocument Document returned from API */ public function Get($kycDocumentId) { @@ -34,7 +34,7 @@ public function Get($kycDocumentId) * Creates temporary URLs where each page of a KYC document can be viewed. * * @param string $kycDocumentId Identification of the document whose pages to view - * @param \MangoPay\Pagination $pagination Pagination object + * @param Pagination $pagination Pagination object * @return \MangoPay\DocumentPageConsult[] Array of consults for viewing the KYC document's pages * @throws Libraries\Exception */ diff --git a/MangoPay/ApiMandates.php b/MangoPay/ApiMandates.php index cb9d8647..067f4483 100644 --- a/MangoPay/ApiMandates.php +++ b/MangoPay/ApiMandates.php @@ -10,7 +10,7 @@ class ApiMandates extends Libraries\ApiBase /** * Create new mandate * @param Mandate $mandate - * @return \MangoPay\Mandate Mandate object returned from API + * @return Mandate Mandate object returned from API */ public function Create($mandate, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($mandate, $idempotencyKey = null) /** * Get mandate * @param string $mandateId Mandate identifier - * @return \MangoPay\Mandate Mandate object returned from API + * @return Mandate Mandate object returned from API */ public function Get($mandateId) { @@ -30,11 +30,11 @@ public function Get($mandateId) /** * Cancel mandate * @param string $mandateId Id of mandate object to cancel - * @return \MangoPay\Mandate Mandate object returned from API + * @return Mandate Mandate object returned from API */ public function Cancel($mandateId) { - $mandate = new \MangoPay\Mandate(); + $mandate = new Mandate(); $mandate->Id = $mandateId; return $this->SaveObject('mandates_save', $mandate, '\MangoPay\Mandate'); @@ -42,9 +42,9 @@ public function Cancel($mandateId) /** * Get all mandates - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterTransactions $filter Object to filter data - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Object to filter data + * @param Sorting $sorting Object to sorting data * @return \MangoPay\Mandate[] Array with mandates */ public function GetAll(& $pagination = null, $filter = null, $sorting = null) @@ -55,9 +55,9 @@ public function GetAll(& $pagination = null, $filter = null, $sorting = null) /** * Retrieves list of Transactions pertaining to a certain Mandate * @param string $mandateId Mandate identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterTransactions $filter Filtering object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Filtering object + * @param Sorting $sorting Sorting object * @return \MangoPay\Transaction[] */ public function GetTransactions($mandateId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/ApiPayIns.php b/MangoPay/ApiPayIns.php index 5c1bb55d..96e4b7b6 100644 --- a/MangoPay/ApiPayIns.php +++ b/MangoPay/ApiPayIns.php @@ -9,8 +9,8 @@ class ApiPayIns extends Libraries\ApiBase { /** * Create new pay-in object - * @param \MangoPay\PayIn $payIn \MangoPay\PayIn object - * @return \MangoPay\PayIn Object returned from API + * @param PayIn $payIn \MangoPay\PayIn object + * @return PayIn Object returned from API */ public function Create($payIn, $idempotencyKey = null) { @@ -22,7 +22,7 @@ public function Create($payIn, $idempotencyKey = null) /** * Get pay-in object * @param string $payInId Pay-in identifier - * @return \MangoPay\PayIn Object returned from API + * @return PayIn Object returned from API */ public function Get($payInId) { @@ -32,8 +32,8 @@ public function Get($payInId) /** * Create refund for pay-in object * @param string $payInId Pay-in identifier - * @param \MangoPay\Refund $refund Refund object to create - * @return \MangoPay\Refund Object returned by REST API + * @param Refund $refund Refund object to create + * @return Refund Object returned by REST API */ public function CreateRefund($payInId, $refund, $idempotencyKey = null) { @@ -42,8 +42,8 @@ public function CreateRefund($payInId, $refund, $idempotencyKey = null) /** * Create a recurring payment - * @param \MangoPay\PayInRecurringRegistration $recurringRegistration - * @return \MangoPay\PayInRecurringRegistrationRequestResponse + * @param PayInRecurringRegistration $recurringRegistration + * @return PayInRecurringRegistrationRequestResponse */ public function CreateRecurringRegistration($recurringRegistration, $idempotencyKey = null) { @@ -53,7 +53,7 @@ public function CreateRecurringRegistration($recurringRegistration, $idempotency /** * Get recurring payment * @param string $recurringRegistrationId - * @return \MangoPay\PayInRecurringRegistrationGet + * @return PayInRecurringRegistrationGet */ public function GetRecurringRegistration($recurringRegistrationId, $idempotencyKey = null) { @@ -63,7 +63,7 @@ public function GetRecurringRegistration($recurringRegistrationId, $idempotencyK /** * Update recurring payment * @param PayInRecurringRegistrationUpdate $recurringUpdate - * @return \MangoPay\PayInRecurringRegistrationGet + * @return PayInRecurringRegistrationGet */ public function UpdateRecurringRegistration($recurringUpdate, $idempotencyKey = null) { @@ -72,8 +72,8 @@ public function UpdateRecurringRegistration($recurringUpdate, $idempotencyKey = /** * Create a Recurring PayIn CIT - * @param \MangoPay\RecurringPayInCIT $recurringPayInRegistrationCIT - * @return \MangoPay\PayInRecurring + * @param RecurringPayInCIT $recurringPayInRegistrationCIT + * @return PayInRecurring */ public function CreateRecurringPayInRegistrationCIT($recurringPayInRegistrationCIT, $idempotencyKey = null) { @@ -82,8 +82,8 @@ public function CreateRecurringPayInRegistrationCIT($recurringPayInRegistrationC /** * Create a Recurring PayIn MIT - * @param \MangoPay\RecurringPayInMIT $recurringPayInRegistrationMIT - * @return \MangoPay\PayInRecurring + * @param RecurringPayInMIT $recurringPayInRegistrationMIT + * @return PayInRecurring */ public function CreateRecurringPayInRegistrationMIT($recurringPayInRegistrationMIT, $idempotencyKey = null) { @@ -93,9 +93,9 @@ public function CreateRecurringPayInRegistrationMIT($recurringPayInRegistrationM /** * Retrieves a list of Refunds pertaining to a certain PayIn * @param string $payInId ID of PayIn for which to retrieve Refunds - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterRefunds $filter Filtering object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param FilterRefunds $filter Filtering object + * @param Sorting $sorting Sorting object * @return \MangoPay\Refund[] List of the PayIn's Refunds */ public function GetRefunds($payInId, & $pagination = null, $filter = null, $sorting = null) @@ -127,7 +127,7 @@ private function GetExecutionKey($payIn) * Retrieves a more detailed view of details concerning * the card used to process a Web payment. * @param string $payInId ID of the PayIn to retrieve card details for - * @return \MangoPay\PayInWebExtendedView Object returned from API + * @return PayInWebExtendedView Object returned from API */ public function GetExtendedCardView($payInId) { @@ -146,8 +146,8 @@ public function CreateCardPreAuthorizedDepositPayIn(CreateCardPreAuthorizedDepos /** * Create new PayPal Web pay-in object - * @param \MangoPay\PayIn $payIn \MangoPay\PayIn object - * @return \MangoPay\PayIn Object returned from API + * @param PayIn $payIn \MangoPay\PayIn object + * @return PayIn Object returned from API */ public function CreatePayPal($payIn, $idempotencyKey = null) { @@ -156,8 +156,8 @@ public function CreatePayPal($payIn, $idempotencyKey = null) /** * Create new GooglePay Direct pay-in object - * @param \MangoPay\PayIn $payIn \MangoPay\PayIn object - * @return \MangoPay\PayIn Object returned from API + * @param PayIn $payIn \MangoPay\PayIn object + * @return PayIn Object returned from API */ public function CreateGooglePay($payIn, $idempotencyKey = null) { @@ -166,8 +166,8 @@ public function CreateGooglePay($payIn, $idempotencyKey = null) /** * Look up metadata from BIN or Google Pay token - * @param \MangoPay\PaymentMethodMetadata $paymentMethodMetadata \MangoPay\PaymentMethodMetadata object - * @return \MangoPay\PaymentMethodMetadata Object returned from API + * @param PaymentMethodMetadata $paymentMethodMetadata \MangoPay\PaymentMethodMetadata object + * @return PaymentMethodMetadata Object returned from API */ public function GetPaymentMethodMetadata(PaymentMethodMetadata $paymentMethodMetadata, $idempotencyKey = null) { diff --git a/MangoPay/ApiPayOuts.php b/MangoPay/ApiPayOuts.php index c0edfcb6..59869e17 100644 --- a/MangoPay/ApiPayOuts.php +++ b/MangoPay/ApiPayOuts.php @@ -10,7 +10,7 @@ class ApiPayOuts extends Libraries\ApiBase /** * Create new pay-out * @param PayOut $payOut - * @return \MangoPay\PayOut Object returned from API + * @return PayOut Object returned from API */ public function Create($payOut, $idempotencyKey = null) { @@ -22,7 +22,7 @@ public function Create($payOut, $idempotencyKey = null) * This method is used to check whether or not the destination bank is eligible for instant payout. * @param PayOutEligibilityRequest $payOutEligibility * @param $idempotencyKey - * @return \MangoPay\PayOutEligibilityResponse Object returned for the API + * @return PayOutEligibilityResponse Object returned for the API */ public function CheckInstantPayoutEligibility($payOutEligibility, $idempotencyKey = null) { @@ -39,7 +39,7 @@ public function CheckInstantPayoutEligibility($payOutEligibility, $idempotencyKe /** * Get pay-out object * @param string $payOutId PayOut identifier - * @return \MangoPay\PayOut Object returned from API + * @return PayOut Object returned from API */ public function Get($payOutId) { @@ -49,7 +49,7 @@ public function Get($payOutId) /** * Get bankwire pay-out object * @param string $payOutId PayOut identifier - * @return \MangoPay\PayOut Object returned from API + * @return PayOut Object returned from API * @throws Libraries\Exception */ public function GetBankwire($payOutId) @@ -60,9 +60,9 @@ public function GetBankwire($payOutId) /** * Returns a list of Refunds pertaining to a certain PayOut. * @param string $payOutId ID of the PayOut for which to retrieve Refunds - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterRefunds filter Filtering object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param FilterRefunds filter Filtering object + * @param Sorting $sorting Sorting object * @return \MangoPay\Refund[] List of Refunds for the PayOut */ public function GetRefunds($payOutId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/ApiRefunds.php b/MangoPay/ApiRefunds.php index 69434394..3a654fac 100644 --- a/MangoPay/ApiRefunds.php +++ b/MangoPay/ApiRefunds.php @@ -10,7 +10,7 @@ class ApiRefunds extends Libraries\ApiBase /** * Get refund object * @param string $refundId Refund Id - * @return \MangoPay\Refund Refund object returned from API + * @return Refund Refund object returned from API */ public function Get($refundId) { diff --git a/MangoPay/ApiRegulatory.php b/MangoPay/ApiRegulatory.php index ef1895e4..0bd3e8cf 100644 --- a/MangoPay/ApiRegulatory.php +++ b/MangoPay/ApiRegulatory.php @@ -10,7 +10,7 @@ class ApiRegulatory extends Libraries\ApiBase /** * Get country authorizations by country code * @param string $countryCode - * @return \MangoPay\CountryAuthorization + * @return CountryAuthorization * @throws Libraries\Exception */ public function GetCountryAuthorizations($countryCode) @@ -20,8 +20,8 @@ public function GetCountryAuthorizations($countryCode) /** * Get all countries authorizations - * @param \MangoPay\Pagination $pagination - * @param \MangoPay\Sorting $sorting + * @param Pagination $pagination + * @param Sorting $sorting * @return \MangoPay\CountryAuthorization[] * @throws Libraries\Exception */ diff --git a/MangoPay/ApiReports.php b/MangoPay/ApiReports.php index 221249bb..04b3d1b6 100644 --- a/MangoPay/ApiReports.php +++ b/MangoPay/ApiReports.php @@ -9,8 +9,8 @@ class ApiReports extends Libraries\ApiBase { /** * Creates new report request - * @param \MangoPay\ReportRequest $reportRequest - * @return \MangoPay\ReportRequest Report request instance returned from API + * @param ReportRequest $reportRequest + * @return ReportRequest Report request instance returned from API */ public function Create($reportRequest, $idempotencyKey = null) { @@ -33,7 +33,7 @@ public function Create($reportRequest, $idempotencyKey = null) /** * Gets report request. * @param string $reportRequestId Report request identifier - * @return \MangoPay\ReportRequest Report request instance returned from API + * @return ReportRequest Report request instance returned from API */ public function Get($reportRequestId) { @@ -42,10 +42,10 @@ public function Get($reportRequestId) /** * Gets all report requests. - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterTransactions $filter Object to filter data - * @param \MangoPay\Sorting $sorting Object to sorting data - * @return \MangoPay\ReportRequest Array with report requests + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Object to filter data + * @param Sorting $sorting Object to sorting data + * @return ReportRequest Array with report requests */ public function GetAll(& $pagination = null, $filter = null, $sorting = null) { diff --git a/MangoPay/ApiRepudiations.php b/MangoPay/ApiRepudiations.php index 16c71cd9..9d8f24f2 100644 --- a/MangoPay/ApiRepudiations.php +++ b/MangoPay/ApiRepudiations.php @@ -18,9 +18,9 @@ public function Get($repudiationId) /** * Retrieves a list of Refunds pertaining to a certain Repudiation * @param string $repudiationId Repudiation identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterRefunds $filter Filtering object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param FilterRefunds $filter Filtering object + * @param Sorting $sorting Sorting object * @return \MangoPay\Refund[] */ public function GetRefunds($repudiationId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/ApiResponses.php b/MangoPay/ApiResponses.php index 1c6440c6..bbd33fbd 100644 --- a/MangoPay/ApiResponses.php +++ b/MangoPay/ApiResponses.php @@ -11,7 +11,7 @@ class ApiResponses extends Libraries\ApiBase /** * Get response from previous call by idempotency key * @param string $idempotencyKey Idempotency key - * @return \MangoPay\Response Entity of Response object + * @return Response Entity of Response object */ public function Get($idempotencyKey) { diff --git a/MangoPay/ApiTransfers.php b/MangoPay/ApiTransfers.php index 2cad41d3..d1e1df5e 100644 --- a/MangoPay/ApiTransfers.php +++ b/MangoPay/ApiTransfers.php @@ -9,8 +9,8 @@ class ApiTransfers extends Libraries\ApiBase { /** * Create new transfer - * @param \MangoPay\Transfer $transfer - * @return \MangoPay\Transfer Transfer object returned from API + * @param Transfer $transfer + * @return Transfer Transfer object returned from API */ public function Create($transfer, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($transfer, $idempotencyKey = null) /** * Get transfer * @param string $transferId Transfer identifier - * @return \MangoPay\Transfer Transfer object returned from API + * @return Transfer Transfer object returned from API */ public function Get($transferId) { @@ -30,8 +30,8 @@ public function Get($transferId) /** * Create refund for transfer object * @param string $transferId Transfer identifier - * @param \MangoPay\Refund $refund Refund object to create - * @return \MangoPay\Refund Object returned by REST API + * @param Refund $refund Refund object to create + * @return Refund Object returned by REST API */ public function CreateRefund($transferId, $refund, $idempotencyKey = null) { @@ -41,9 +41,9 @@ public function CreateRefund($transferId, $refund, $idempotencyKey = null) /** * Retrieve list of Refunds pertaining to a certain Transfer * @param string $transferId Transfer identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterRefunds $filter Filtering object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param FilterRefunds $filter Filtering object + * @param Sorting $sorting Sorting object * @return \MangoPay\Refund[] List of the Transfer's Refunds */ public function GetRefunds($transferId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/ApiUboDeclarations.php b/MangoPay/ApiUboDeclarations.php index 9ec6dbad..7a81028a 100644 --- a/MangoPay/ApiUboDeclarations.php +++ b/MangoPay/ApiUboDeclarations.php @@ -10,7 +10,7 @@ class ApiUboDeclarations extends Libraries\ApiBase /** * Creates a new UBO Declaration for an user. * @param string $userId The ID of the user - * @return \MangoPay\UboDeclaration UBO Declaration object returned from API + * @return UboDeclaration UBO Declaration object returned from API */ public function Create($userId) { @@ -53,7 +53,7 @@ public function GetById($uboDeclarationId) public function CreateUbo($userId, $uboDeclarationId, $ubo) { if (is_null($uboDeclarationId) or empty($uboDeclarationId)) { - throw new \MangoPay\Libraries\ResponseException('Parameter uboDeclarationId is empty', 400); + throw new Libraries\ResponseException('Parameter uboDeclarationId is empty', 400); } return $this->SaveObject('ubo_create', $ubo, '\MangoPay\Ubo', $userId, $uboDeclarationId); } diff --git a/MangoPay/ApiUsers.php b/MangoPay/ApiUsers.php index dab35f49..524f62c2 100644 --- a/MangoPay/ApiUsers.php +++ b/MangoPay/ApiUsers.php @@ -30,8 +30,8 @@ public function Create($user, $idempotencyKey = null) /** * Get all users - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data * @return UserLegal[]|UserNatural[] Array with users */ public function GetAll(& $pagination = null, $sorting = null) @@ -119,8 +119,8 @@ public function Update($user) /** * Create bank account for user * @param string $userId User Id - * @param \MangoPay\BankAccount $bankAccount Entity of bank account object - * @return \MangoPay\BankAccount Create bank account object + * @param BankAccount $bankAccount Entity of bank account object + * @return BankAccount Create bank account object */ public function CreateBankAccount($userId, $bankAccount, $idempotencyKey = null) { @@ -131,9 +131,9 @@ public function CreateBankAccount($userId, $bankAccount, $idempotencyKey = null) /** * Get all bank accounts for user * @param string $userId User Id - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data - * @param \MangoPay\FilterBankAccounts $filter Filtering object + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data + * @param FilterBankAccounts $filter Filtering object * * @return \MangoPay\BankAccount[] Array with bank account entities */ @@ -147,7 +147,7 @@ public function GetBankAccounts($userId, & $pagination = null, $sorting = null, * @param string $userId User Id * @param int $bankAccountId Bank account Id * - * @return \MangoPay\BankAccount Entity of bank account object + * @return BankAccount Entity of bank account object */ public function GetBankAccount($userId, $bankAccountId) { @@ -157,8 +157,8 @@ public function GetBankAccount($userId, $bankAccountId) /** * Save a bank account * @param string $userId - * @param \MangoPay\BankAccount $bankAccount - * @return \MangoPay\BankAccount Entity of bank account object + * @param BankAccount $bankAccount + * @return BankAccount Entity of bank account object */ public function UpdateBankAccount($userId, $bankAccount) { @@ -168,8 +168,8 @@ public function UpdateBankAccount($userId, $bankAccount) /** * Get all wallets for user * @param string $userId User Id - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data * * @return \MangoPay\Wallet[] Array with objects returned from API */ @@ -181,9 +181,9 @@ public function GetWallets($userId, & $pagination = null, $sorting = null) /** * Get all transactions for user * @param string $userId User Id - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterTransactions $filter Object to filter data - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Object to filter data + * @param Sorting $sorting Object to sorting data * * @return \MangoPay\Transaction[] Transactions for user returned from API */ @@ -195,9 +195,9 @@ public function GetTransactions($userId, & $pagination = null, $filter = null, $ /** * Get all cards for user * @param string $userId User Id - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterCards $filter Object to filter data - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param FilterCards $filter Object to filter data + * @param Sorting $sorting Object to sorting data * * @return \MangoPay\Card[] Cards for user returned from API */ @@ -209,9 +209,9 @@ public function GetCards($userId, & $pagination = null, $filter = null, $sorting /** * Create new KYC document * @param string $userId User Id - * @param \MangoPay\KycDocument $kycDocument + * @param KycDocument $kycDocument * @param string $idempotencyKey Key for response replication - * @return \MangoPay\KycDocument Document returned from API + * @return KycDocument Document returned from API */ public function CreateKycDocument($userId, $kycDocument, $idempotencyKey = null) { @@ -221,9 +221,9 @@ public function CreateKycDocument($userId, $kycDocument, $idempotencyKey = null) /** * Get all KYC documents for user * @param string $userId User Id - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\Sorting $sorting Object to sorting data - * @param \MangoPay\FilterKycDocuments $filter Object to filter data + * @param Pagination $pagination Pagination object + * @param Sorting $sorting Object to sorting data + * @param FilterKycDocuments $filter Object to filter data * * @return \MangoPay\KycDocument[] Array with KYC documents entities */ @@ -236,7 +236,7 @@ public function GetKycDocuments($userId, & $pagination = null, $sorting = null, * Get KYC document * @param string $userId User Id * @param string $kycDocumentId Document identifier - * @return \MangoPay\KycDocument Document returned from API + * @return KycDocument Document returned from API */ public function GetKycDocument($userId, $kycDocumentId) { @@ -246,9 +246,9 @@ public function GetKycDocument($userId, $kycDocumentId) /** * Get all mandates for user * @param string $userId User Id - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterTransactions $filter Object to filter data - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Object to filter data + * @param Sorting $sorting Object to sorting data * * @return \MangoPay\Mandate[] Array with mandate entities */ @@ -261,9 +261,9 @@ public function GetMandates($userId, & $pagination = null, $filter = null, $sort * Get mandates for user and bank account * @param string $userId User Id * @param string $bankAccountId Bank account Id - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterTransactions $filter Object to filter data - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Object to filter data + * @param Sorting $sorting Object to sorting data * * @return \MangoPay\Mandate[] Array with mandate entities */ @@ -275,8 +275,8 @@ public function GetMandatesForBankAccount($userId, $bankAccountId, & $pagination /** * Save KYC document * @param string $userId User Id - * @param \MangoPay\KycDocument $kycDocument Document to save - * @return \MangoPay\KycDocument Document returned from API + * @param KycDocument $kycDocument Document to save + * @return KycDocument Document returned from API */ public function UpdateKycDocument($userId, $kycDocument) { @@ -287,15 +287,15 @@ public function UpdateKycDocument($userId, $kycDocument) * Create page for Kyc document * @param string $userId User Id * @param string $kycDocumentId KYC Document Id - * @param \MangoPay\KycPage $kycPage KYC Page + * @param KycPage $kycPage KYC Page * @return true always true. If an error occurred, a \MangoPay\Libraries\Exception is thrown - * @throws \MangoPay\Libraries\Exception + * @throws Libraries\Exception */ public function CreateKycPage($userId, $kycDocumentId, $kycPage, $idempotencyKey = null) { try { $this->CreateObject('kyc_page_create', $kycPage, null, $userId, $kycDocumentId, $idempotencyKey); - } catch (\MangoPay\Libraries\ResponseException $exc) { + } catch (Libraries\ResponseException $exc) { if ($exc->getCode() != 204) { throw $exc; } @@ -310,23 +310,23 @@ public function CreateKycPage($userId, $kycDocumentId, $kycPage, $idempotencyKey * @param string $kycDocumentId KYC Document Id * @param string $filePath File path * @return true always true. If an error occurred, a \MangoPay\Libraries\Exception is thrown - * @throws \MangoPay\Libraries\Exception + * @throws Libraries\Exception */ public function CreateKycPageFromFile($userId, $kycDocumentId, $filePath, $idempotencyKey = null) { if (empty($filePath)) { - throw new \MangoPay\Libraries\Exception('Path of file cannot be empty'); + throw new Libraries\Exception('Path of file cannot be empty'); } if (!file_exists($filePath)) { - throw new \MangoPay\Libraries\Exception('File not exist'); + throw new Libraries\Exception('File not exist'); } - $kycPage = new \MangoPay\KycPage(); + $kycPage = new KycPage(); $kycPage->File = base64_encode(file_get_contents($filePath)); if (empty($kycPage->File)) { - throw new \MangoPay\Libraries\Exception('Content of the file cannot be empty'); + throw new Libraries\Exception('Content of the file cannot be empty'); } return $this->CreateKycPage($userId, $kycDocumentId, $kycPage, $idempotencyKey); @@ -337,7 +337,7 @@ public function CreateKycPageFromFile($userId, $kycDocumentId, $filePath, $idemp * @param string $userId User Id * @param $year * @param $month - * @return \MangoPay\EMoney EMoney obhect returned from API + * @return EMoney EMoney obhect returned from API * @throws Libraries\Exception */ public function GetEMoney($userId, $year = null, $month = null) @@ -362,9 +362,9 @@ private function GetCurrentYear() /** * Gets a list with PreAuthorizations belonging to a specific user * @param string $userId ID of the user whose PreAuthorizations to retrieve - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterPreAuthorizations $filter Filtering object - * @param \MangoPay\Sorting $sorting Sorting object + * @param Pagination $pagination Pagination object + * @param FilterPreAuthorizations $filter Filtering object + * @param Sorting $sorting Sorting object * @return \MangoPay\CardPreAuthorization[] The user's PreAuthorizations */ @@ -377,7 +377,7 @@ public function GetPreAuthorizations($userId, $pagination = null, $filter = null * Get correct user object * @param object $response Response from API * @return UserLegal|UserNatural User object returned from API - * @throws \MangoPay\Libraries\Exception If occur unexpected response from API + * @throws Libraries\Exception If occur unexpected response from API */ private function GetUserResponse($response) { @@ -429,7 +429,7 @@ public function GetRegulatory($userId) * This call allows you to check the validity of the format * of a piece of user data, and to retrieve the validation rules applied to it. * @param $companyNumberDetails - * @return \MangoPay\CompanyNumberDetails + * @return CompanyNumberDetails */ public function ValidateTheFormatOfUserData($companyNumberDetails) { diff --git a/MangoPay/ApiWallets.php b/MangoPay/ApiWallets.php index 1967d69e..af6d51d0 100644 --- a/MangoPay/ApiWallets.php +++ b/MangoPay/ApiWallets.php @@ -10,7 +10,7 @@ class ApiWallets extends Libraries\ApiBase /** * Create new wallet * @param Wallet $wallet - * @return \MangoPay\Wallet Wallet object returned from API + * @return Wallet Wallet object returned from API */ public function Create($wallet, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($wallet, $idempotencyKey = null) /** * Get wallet * @param string $walletId Wallet identifier - * @return \MangoPay\Wallet Wallet object returned from API + * @return Wallet Wallet object returned from API */ public function Get($walletId) { @@ -30,7 +30,7 @@ public function Get($walletId) /** * Save wallet * @param Wallet $wallet Wallet object to save - * @return \MangoPay\Wallet Wallet object returned from API + * @return Wallet Wallet object returned from API */ public function Update($wallet) { @@ -40,9 +40,9 @@ public function Update($wallet) /** * Get transactions for the wallet * @param string $walletId Wallet identifier - * @param \MangoPay\Pagination $pagination Pagination object - * @param \MangoPay\FilterTransactions $filter Object to filter data - * @param \MangoPay\Sorting $sorting Object to sorting data + * @param Pagination $pagination Pagination object + * @param FilterTransactions $filter Object to filter data + * @param Sorting $sorting Object to sorting data * @return \MangoPay\Transaction[] Transactions for wallet returned from API */ public function GetTransactions($walletId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/BankingAlias.php b/MangoPay/BankingAlias.php index d1d280cd..0c118652 100644 --- a/MangoPay/BankingAlias.php +++ b/MangoPay/BankingAlias.php @@ -27,7 +27,7 @@ class BankingAlias extends Libraries\EntityBase /** * The type of banking alias (note that only IBAN is available at present) - * @var \MangoPay\BankingAliasType + * @var BankingAliasType */ public $Type; diff --git a/MangoPay/BankingAliasIBAN.php b/MangoPay/BankingAliasIBAN.php index ab0c4f8d..7ddc2a96 100644 --- a/MangoPay/BankingAliasIBAN.php +++ b/MangoPay/BankingAliasIBAN.php @@ -9,7 +9,7 @@ class BankingAliasIBAN extends BankingAlias { /** * The type of banking alias (note that only IBAN is available at present) - * @var \MangoPay\BankingAliasType + * @var BankingAliasType */ public $Type = BankingAliasType::IBAN; diff --git a/MangoPay/Billing.php b/MangoPay/Billing.php index a9c943d3..580a37b7 100644 --- a/MangoPay/Billing.php +++ b/MangoPay/Billing.php @@ -21,7 +21,7 @@ class Billing extends Libraries\Dto /** * The billing address - * @var \MangoPay\Address + * @var Address */ public $Address; diff --git a/MangoPay/CardPreAuthorization.php b/MangoPay/CardPreAuthorization.php index 4cf3c8a9..53f057c3 100644 --- a/MangoPay/CardPreAuthorization.php +++ b/MangoPay/CardPreAuthorization.php @@ -17,21 +17,21 @@ class CardPreAuthorization extends Libraries\EntityBase * It represents the amount debited on the bank account * of the Author.DebitedFunds = Fees + CreditedFunds * (amount received on wallet) - * @var \MangoPay\Money + * @var Money */ public $DebitedFunds; /** * Status of the PreAuthorization * @var string - * @see \MangoPay\CardPreAuthorizationStatus + * @see CardPreAuthorizationStatus */ public $Status; /** * The status of the payment after the PreAuthorization * @var string - * @see \MangoPay\CardPreAuthorizationPaymentStatus + * @see CardPreAuthorizationPaymentStatus */ public $PaymentStatus; @@ -120,13 +120,13 @@ class CardPreAuthorization extends Libraries\EntityBase /** * Billing information - * @var \MangoPay\Billing + * @var Billing */ public $Billing; /** * Security validation information - * @var \MangoPay\SecurityInfo + * @var SecurityInfo */ public $SecurityInfo; @@ -138,7 +138,7 @@ class CardPreAuthorization extends Libraries\EntityBase /** * RemainingFunds - * @var \MangoPay\Money + * @var Money */ public $RemainingFunds; diff --git a/MangoPay/CardRegistration.php b/MangoPay/CardRegistration.php index b9e10f38..1c8cbdea 100644 --- a/MangoPay/CardRegistration.php +++ b/MangoPay/CardRegistration.php @@ -70,7 +70,7 @@ class CardRegistration extends Libraries\EntityBase /** * Status * @var string - * @see \MangoPay\CardRegistrationStatus + * @see CardRegistrationStatus */ public $Status; diff --git a/MangoPay/CardValidation.php b/MangoPay/CardValidation.php index e005a124..f88e55cb 100644 --- a/MangoPay/CardValidation.php +++ b/MangoPay/CardValidation.php @@ -55,7 +55,7 @@ class CardValidation extends Libraries\EntityBase /** * @var string - * @see \MangoPay\TransactionType + * @see TransactionType */ public $Type; @@ -68,7 +68,7 @@ class CardValidation extends Libraries\EntityBase /** * The current status of the card validation * @var string - * @see \MangoPay\CardValidationStatus + * @see CardValidationStatus */ public $Status; diff --git a/MangoPay/Client.php b/MangoPay/Client.php index 38a1f2cc..a6d7a249 100644 --- a/MangoPay/Client.php +++ b/MangoPay/Client.php @@ -69,7 +69,7 @@ class Client extends Libraries\EntityBase /** * Categorization details of the client - * @var \MangoPay\PlatformCategorization + * @var PlatformCategorization */ public $PlatformCategorization; @@ -81,7 +81,7 @@ class Client extends Libraries\EntityBase /** * The address of the company’s headquarters - * @var \MangoPay\Address + * @var Address */ public $HeadquartersAddress; diff --git a/MangoPay/Conversion.php b/MangoPay/Conversion.php index e68038b7..c7450bbd 100644 --- a/MangoPay/Conversion.php +++ b/MangoPay/Conversion.php @@ -13,7 +13,7 @@ class Conversion extends Libraries\EntityBase /** * The type of transaction * @var string - * @see \MangoPay\TransactionType + * @see TransactionType */ public $Type; @@ -21,14 +21,14 @@ class Conversion extends Libraries\EntityBase * The nature of the transaction, providing more * information about the context in which the transaction occurred: * @var string - * @see \MangoPay\TransactionNature + * @see TransactionNature */ public $Nature; /** * The status of the transaction. * @var string - * @see \MangoPay\TransactionStatus + * @see TransactionStatus */ public $Status; diff --git a/MangoPay/ConversionQuote.php b/MangoPay/ConversionQuote.php index 42ac5270..761c5c38 100644 --- a/MangoPay/ConversionQuote.php +++ b/MangoPay/ConversionQuote.php @@ -14,7 +14,7 @@ class ConversionQuote extends EntityBase /** * @var string - * @see \MangoPay\TransactionStatus + * @see TransactionStatus */ public $Status; @@ -26,13 +26,13 @@ class ConversionQuote extends EntityBase /** * Debited funds - * @var \MangoPay\Money + * @var Money */ public $DebitedFunds; /** * Credited funds - * @var \MangoPay\Money + * @var Money */ public $CreditedFunds; diff --git a/MangoPay/DeclaredUbo.php b/MangoPay/DeclaredUbo.php index d49b4dd0..5ac8af18 100644 --- a/MangoPay/DeclaredUbo.php +++ b/MangoPay/DeclaredUbo.php @@ -16,14 +16,14 @@ class DeclaredUbo /** * Validation status of this declared UBO. * @var string - * @see \MangoPay\DeclaredUboStatus + * @see DeclaredUboStatus */ public $Status; /** * Reason why the declared UBO is not valid. * @var string - * @see \MangoPay\UboRefusedReasonType + * @see UboRefusedReasonType */ public $RefusedReasonType; diff --git a/MangoPay/Dispute.php b/MangoPay/Dispute.php index 14b77c55..a4d7af32 100644 --- a/MangoPay/Dispute.php +++ b/MangoPay/Dispute.php @@ -16,14 +16,14 @@ class Dispute extends Libraries\EntityBase /** * The type of transaction that is disputed * @var string - * @see \MangoPay\TransactionType + * @see TransactionType */ public $InitialTransactionType; /** * The type of dispute * @var string - * @see \MangoPay\DisputeType + * @see DisputeType */ public $DisputeType; @@ -35,26 +35,26 @@ class Dispute extends Libraries\EntityBase /** * Dispute's reason - * @var \MangoPay\DisputeReason + * @var DisputeReason */ public $DisputeReason; /** * Disputed funds - * @var \MangoPay\Money + * @var Money */ public $DisputedFunds; /** * Contested funds - * @var \MangoPay\Money + * @var Money */ public $ContestedFunds; /** * The current status of the dispute * @var string - * @see \MangoPay\DisputeStatus + * @see DisputeStatus */ public $Status; diff --git a/MangoPay/DisputeDocument.php b/MangoPay/DisputeDocument.php index a84be3d5..0c5420c0 100644 --- a/MangoPay/DisputeDocument.php +++ b/MangoPay/DisputeDocument.php @@ -16,14 +16,14 @@ class DisputeDocument extends Libraries\Document /** * Type of dispute document * @var string - * @see \MangoPay\DisputeDocumentType + * @see DisputeDocumentType */ public $Type; /** * Status of dispute document * @var string - * @see \MangoPay\DisputeDocumentStatus + * @see DisputeDocumentStatus */ public $Status; } diff --git a/MangoPay/DisputeReason.php b/MangoPay/DisputeReason.php index 81eacb00..a2d46876 100644 --- a/MangoPay/DisputeReason.php +++ b/MangoPay/DisputeReason.php @@ -10,7 +10,7 @@ class DisputeReason extends Libraries\Dto /** * Dispute's reason type * @var string - * @see \MangoPay\DisputeReasonType + * @see DisputeReasonType */ public $DisputeReasonType; diff --git a/MangoPay/Event.php b/MangoPay/Event.php index 2de03dc5..6b612d13 100644 --- a/MangoPay/Event.php +++ b/MangoPay/Event.php @@ -15,7 +15,7 @@ class Event extends Libraries\Dto /** * Event type - * @var \MangoPay\EventType + * @var EventType */ public $EventType; diff --git a/MangoPay/EventType.php b/MangoPay/EventType.php index ffbda762..dfa08542 100644 --- a/MangoPay/EventType.php +++ b/MangoPay/EventType.php @@ -83,6 +83,6 @@ class EventType const DepositPreAuthorizationPaymentCanceled = "DEPOSIT_PREAUTHORIZATION_PAYMENT_CANCELED"; const DepositPreAuthorizationPaymentValidated = "DEPOSIT_PREAUTHORIZATION_PAYMENT_VALIDATED"; const CardValidationCreated = "CARD_VALIDATION_CREATED"; - const CardValidationFailed= "CARD_VALIDATION_FAILED"; + const CardValidationFailed = "CARD_VALIDATION_FAILED"; const CardValidationSucceeded = "CARD_VALIDATION_SUCCEEDED"; } diff --git a/MangoPay/FilterDisputeDocuments.php b/MangoPay/FilterDisputeDocuments.php index 706fe463..50f3ab33 100644 --- a/MangoPay/FilterDisputeDocuments.php +++ b/MangoPay/FilterDisputeDocuments.php @@ -9,13 +9,13 @@ class FilterDisputeDocuments extends FilterBase { /** * @var string - * @see \MangoPay\DisputeDocumentStatus + * @see DisputeDocumentStatus */ public $Status; /** * @var string - * @see \MangoPay\DisputeDocumentType + * @see DisputeDocumentType */ public $Type; } diff --git a/MangoPay/FilterDisputes.php b/MangoPay/FilterDisputes.php index 6a361032..2a87475d 100644 --- a/MangoPay/FilterDisputes.php +++ b/MangoPay/FilterDisputes.php @@ -9,7 +9,7 @@ class FilterDisputes extends FilterBase { /** * @var string - * @see \MangoPay\DisputeType + * @see DisputeType */ public $DisputeType; diff --git a/MangoPay/FilterEvents.php b/MangoPay/FilterEvents.php index ead4580c..05a9f3ce 100644 --- a/MangoPay/FilterEvents.php +++ b/MangoPay/FilterEvents.php @@ -9,7 +9,7 @@ class FilterEvents extends FilterBase { /** * Event type - * @var \MangoPay\EventType + * @var EventType */ public $EventType; } diff --git a/MangoPay/FilterKycDocuments.php b/MangoPay/FilterKycDocuments.php index ac7311d5..92399bce 100644 --- a/MangoPay/FilterKycDocuments.php +++ b/MangoPay/FilterKycDocuments.php @@ -9,13 +9,13 @@ class FilterKycDocuments extends FilterBase { /** * @var string - * @see \MangoPay\KycDocumentStatus + * @see KycDocumentStatus */ public $Status; /** * @var string - * @see \MangoPay\KycDocumentType + * @see KycDocumentType */ public $Type; } diff --git a/MangoPay/FilterPreAuthorizations.php b/MangoPay/FilterPreAuthorizations.php index 22cda945..e48d1a87 100644 --- a/MangoPay/FilterPreAuthorizations.php +++ b/MangoPay/FilterPreAuthorizations.php @@ -15,14 +15,14 @@ class FilterPreAuthorizations extends Libraries\Dto /** * Status of the PreAuthorizations * @var string - * @see \MangoPay\CardPreAuthorizationStatus + * @see CardPreAuthorizationStatus */ public $Status; /** * Status of the payment after the PreAuthorization * @var string - * @see \MangoPay\CardPreAuthorizationPaymentStatus + * @see CardPreAuthorizationPaymentStatus */ public $PaymentStatus; } diff --git a/MangoPay/FilterRefunds.php b/MangoPay/FilterRefunds.php index e7b1c56b..94aa0e7e 100644 --- a/MangoPay/FilterRefunds.php +++ b/MangoPay/FilterRefunds.php @@ -10,7 +10,7 @@ class FilterRefunds extends Libraries\Dto /** * Multiple values separated by commas are allowed * @var string - * @see \MangoPay\RefundStatus + * @see RefundStatus */ public $Status; diff --git a/MangoPay/FilterTransactions.php b/MangoPay/FilterTransactions.php index e7e807d6..fad9326c 100644 --- a/MangoPay/FilterTransactions.php +++ b/MangoPay/FilterTransactions.php @@ -9,19 +9,19 @@ class FilterTransactions extends FilterBase { /** * @var string - * @see \MangoPay\TransactionStatus + * @see TransactionStatus */ public $Status; /** * @var string - * @see \MangoPay\TransactionType + * @see TransactionType */ public $Type; /** * @var string - * @see \MangoPay\TransactionNature + * @see TransactionNature */ public $Nature; diff --git a/MangoPay/Hook.php b/MangoPay/Hook.php index 40bb5918..2ae386dd 100644 --- a/MangoPay/Hook.php +++ b/MangoPay/Hook.php @@ -15,19 +15,19 @@ class Hook extends Libraries\EntityBase /** * @var string - * @see \MangoPay\HookStatus + * @see HookStatus */ public $Status; /** * @var string - * @see \MangoPay\HookValidity + * @see HookValidity */ public $Validity; /** * @var string - * @see \MangoPay\EventType + * @see EventType */ public $EventType; } diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index 1befe53b..3d71abd6 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -9,13 +9,13 @@ class KycDocument extends Libraries\Document { /** * @var string - * @see \MangoPay\KycDocumentType + * @see KycDocumentType */ public $Type; /** * @var string - * @see \MangoPay\KycDocumentStatus + * @see KycDocumentStatus */ public $Status; diff --git a/MangoPay/Libraries/ApiOAuth.php b/MangoPay/Libraries/ApiOAuth.php index 89dc5944..409d2d01 100644 --- a/MangoPay/Libraries/ApiOAuth.php +++ b/MangoPay/Libraries/ApiOAuth.php @@ -9,7 +9,7 @@ class ApiOAuth extends ApiBase { /** * Get token information to OAuth Authentication - * @return \MangoPay\Libraries\OAuthToken OAuthToken object with token information + * @return OAuthToken OAuthToken object with token information */ public function CreateToken() { diff --git a/MangoPay/Libraries/AuthenticationHelper.php b/MangoPay/Libraries/AuthenticationHelper.php index 1c1d5098..93f6ecc7 100644 --- a/MangoPay/Libraries/AuthenticationHelper.php +++ b/MangoPay/Libraries/AuthenticationHelper.php @@ -31,7 +31,7 @@ public function GetHttpHeaderKey() /** * Get basic key for HTTP header * @return string - * @throws \MangoPay\Libraries\Exception If MangoPay_ClientId or MangoPay_ClientPassword is not defined + * @throws Exception If MangoPay_ClientId or MangoPay_ClientPassword is not defined */ public function GetHttpHeaderBasicKey() { @@ -66,7 +66,7 @@ public function GetAutenticationKey() * Get HTTP header value with authorization string for basic authentication * * @return string Value for HTTP header with authentication string - * @throws \MangoPay\Libraries\Exception If required constants are not defined. + * @throws Exception If required constants are not defined. */ private function GetHttpHeaderBasic() { @@ -77,7 +77,7 @@ private function GetHttpHeaderBasic() * Get HTTP header value with authorization string for strong authentication * * @return string Value for HTTP header with authentication string - * @throws \MangoPay\Libraries\Exception If OAuth token is not created (or is invalid) for strong authentication. + * @throws Exception If OAuth token is not created (or is invalid) for strong authentication. */ private function GetHttpHeaderStrong() { diff --git a/MangoPay/Libraries/AuthorizationTokenManager.php b/MangoPay/Libraries/AuthorizationTokenManager.php index 58f10ade..8e6b158c 100644 --- a/MangoPay/Libraries/AuthorizationTokenManager.php +++ b/MangoPay/Libraries/AuthorizationTokenManager.php @@ -9,7 +9,7 @@ class AuthorizationTokenManager extends ApiBase { /** * Storage object - * @var \MangoPay\Libraries\IStorageStrategy + * @var IStorageStrategy */ private $_storageStrategy; @@ -24,7 +24,7 @@ public function __construct($root) * Gets the current authorization token. * In the very first call, this method creates a new token before returning. * If currently stored token is expired, this method creates a new one. - * @return \MangoPay\Libraries\OAuthToken Valid OAuthToken instance. + * @return OAuthToken Valid OAuthToken instance. */ public function GetToken($autenticationKey) { @@ -40,7 +40,7 @@ public function GetToken($autenticationKey) /** * Stores authorization token passed as an argument in the underlying * storage strategy implementation. - * @param \MangoPay\Libraries\OAuthToken $token Token instance to be stored. + * @param OAuthToken $token Token instance to be stored. */ public function StoreToken($token) { @@ -52,7 +52,7 @@ public function StoreToken($token) * By default, the DefaultStorageStrategy instance is used. * There is no need to explicitly call this method until some more complex * storage implementation is needed. - * @param \MangoPay\Libraries\IStorageStrategy $customStorageStrategy IStorageStrategy interface implementation. + * @param IStorageStrategy $customStorageStrategy IStorageStrategy interface implementation. */ public function RegisterCustomStorageStrategy($customStorageStrategy) { diff --git a/MangoPay/Libraries/DefaultStorageStrategy.php b/MangoPay/Libraries/DefaultStorageStrategy.php index 95bb3efb..d5f55865 100644 --- a/MangoPay/Libraries/DefaultStorageStrategy.php +++ b/MangoPay/Libraries/DefaultStorageStrategy.php @@ -18,7 +18,7 @@ public function __construct($config) /** * Gets the current authorization token. - * @return \MangoPay\Libraries\OAuthToken Currently stored token instance or null. + * @return OAuthToken Currently stored token instance or null. * @throws Exception */ public function Get() @@ -37,24 +37,24 @@ public function Get() $serialized = str_replace($this->_prefixContent, '', $data); return unserialize($serialized); } catch (Exception $e) { - throw new \MangoPay\Libraries\Exception('Cannot get token from file, or:' . $e->getMessage()); + throw new Exception('Cannot get token from file, or:' . $e->getMessage()); } } /** * Stores authorization token passed as an argument. - * @param \MangoPay\Libraries\OAuthToken $token Token instance to be stored. + * @param OAuthToken $token Token instance to be stored. */ public function Store($token) { if (!is_writable($this->GetPathToTemporaryFolder())) { - throw new \MangoPay\Libraries\Exception('Cannot create or write to file ' . $this->GetPathToTemporaryFolder()); + throw new Exception('Cannot create or write to file ' . $this->GetPathToTemporaryFolder()); } $serialized = serialize($token); $result = file_put_contents($this->GetPathToFile(), $this->_prefixContent . $serialized, LOCK_EX); if ($result === false) { - throw new \MangoPay\Libraries\Exception('Cannot put token to file'); + throw new Exception('Cannot put token to file'); } } @@ -74,7 +74,7 @@ private function GetPathToFile() private function GetPathToTemporaryFolder() { if (is_null($this->_config->TemporaryFolder)) { - throw new \MangoPay\Libraries\Exception('Path to temporary folder is not defined'); + throw new Exception('Path to temporary folder is not defined'); } return $this->_config->TemporaryFolder; diff --git a/MangoPay/Libraries/IStorageStrategy.php b/MangoPay/Libraries/IStorageStrategy.php index e2a0197c..9ca83e0f 100644 --- a/MangoPay/Libraries/IStorageStrategy.php +++ b/MangoPay/Libraries/IStorageStrategy.php @@ -9,13 +9,13 @@ interface IStorageStrategy { /** * Gets the current authorization token. - * @return \MangoPay\Libraries\OAuthToken Currently stored token instance or null. + * @return OAuthToken Currently stored token instance or null. */ public function Get(); /** * Stores authorization token passed as an argument. - * @param \MangoPay\Libraries\OAuthToken $token Token instance to be stored. + * @param OAuthToken $token Token instance to be stored. */ public function Store($token); } diff --git a/MangoPay/Libraries/RestTool.php b/MangoPay/Libraries/RestTool.php index fac1c5bb..45362eaa 100644 --- a/MangoPay/Libraries/RestTool.php +++ b/MangoPay/Libraries/RestTool.php @@ -124,7 +124,7 @@ public function AddRequestHttpHeader($httpHeader) /** * Call request to MangoPay API * @param string $urlMethod Type of method in REST API - * @param \MangoPay\Libraries\RequestType $requestType Type of request + * @param RequestType $requestType Type of request * @param array $requestData Data to send in request * @param string $idempotencyKey * @param \MangoPay\Pagination $pagination Pagination object diff --git a/MangoPay/Mandate.php b/MangoPay/Mandate.php index 617ab3c6..b37ccc24 100644 --- a/MangoPay/Mandate.php +++ b/MangoPay/Mandate.php @@ -53,7 +53,7 @@ class Mandate extends Libraries\EntityBase /** * Status of the mandate * @var string - * @see \MangoPay\MandateStatus + * @see MandateStatus */ public $Status; diff --git a/MangoPay/MangoPayApi.php b/MangoPay/MangoPayApi.php index d2f588ec..e60379b8 100644 --- a/MangoPay/MangoPayApi.php +++ b/MangoPay/MangoPayApi.php @@ -18,13 +18,13 @@ class MangoPayApi /** * Authorization token methods - * @var \MangoPay\Libraries\AuthorizationTokenManager + * @var Libraries\AuthorizationTokenManager */ public $OAuthTokenManager; /** * Configuration instance - * @var \MangoPay\Libraries\Configuration + * @var Libraries\Configuration */ public $Config; @@ -34,7 +34,7 @@ class MangoPayApi /** * OAuth methods - * @var \MangoPay\Libraries\ApiOAuth + * @var Libraries\ApiOAuth */ public $AuthenticationManager; @@ -176,7 +176,7 @@ class MangoPayApi public $logger; /** - * @var \MangoPay\Libraries\HttpBase + * @var Libraries\HttpBase */ public $httpClient; @@ -243,7 +243,7 @@ public function __construct() // Setting default NullLogger $this->logger = new NullLogger(); - $this->httpClient = new \MangoPay\Libraries\HttpCurl($this); + $this->httpClient = new Libraries\HttpCurl($this); } /** @@ -279,7 +279,7 @@ public function setConfig($Config) } /** - * @param \MangoPay\Libraries\HttpBase $httpClient + * @param Libraries\HttpBase $httpClient */ public function setHttpClient(Libraries\HttpBase $httpClient) { @@ -287,7 +287,7 @@ public function setHttpClient(Libraries\HttpBase $httpClient) } /** - * @return \MangoPay\Libraries\HttpBase + * @return Libraries\HttpBase */ public function getHttpClient() { diff --git a/MangoPay/PayInExecutionDetailsDirect.php b/MangoPay/PayInExecutionDetailsDirect.php index 9750df76..be03919a 100644 --- a/MangoPay/PayInExecutionDetailsDirect.php +++ b/MangoPay/PayInExecutionDetailsDirect.php @@ -33,13 +33,13 @@ class PayInExecutionDetailsDirect extends Libraries\Dto implements PayInExecutio /** * Billing information - * @var \MangoPay\Billing + * @var Billing */ public $Billing; /** * Security & validation information - * @var \MangoPay\SecurityInfo + * @var SecurityInfo */ public $SecurityInfo; diff --git a/MangoPay/PayInExecutionDetailsExternalInstruction.php b/MangoPay/PayInExecutionDetailsExternalInstruction.php index d5c47548..c1509dfd 100644 --- a/MangoPay/PayInExecutionDetailsExternalInstruction.php +++ b/MangoPay/PayInExecutionDetailsExternalInstruction.php @@ -21,7 +21,7 @@ class PayInExecutionDetailsExternalInstruction extends Libraries\Dto implements /** * Information about the account that was debited. - * @var \MangoPay\DebitedBankAccount + * @var DebitedBankAccount */ public $DebitedBankAccount; } diff --git a/MangoPay/PayInExecutionDetailsWeb.php b/MangoPay/PayInExecutionDetailsWeb.php index 6907c65c..e97a8254 100644 --- a/MangoPay/PayInExecutionDetailsWeb.php +++ b/MangoPay/PayInExecutionDetailsWeb.php @@ -50,7 +50,7 @@ class PayInExecutionDetailsWeb extends Libraries\Dto implements PayInExecutionDe /** * Billing information - * @var \MangoPay\Billing + * @var Billing */ public $Billing; diff --git a/MangoPay/PayInPaymentDetailsApplePay.php b/MangoPay/PayInPaymentDetailsApplePay.php index e0c0384b..fe4359e3 100644 --- a/MangoPay/PayInPaymentDetailsApplePay.php +++ b/MangoPay/PayInPaymentDetailsApplePay.php @@ -6,7 +6,7 @@ class PayInPaymentDetailsApplePay extends Libraries\Dto implements PayInPaymentD { /** * Payment information returned by Apple Pay payment - * @var \MangoPay\PaymentData + * @var PaymentData */ public $PaymentData; diff --git a/MangoPay/PayInPaymentDetailsBankWire.php b/MangoPay/PayInPaymentDetailsBankWire.php index 08500939..7935038c 100644 --- a/MangoPay/PayInPaymentDetailsBankWire.php +++ b/MangoPay/PayInPaymentDetailsBankWire.php @@ -9,19 +9,19 @@ class PayInPaymentDetailsBankWire extends Libraries\Dto implements PayInPaymentD { /** * Declared debited funds - * @var \MangoPay\Money + * @var Money */ public $DeclaredDebitedFunds; /** * Declared fees - * @var \MangoPay\Money + * @var Money */ public $DeclaredFees; /** * Bank account details - * @var \MangoPay\BankAccount + * @var BankAccount */ public $BankAccount; diff --git a/MangoPay/PayInRecurringRegistration.php b/MangoPay/PayInRecurringRegistration.php index 81b0d4b1..fea03a8f 100644 --- a/MangoPay/PayInRecurringRegistration.php +++ b/MangoPay/PayInRecurringRegistration.php @@ -30,22 +30,22 @@ class PayInRecurringRegistration extends Libraries\Dto public $CreditedWalletId; /** - * @var \MangoPay\Money + * @var Money */ public $FirstTransactionDebitedFunds; /** - * @var \MangoPay\Money + * @var Money */ public $FirstTransactionFees; /** - * @var \MangoPay\Billing + * @var Billing */ public $Billing; /** - * @var \MangoPay\Shipping + * @var Shipping */ public $Shipping; @@ -75,12 +75,12 @@ class PayInRecurringRegistration extends Libraries\Dto public $Migration; /** - * @var \MangoPay\Money + * @var Money */ public $NextTransactionDebitedFunds; /** - * @var \MangoPay\Money + * @var Money */ public $NextTransactionFees; diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index b06e0e7b..6de604b0 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -7,17 +7,17 @@ */ class PayOut extends Transaction { - /** - * The unique identifier of the bank account. - * @var string - */ - public $BankAccountId; + /** + * The unique identifier of the bank account. + * @var string + */ + public $BankAccountId; - /** - * Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. - * @var string - */ - public $BankWireRef; + /** + * Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. + * @var string + */ + public $BankWireRef; /** * Debited wallet Id @@ -31,24 +31,24 @@ class PayOut extends Transaction */ public $PaymentType; - /** - * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var \MangoPay\PayOutPaymentDetailsBankWire - */ - public $PayoutPaymentDetails; + /** + * One of PayOutPaymentDetails implementations, depending on $PaymentType + * @var PayOutPaymentDetailsBankWire + */ + public $PayoutPaymentDetails; /** * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var \MangoPay\PayOutPaymentDetailsBankWire + * @var PayOutPaymentDetailsBankWire */ public $MeanOfPaymentDetails; - /** - * Payout mode requested, default is 'STANDARD', Allowed values are - * 'STANDARD', 'INSTANT_PAYMENT', 'INSTANT_PAYMENT_ONLY' - * @var string - */ - public $PayoutModeRequested = 'STANDARD'; + /** + * Payout mode requested, default is 'STANDARD', Allowed values are + * 'STANDARD', 'INSTANT_PAYMENT', 'INSTANT_PAYMENT_ONLY' + * @var string + */ + public $PayoutModeRequested = 'STANDARD'; /** * Get array with mapping which property depends on other property diff --git a/MangoPay/RecurringPayInCIT.php b/MangoPay/RecurringPayInCIT.php index b5a31a3b..37e6253a 100644 --- a/MangoPay/RecurringPayInCIT.php +++ b/MangoPay/RecurringPayInCIT.php @@ -10,7 +10,7 @@ class RecurringPayInCIT extends Libraries\Dto public $RecurringPayinRegistrationId; /** - * @var \MangoPay\BrowserInfo + * @var BrowserInfo */ public $BrowserInfo; diff --git a/MangoPay/RecurringPayInMIT.php b/MangoPay/RecurringPayInMIT.php index 1cd12e31..229c007f 100644 --- a/MangoPay/RecurringPayInMIT.php +++ b/MangoPay/RecurringPayInMIT.php @@ -10,12 +10,12 @@ class RecurringPayInMIT extends Libraries\Dto public $RecurringPayinRegistrationId; /** - * @var \MangoPay\Money + * @var Money */ public $DebitedFunds; /** - * @var \MangoPay\Money + * @var Money */ public $Fees; diff --git a/MangoPay/Refund.php b/MangoPay/Refund.php index bde01043..2bae988a 100644 --- a/MangoPay/Refund.php +++ b/MangoPay/Refund.php @@ -33,7 +33,7 @@ class Refund extends Transaction /** * Contains info about the reason for refund - * @var \MangoPay\RefundReasonDetails + * @var RefundReasonDetails */ public $RefundReason; diff --git a/MangoPay/ReportRequest.php b/MangoPay/ReportRequest.php index 73bdddc8..1b563992 100644 --- a/MangoPay/ReportRequest.php +++ b/MangoPay/ReportRequest.php @@ -16,7 +16,7 @@ class ReportRequest extends Libraries\EntityBase /** * Status of the report. * @var string - * @see \MangoPay\ReportStatus + * @see ReportStatus */ public $Status; @@ -41,7 +41,7 @@ class ReportRequest extends Libraries\EntityBase /** * Type of the report. * @var string - * @see \MangoPay\ReportType + * @see ReportType */ public $ReportType; @@ -59,7 +59,7 @@ class ReportRequest extends Libraries\EntityBase /** * Filters for the report list. - * @var \MangoPay\FilterReports + * @var FilterReports */ public $Filters; diff --git a/MangoPay/Repudiation.php b/MangoPay/Repudiation.php index 2c497bc5..cd6a961b 100644 --- a/MangoPay/Repudiation.php +++ b/MangoPay/Repudiation.php @@ -15,20 +15,20 @@ class Repudiation extends Libraries\EntityBase /** * The funds repudiated from the wallet - * @var \MangoPay\Money + * @var Money */ public $DebitedFunds; /** * The fees taken on the repudiation – will always be 0 at this stage - * @var \MangoPay\Money + * @var Money */ public $Fees; /** * The amount of credited funds – since there are currently no fees, * this will be equal to the DebitedFunds - * @var \MangoPay\Money + * @var Money */ public $CreditedFunds; @@ -41,7 +41,7 @@ class Repudiation extends Libraries\EntityBase /** * The status of the transfer * @var string - * @see \MangoPay\TransactionStatus + * @see TransactionStatus */ public $Status; @@ -80,7 +80,7 @@ class Repudiation extends Libraries\EntityBase /** * The initial transaction type * @var string - * @see \MangoPay\TransactionType + * @see TransactionType */ public $InitialTransactionType; diff --git a/MangoPay/SettlementTransfer.php b/MangoPay/SettlementTransfer.php index af41a784..d3e29791 100644 --- a/MangoPay/SettlementTransfer.php +++ b/MangoPay/SettlementTransfer.php @@ -15,7 +15,7 @@ class SettlementTransfer extends Transfer /** * The funds debited from the debited wallet - * @var \MangoPay\Money + * @var Money */ public $DebitedFunds; @@ -27,7 +27,7 @@ class SettlementTransfer extends Transfer * Fees of -200 will transfer 800 from the original wallet * to the credit wallet, and transfer 200 from your Fees * wallet to your Credit wallet - * @var \MangoPay\Money + * @var Money */ public $Fees; diff --git a/MangoPay/Transaction.php b/MangoPay/Transaction.php index fce8058b..30008c08 100644 --- a/MangoPay/Transaction.php +++ b/MangoPay/Transaction.php @@ -22,25 +22,25 @@ class Transaction extends Libraries\EntityBase /** * Debited funds - * @var \MangoPay\Money + * @var Money */ public $DebitedFunds; /** * Credited funds - * @var \MangoPay\Money + * @var Money */ public $CreditedFunds; /** * Fees - * @var \MangoPay\Money + * @var Money */ public $Fees; /** * @var string - * @see \MangoPay\TransactionStatus + * @see TransactionStatus */ public $Status; @@ -64,13 +64,13 @@ class Transaction extends Libraries\EntityBase /** * @var string - * @see \MangoPay\TransactionType + * @see TransactionType */ public $Type; /** * @var string - * @see \MangoPay\TransactionNature + * @see TransactionNature */ public $Nature; diff --git a/MangoPay/UboDeclaration.php b/MangoPay/UboDeclaration.php index 7b30f6b5..2b0b407b 100644 --- a/MangoPay/UboDeclaration.php +++ b/MangoPay/UboDeclaration.php @@ -15,14 +15,14 @@ class UboDeclaration extends Libraries\EntityBase /** * Declaration status. * @var string - * @see \MangoPay\UboDeclarationStatus + * @see UboDeclarationStatus */ public $Status; /** * List of reasons why the declaration was refused. * @var string - * @see \MangoPay\UboDeclarationRefusedOrIncompleteReasonType + * @see UboDeclarationRefusedOrIncompleteReasonType */ public $Reason; diff --git a/tests/Cases/Base.php b/tests/Cases/Base.php index d9ec13bf..24692e3a 100644 --- a/tests/Cases/Base.php +++ b/tests/Cases/Base.php @@ -39,12 +39,12 @@ abstract class Base extends TestCase */ public static $MatrixUboDeclaration; /** - * @var \MangoPay\Ubo + * @var Ubo */ public static $MatrixUbo; /** * Test bank account belonging to John - access by getJohnsAccount() - * @var \MangoPay\BankAccount + * @var BankAccount */ public static $JohnsAccount; /** @@ -272,10 +272,10 @@ protected function getJohnsPayInCardWeb() $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $user->Id; $payIn->CreditedUserId = $user->Id; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Currency = 'EUR'; $payIn->DebitedFunds->Amount = 1000; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Currency = 'EUR'; $payIn->Fees->Amount = 5; $payIn->CreditedWalletId = $wallet->Id; @@ -341,10 +341,10 @@ protected function getNewPayInDirectDebitDirect($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 10000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -387,10 +387,10 @@ protected function getJohnsWalletWithMoneyAndCardId($amount = 1000) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = self::$JohnsWalletWithMoney->Id; $payIn->AuthorId = $cardRegistration->UserId; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = $amount; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; @@ -444,10 +444,10 @@ protected function getJohnsWalletWithMoney($amount = 1000) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = self::$JohnsWalletWithMoney->Id; $payIn->AuthorId = $cardRegistration->UserId; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = $amount; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; @@ -530,16 +530,16 @@ protected function getJohnsMandate() /** * Creates self::$JohnsAccount (bank account belonging to John) if not created yet - * @return \MangoPay\BankAccount + * @return BankAccount */ protected function getJohnsAccount() { if (self::$JohnsAccount === null || self::$JohnsAccount->Active == false) { $john = $this->getJohn(); - $account = new \MangoPay\BankAccount(); + $account = new BankAccount(); $account->OwnerName = $john->FirstName . ' ' . $john->LastName; $account->OwnerAddress = $john->Address; - $account->Details = new \MangoPay\BankAccountDetailsIBAN(); + $account->Details = new BankAccountDetailsIBAN(); $account->Details->IBAN = 'FR7630004000031234567890143'; $account->Details->BIC = 'BNPAFRPP'; self::$JohnsAccount = $this->_api->Users->CreateBankAccount($john->Id, $account); @@ -562,10 +562,10 @@ protected function getJohnsPayOutBankWire() $payOut->Tag = 'DefaultTag'; $payOut->AuthorId = $user->Id; $payOut->CreditedUserId = $user->Id; - $payOut->DebitedFunds = new \MangoPay\Money(); + $payOut->DebitedFunds = new Money(); $payOut->DebitedFunds->Currency = 'EUR'; $payOut->DebitedFunds->Amount = 10; - $payOut->Fees = new \MangoPay\Money(); + $payOut->Fees = new Money(); $payOut->Fees->Currency = 'EUR'; $payOut->Fees->Amount = 5; @@ -595,10 +595,10 @@ protected function getJohnsPayOutForCardDirect() $payOut->Tag = 'DefaultTag'; $payOut->AuthorId = $payIn->AuthorId; $payOut->CreditedUserId = $payIn->AuthorId; - $payOut->DebitedFunds = new \MangoPay\Money(); + $payOut->DebitedFunds = new Money(); $payOut->DebitedFunds->Currency = 'EUR'; $payOut->DebitedFunds->Amount = 10; - $payOut->Fees = new \MangoPay\Money(); + $payOut->Fees = new Money(); $payOut->Fees->Currency = 'EUR'; $payOut->Fees->Amount = 5; @@ -639,10 +639,10 @@ protected function getNewPayInCardDirect($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -683,10 +683,10 @@ protected function getNewPayInMbwayWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -712,10 +712,10 @@ protected function getNewPayInGooglePayDirect($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 100; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -768,10 +768,10 @@ protected function getNewPayInMultibancoWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -799,10 +799,10 @@ protected function getNewPayInSatispayWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 20; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 2000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -839,10 +839,10 @@ protected function getNewPayInBlikWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 30; $payIn->Fees->Currency = 'PLN'; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 3000; $payIn->DebitedFunds->Currency = 'PLN'; @@ -872,10 +872,10 @@ protected function getNewPayInKlarnaWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -929,10 +929,10 @@ protected function getLegacyPayInIdealWeb($userId = null) $payIn->PaymentType = "CARD"; $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -963,10 +963,10 @@ protected function getNewPayInIdealWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -994,10 +994,10 @@ protected function getNewPayInGiropayWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -1038,10 +1038,10 @@ protected function getNewPayInCardDirect3DSecure($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -1088,10 +1088,10 @@ protected function getNewTransfer() $transfer->Tag = 'DefaultTag'; $transfer->AuthorId = $user->Id; $transfer->CreditedUserId = $user->Id; - $transfer->DebitedFunds = new \MangoPay\Money(); + $transfer->DebitedFunds = new Money(); $transfer->DebitedFunds->Currency = 'EUR'; $transfer->DebitedFunds->Amount = 100; - $transfer->Fees = new \MangoPay\Money(); + $transfer->Fees = new Money(); $transfer->Fees->Currency = 'EUR'; $transfer->Fees->Amount = 0; @@ -1113,10 +1113,10 @@ protected function getNewRefundForTransfer($transfer) $refund->DebitedWalletId = $transfer->DebitedWalletId; $refund->CreditedWalletId = $transfer->CreditedWalletId; $refund->AuthorId = $user->Id; - $refund->DebitedFunds = new \MangoPay\Money(); + $refund->DebitedFunds = new Money(); $refund->DebitedFunds->Amount = $transfer->DebitedFunds->Amount; $refund->DebitedFunds->Currency = $transfer->DebitedFunds->Currency; - $refund->Fees = new \MangoPay\Money(); + $refund->Fees = new Money(); $refund->Fees->Amount = $transfer->Fees->Amount; $refund->Fees->Currency = $transfer->Fees->Currency; @@ -1134,10 +1134,10 @@ protected function getNewRefundForPayIn($payIn) $refund = new \MangoPay\Refund(); $refund->CreditedWalletId = $payIn->CreditedWalletId; $refund->AuthorId = $user->Id; - $refund->DebitedFunds = new \MangoPay\Money(); + $refund->DebitedFunds = new Money(); $refund->DebitedFunds->Amount = $payIn->DebitedFunds->Amount; $refund->DebitedFunds->Currency = $payIn->DebitedFunds->Currency; - $refund->Fees = new \MangoPay\Money(); + $refund->Fees = new Money(); $refund->Fees->Amount = $payIn->Fees->Amount; $refund->Fees->Currency = $payIn->Fees->Currency; @@ -1154,10 +1154,10 @@ protected function getPartialRefundForPayIn($payIn) $refund = new \MangoPay\Refund(); $refund->AuthorId = $user->Id; - $refund->DebitedFunds = new \MangoPay\Money(); + $refund->DebitedFunds = new Money(); $refund->DebitedFunds->Amount = 100; $refund->DebitedFunds->Currency = $payIn->DebitedFunds->Currency; - $refund->Fees = new \MangoPay\Money(); + $refund->Fees = new Money(); $refund->Fees->Amount = 10; $refund->Fees->Currency = $payIn->Fees->Currency; @@ -1201,7 +1201,7 @@ protected function getJohnsCardPreAuthorization($idempotencyKey = null) $cardPreAuthorization = new \MangoPay\CardPreAuthorization(); $cardPreAuthorization->AuthorId = $user->Id; - $cardPreAuthorization->DebitedFunds = new \MangoPay\Money(); + $cardPreAuthorization->DebitedFunds = new Money(); $cardPreAuthorization->DebitedFunds->Currency = "EUR"; $cardPreAuthorization->DebitedFunds->Amount = 1000; $cardPreAuthorization->CardId = $getCardRegistration->CardId; @@ -1243,10 +1243,10 @@ protected function getJohnsPayInPaypalWeb() $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $user->Id; $payIn->CreditedUserId = $user->Id; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Currency = 'EUR'; $payIn->DebitedFunds->Amount = 1000; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Currency = 'EUR'; $payIn->Fees->Amount = 5; $payIn->CreditedWalletId = $wallet->Id; @@ -1274,11 +1274,11 @@ protected function getJohnsPayInPaypalWebV2() $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $user->Id; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Currency = 'EUR'; $payIn->DebitedFunds->Amount = 500; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Currency = 'EUR'; $payIn->Fees->Amount = 0; @@ -1333,10 +1333,10 @@ protected function getJohnsPayInPayconiqWeb() $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $user->Id; $payIn->CreditedUserId = $user->Id; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Currency = 'EUR'; $payIn->DebitedFunds->Amount = 1000; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Currency = 'EUR'; $payIn->Fees->Amount = 5; $payIn->CreditedWalletId = $wallet->Id; diff --git a/tests/Cases/CardPreAuthorizationsTest.php b/tests/Cases/CardPreAuthorizationsTest.php index 96cb3253..5dbc77b6 100644 --- a/tests/Cases/CardPreAuthorizationsTest.php +++ b/tests/Cases/CardPreAuthorizationsTest.php @@ -48,17 +48,17 @@ public function test_CardPreAuthorization_CheckCardInfo() } -// function test_CardPreAuthorization_Update() -// { - //TO BE FIXED - /* $cardPreAuthorization = $this->getJohnsCardPreAuthorization(); - $cardPreAuthorization->PaymentStatus = \MangoPay\CardPreAuthorizationPaymentStatus::Canceled; + // function test_CardPreAuthorization_Update() + // { + //TO BE FIXED + /* $cardPreAuthorization = $this->getJohnsCardPreAuthorization(); + $cardPreAuthorization->PaymentStatus = \MangoPay\CardPreAuthorizationPaymentStatus::Canceled; - $resultCardPreAuthorization = $this->_api->CardPreAuthorizations->Update($cardPreAuthorization); + $resultCardPreAuthorization = $this->_api->CardPreAuthorizations->Update($cardPreAuthorization); - $this->assertSame(\MangoPay\CardPreAuthorizationStatus::Succeeded, $resultCardPreAuthorization->Status); - $this->assertSame(\MangoPay\CardPreAuthorizationPaymentStatus::Canceled, $resultCardPreAuthorization->PaymentStatus); + $this->assertSame(\MangoPay\CardPreAuthorizationStatus::Succeeded, $resultCardPreAuthorization->Status); + $this->assertSame(\MangoPay\CardPreAuthorizationPaymentStatus::Canceled, $resultCardPreAuthorization->PaymentStatus); - */ -// } + */ + // } } diff --git a/tests/Cases/CardsTest.php b/tests/Cases/CardsTest.php index 890e036e..36572763 100644 --- a/tests/Cases/CardsTest.php +++ b/tests/Cases/CardsTest.php @@ -59,7 +59,7 @@ public function test_Card_Validate() $john = $this->getNewJohn(); $cardRegistration = $this->getUpdatedCardRegistration($john->Id); - $cardValidation = new \MangoPay\CardValidation(); + $cardValidation = new CardValidation(); $cardValidation->Id = $cardRegistration->CardId; $cardValidation->Tag = "Test card validate"; $cardValidation->IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; @@ -83,7 +83,7 @@ public function test_get_Card_Validation() $john = $this->getNewJohn(); $cardRegistration = $this->getUpdatedCardRegistration($john->Id); - $cardValidation = new \MangoPay\CardValidation(); + $cardValidation = new CardValidation(); $cardValidation->Id = $cardRegistration->CardId; $cardValidation->Tag = "Test get card validation"; $cardValidation->IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; diff --git a/tests/Cases/ConversionsTest.php b/tests/Cases/ConversionsTest.php index 2b963032..0248ecbd 100644 --- a/tests/Cases/ConversionsTest.php +++ b/tests/Cases/ConversionsTest.php @@ -7,6 +7,7 @@ use MangoPay\CreateQuotedConversion; use MangoPay\Money; use MangoPay\TransactionType; + use function PHPUnit\Framework\assertNotNull; class ConversionsTest extends Base diff --git a/tests/Cases/DepositTest.php b/tests/Cases/DepositTest.php index ebc10992..ddbaf200 100644 --- a/tests/Cases/DepositTest.php +++ b/tests/Cases/DepositTest.php @@ -50,23 +50,23 @@ public function test_Deposits_Get() $this->assertEquals($deposit->Id, $fetchedDeposit->Id); } -// /** -// * @throws \Exception -// */ -// public function test_Deposits_Cancel() -// { -// $cardRegistration = $this->getCardRegistrationForDeposit(); -// $user = $this->getJohn(); -// -// $deposit = $this->_api->Deposits->Create($this->getNewDeposit($cardRegistration->CardId, $user->Id)); -// -// $dto = new CancelDeposit(); -// $dto->PaymentStatus = "CANCELED"; -// -// $this->_api->Deposits->Cancel($deposit->Id, $dto); -// -// $fetchedDeposit = $this->_api->Deposits->Get($deposit->Id); -// -// $this->assertEquals("CANCELED", $fetchedDeposit->PaymentStatus); -// } + // /** + // * @throws \Exception + // */ + // public function test_Deposits_Cancel() + // { + // $cardRegistration = $this->getCardRegistrationForDeposit(); + // $user = $this->getJohn(); + // + // $deposit = $this->_api->Deposits->Create($this->getNewDeposit($cardRegistration->CardId, $user->Id)); + // + // $dto = new CancelDeposit(); + // $dto->PaymentStatus = "CANCELED"; + // + // $this->_api->Deposits->Cancel($deposit->Id, $dto); + // + // $fetchedDeposit = $this->_api->Deposits->Get($deposit->Id); + // + // $this->assertEquals("CANCELED", $fetchedDeposit->PaymentStatus); + // } } diff --git a/tests/Cases/DisputesTest.php b/tests/Cases/DisputesTest.php index 66dd9503..8677ebfd 100644 --- a/tests/Cases/DisputesTest.php +++ b/tests/Cases/DisputesTest.php @@ -382,13 +382,13 @@ public function test_Disputes_UpdateDisputeDocument() $this->_api->Disputes->CreateDisputeDocumentPageFromFile($disputeForTest->Id, $disputeDocument->Id, __DIR__ . "/../TestKycPageFile.png"); - $disputeDocument->Status = \MangoPay\DisputeDocumentStatus::ValidationAsked; + $disputeDocument->Status = DisputeDocumentStatus::ValidationAsked; $result = $this->_api->Disputes->UpdateDisputeDocument($disputeForTest->Id, $disputeDocument); $this->assertNotNull($result); $this->assertEquals($disputeDocument->Type, $result->Type); - $this->assertTrue($result->Status == \MangoPay\DisputeDocumentStatus::ValidationAsked); + $this->assertTrue($result->Status == DisputeDocumentStatus::ValidationAsked); } public function test_Disputes_GetRepudiation() diff --git a/tests/Cases/PayInsTest.php b/tests/Cases/PayInsTest.php index 979664a5..ba82640b 100644 --- a/tests/Cases/PayInsTest.php +++ b/tests/Cases/PayInsTest.php @@ -22,9 +22,9 @@ public function test_PayIns_Create_CardWeb() $payIn = $this->getJohnsPayInCardWeb(); $this->assertTrue($payIn->Id > 0); - $this->assertSame(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); + $this->assertSame(PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertSame(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertSame(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertNotNull($payIn->ExecutionDetails->Billing); } @@ -36,9 +36,9 @@ public function test_PayIns_Get_CardWeb() $getPayIn = $this->_api->PayIns->Get($payIn->Id); $this->assertSame($payIn->Id, $getPayIn->Id); - $this->assertSame($payIn->PaymentType, \MangoPay\PayInPaymentType::Card); + $this->assertSame($payIn->PaymentType, PayInPaymentType::Card); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertSame(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertSame(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertIdenticalInputProps($payIn, $getPayIn); $this->assertSame(PayInStatus::Created, $getPayIn->Status); @@ -58,9 +58,9 @@ public function test_PayIns_Create_CardDirect() $this->assertTrue($payIn->Id > 0); $this->assertEquals($wallet->Id, $payIn->CreditedWalletId); - $this->assertEquals(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Direct, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $payIn->ExecutionDetails); $this->assertInstanceOf('\MangoPay\Money', $payIn->DebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $payIn->CreditedFunds); @@ -82,9 +82,9 @@ public function test_PayIns_Get_CardDirect() $getPayIn = $this->_api->PayIns->Get($payIn->Id); $this->assertSame($payIn->Id, $getPayIn->Id); - $this->assertSame(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); + $this->assertSame(PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertSame(\MangoPay\PayInExecutionType::Direct, $payIn->ExecutionType); + $this->assertSame(PayInExecutionType::Direct, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $payIn->ExecutionDetails); $this->assertIdenticalInputProps($payIn, $getPayIn); $this->assertNotNull($getPayIn->PaymentDetails->CardId); @@ -134,10 +134,10 @@ public function test_PayIns_PreAuthorizedDirect() $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -154,9 +154,9 @@ public function test_PayIns_PreAuthorizedDirect() $this->assertTrue($createPayIn->Id > 0); $this->assertEquals($wallet->Id, $createPayIn->CreditedWalletId); - $this->assertEquals(\MangoPay\PayInPaymentType::Preauthorized, $createPayIn->PaymentType); + $this->assertEquals(PayInPaymentType::Preauthorized, $createPayIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsPreAuthorized', $createPayIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $createPayIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Direct, $createPayIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $createPayIn->ExecutionDetails); $this->assertInstanceOf('\MangoPay\Money', $createPayIn->DebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $createPayIn->CreditedFunds); @@ -176,11 +176,11 @@ public function test_PayIns_BankWireDirect_Create() $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; // payment type as CARD - $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsBankWire(); - $payIn->PaymentDetails->DeclaredDebitedFunds = new \MangoPay\Money(); + $payIn->PaymentDetails = new PayInPaymentDetailsBankWire(); + $payIn->PaymentDetails->DeclaredDebitedFunds = new Money(); $payIn->PaymentDetails->DeclaredDebitedFunds->Amount = 10000; $payIn->PaymentDetails->DeclaredDebitedFunds->Currency = 'EUR'; - $payIn->PaymentDetails->DeclaredFees = new \MangoPay\Money(); + $payIn->PaymentDetails->DeclaredFees = new Money(); $payIn->PaymentDetails->DeclaredFees->Amount = 0; $payIn->PaymentDetails->DeclaredFees->Currency = 'EUR'; $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); @@ -190,11 +190,11 @@ public function test_PayIns_BankWireDirect_Create() $this->assertTrue($createPayIn->Id > 0); $this->assertEquals($wallet->Id, $createPayIn->CreditedWalletId); - $this->assertEquals(\MangoPay\PayInPaymentType::BankWire, $createPayIn->PaymentType); + $this->assertEquals(PayInPaymentType::BankWire, $createPayIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsBankWire', $createPayIn->PaymentDetails); $this->assertInstanceOf('\MangoPay\Money', $createPayIn->PaymentDetails->DeclaredDebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $createPayIn->PaymentDetails->DeclaredFees); - $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $createPayIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Direct, $createPayIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $createPayIn->ExecutionDetails); $this->assertEquals($user->Id, $createPayIn->AuthorId); $this->assertEquals(PayInStatus::Created, $createPayIn->Status); @@ -215,11 +215,11 @@ public function test_PayIns_BankWireDirect_Get() $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; // payment type as CARD - $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsBankWire(); - $payIn->PaymentDetails->DeclaredDebitedFunds = new \MangoPay\Money(); + $payIn->PaymentDetails = new PayInPaymentDetailsBankWire(); + $payIn->PaymentDetails->DeclaredDebitedFunds = new Money(); $payIn->PaymentDetails->DeclaredDebitedFunds->Amount = 10000; $payIn->PaymentDetails->DeclaredDebitedFunds->Currency = 'EUR'; - $payIn->PaymentDetails->DeclaredFees = new \MangoPay\Money(); + $payIn->PaymentDetails->DeclaredFees = new Money(); $payIn->PaymentDetails->DeclaredFees->Amount = 0; $payIn->PaymentDetails->DeclaredFees->Currency = 'EUR'; $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); @@ -228,11 +228,11 @@ public function test_PayIns_BankWireDirect_Get() $getPayIn = $this->_api->PayIns->Get($createdPayIn->Id); $this->assertEquals($getPayIn->Id, $createdPayIn->Id); - $this->assertEquals(\MangoPay\PayInPaymentType::BankWire, $getPayIn->PaymentType); + $this->assertEquals(PayInPaymentType::BankWire, $getPayIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsBankWire', $getPayIn->PaymentDetails); $this->assertInstanceOf('\MangoPay\Money', $getPayIn->PaymentDetails->DeclaredDebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $getPayIn->PaymentDetails->DeclaredFees); - $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $getPayIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Direct, $getPayIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $getPayIn->ExecutionDetails); $this->assertEquals($user->Id, $getPayIn->AuthorId); $this->assertEquals('PAYIN', $getPayIn->Type); @@ -251,10 +251,10 @@ public function test_PayIns_DirectDeDirectDebitWeb_Create() $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; - $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds = new Money(); $payIn->DebitedFunds->Amount = 10000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees = new Money(); $payIn->Fees->Amount = 100; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -269,10 +269,10 @@ public function test_PayIns_DirectDeDirectDebitWeb_Create() $this->assertTrue($createPayIn->Id > 0); $this->assertEquals($wallet->Id, $createPayIn->CreditedWalletId); - $this->assertEquals(\MangoPay\PayInPaymentType::DirectDebit, $createPayIn->PaymentType); + $this->assertEquals(PayInPaymentType::DirectDebit, $createPayIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsDirectDebit', $createPayIn->PaymentDetails); $this->assertEquals('GIROPAY', $createPayIn->PaymentDetails->DirectDebitType); - $this->assertEquals(\MangoPay\PayInExecutionType::Web, $createPayIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Web, $createPayIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $createPayIn->ExecutionDetails); $this->assertEquals("FR", $createPayIn->ExecutionDetails->Culture); $this->assertEquals($user->Id, $createPayIn->AuthorId); @@ -461,10 +461,10 @@ public function test_PayIns_Apple_Pay_Create() $applePayPayIn->CreditedWalletId = $wallet->Id; $applePayPayIn->AuthorId = $user->Id; $applePayPayIn->CreditedUserId = $user->Id; - $applePayPayIn->DebitedFunds = new \MangoPay\Money(); + $applePayPayIn->DebitedFunds = new Money(); $applePayPayIn->DebitedFunds->Amount = 199; $applePayPayIn->DebitedFunds->Currency = 'EUR'; - $applePayPayIn->Fees = new \MangoPay\Money(); + $applePayPayIn->Fees = new Money(); $applePayPayIn->Fees->Amount = 1; $applePayPayIn->Fees->Currency = 'EUR'; $applePayPayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); @@ -503,10 +503,10 @@ private function getRecurringPayin() $payIn->CardId = $cardId; $payIn->CreditedUserId = $user->Id; $payIn->CreditedWalletId = $walletId; - $payIn->FirstTransactionDebitedFunds = new \MangoPay\Money(); + $payIn->FirstTransactionDebitedFunds = new Money(); $payIn->FirstTransactionDebitedFunds->Amount = 12; $payIn->FirstTransactionDebitedFunds->Currency = 'EUR'; - $payIn->FirstTransactionFees = new \MangoPay\Money(); + $payIn->FirstTransactionFees = new Money(); $payIn->FirstTransactionFees->Amount = 1; $payIn->FirstTransactionFees->Currency = 'EUR'; $billing = new \MangoPay\Billing(); @@ -628,10 +628,10 @@ public function test_Create_Recurring_PayIn_CIT_With_Debited_Funds_And_Fees() $payIn->CardId = $cardId; $payIn->CreditedUserId = $user->Id; $payIn->CreditedWalletId = $walletId; - $payIn->FirstTransactionDebitedFunds = new \MangoPay\Money(); + $payIn->FirstTransactionDebitedFunds = new Money(); $payIn->FirstTransactionDebitedFunds->Amount = 10; $payIn->FirstTransactionDebitedFunds->Currency = 'EUR'; - $payIn->FirstTransactionFees = new \MangoPay\Money(); + $payIn->FirstTransactionFees = new Money(); $payIn->FirstTransactionFees->Amount = 1; $payIn->FirstTransactionFees->Currency = 'EUR'; $billing = new \MangoPay\Billing(); @@ -646,10 +646,10 @@ public function test_Create_Recurring_PayIn_CIT_With_Debited_Funds_And_Fees() $payIn->Billing = $billing; $payIn->EndDate = 1833377810; $payIn->Migration = true; - $payIn->NextTransactionDebitedFunds = new \MangoPay\Money(); + $payIn->NextTransactionDebitedFunds = new Money(); $payIn->NextTransactionDebitedFunds->Amount = 12; $payIn->NextTransactionDebitedFunds->Currency = 'EUR'; - $payIn->NextTransactionFees = new \MangoPay\Money(); + $payIn->NextTransactionFees = new Money(); $payIn->NextTransactionFees->Amount = 1; $payIn->NextTransactionFees->Currency = 'EUR'; $payIn->Frequency = "Daily"; @@ -690,10 +690,10 @@ public function test_PayIns_Google_Pay_Create() $googlePayPayIn->CreditedWalletId = $wallet->Id; $googlePayPayIn->AuthorId = $user->Id; $googlePayPayIn->CreditedUserId = $user->Id; - $googlePayPayIn->DebitedFunds = new \MangoPay\Money(); + $googlePayPayIn->DebitedFunds = new Money(); $googlePayPayIn->DebitedFunds->Amount = 199; $googlePayPayIn->DebitedFunds->Currency = 'EUR'; - $googlePayPayIn->Fees = new \MangoPay\Money(); + $googlePayPayIn->Fees = new Money(); $googlePayPayIn->Fees->Amount = 1; $googlePayPayIn->Fees->Currency = 'EUR'; $googlePayPayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); @@ -732,9 +732,9 @@ public function test_ExampleOf3DSecureV2_1() $this->assertTrue($payIn->Id > 0); $this->assertEquals($wallet->Id, $payIn->CreditedWalletId); - $this->assertEquals(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Direct, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $payIn->ExecutionDetails); $this->assertInstanceOf('\MangoPay\Money', $payIn->DebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $payIn->CreditedFunds); @@ -752,9 +752,9 @@ public function test_PayIns_Create_MbwayWeb() $payIn = $this->getNewPayInMbwayWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(\MangoPay\PayInPaymentType::Mbway, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Mbway, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsMbway', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -770,9 +770,9 @@ public function test_PayIns_Create_GooglePayDirectV2() $payIn = $this->getNewPayInGooglePayDirect(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(\MangoPay\PayInPaymentType::GooglePayV2, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::GooglePayV2, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsGooglePay', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Direct, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $payIn->ExecutionDetails); $this->assertEquals('PAYIN', $payIn->Type); $this->assertEquals('REGULAR', $payIn->Nature); @@ -786,9 +786,9 @@ public function test_PayIns_Create_MultibancoWeb() $payIn = $this->getNewPayInMultibancoWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(\MangoPay\PayInPaymentType::Multibanco, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Multibanco, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsMultibanco', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -803,9 +803,9 @@ public function test_PayIns_Create_Satispay_Web() $payIn = $this->getNewPayInSatispayWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(\MangoPay\PayInPaymentType::Satispay, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Satispay, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsSatispay', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -820,9 +820,9 @@ public function test_PayIns_Create_BlikWeb() $payIn = $this->getNewPayInBlikWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(\MangoPay\PayInPaymentType::Blik, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Blik, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsBlik', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -837,9 +837,9 @@ public function test_PayIns_Create_KlarnaWeb() $payIn = $this->getNewPayInKlarnaWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(\MangoPay\PayInPaymentType::Klarna, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Klarna, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsKlarna', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -854,9 +854,9 @@ public function test_PayIns_Create_Legacy_IdealWeb() $payIn = $this->getLegacyPayInIdealWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -869,9 +869,9 @@ public function test_PayIns_Create_IdealWeb() $payIn = $this->getNewPayInIdealWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(\MangoPay\PayInPaymentType::Ideal, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Ideal, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsIdeal', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -886,9 +886,9 @@ public function test_PayIns_Create_Giropay_Web() $payIn = $this->getNewPayInGiropayWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(\MangoPay\PayInPaymentType::Giropay, $payIn->PaymentType); + $this->assertEquals(PayInPaymentType::Giropay, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsGiropay', $payIn->PaymentDetails); - $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -915,36 +915,36 @@ public function test_CardDirect_getPaymentMethodMetadata() $this->assertNotNull($result_metadata->CardType); } -// /** -// * @throws \Exception -// */ -// public function test_CreateCardPreAuthorizedDepositPayIn() { -// $cardRegistration = $this->getCardRegistrationForDeposit(); -// $user = $this->getJohn(); -// $wallet = $this->getJohnsWallet(); -// -// $deposit = $this->_api->Deposits->Create($this->getNewDeposit($cardRegistration->CardId, $user->Id)); -// -// $dto = new CreateCardPreAuthorizedDepositPayIn(); -// $dto->DepositId = $deposit->Id; -// $dto->AuthorId = $user->Id; -// $dto->CreditedWalletId = $wallet->Id; -// -// $debitedFunds = new Money(); -// $debitedFunds->Amount = 500; -// $debitedFunds->Currency = "EUR"; -// -// $fees = new Money(); -// $fees->Amount = 0; -// $fees->Currency = "EUR"; -// -// $dto->DebitedFunds = $debitedFunds; -// $dto->Fees = $fees; -// -// $payIn = $this->_api->PayIns->CreateCardPreAuthorizedDepositPayIn($dto); -// print_r($payIn); -// -// $this->assertNotNull($payIn); -// $this->assertEquals("SUCCEEDED", $payIn->Status); -// } + // /** + // * @throws \Exception + // */ + // public function test_CreateCardPreAuthorizedDepositPayIn() { + // $cardRegistration = $this->getCardRegistrationForDeposit(); + // $user = $this->getJohn(); + // $wallet = $this->getJohnsWallet(); + // + // $deposit = $this->_api->Deposits->Create($this->getNewDeposit($cardRegistration->CardId, $user->Id)); + // + // $dto = new CreateCardPreAuthorizedDepositPayIn(); + // $dto->DepositId = $deposit->Id; + // $dto->AuthorId = $user->Id; + // $dto->CreditedWalletId = $wallet->Id; + // + // $debitedFunds = new Money(); + // $debitedFunds->Amount = 500; + // $debitedFunds->Currency = "EUR"; + // + // $fees = new Money(); + // $fees->Amount = 0; + // $fees->Currency = "EUR"; + // + // $dto->DebitedFunds = $debitedFunds; + // $dto->Fees = $fees; + // + // $payIn = $this->_api->PayIns->CreateCardPreAuthorizedDepositPayIn($dto); + // print_r($payIn); + // + // $this->assertNotNull($payIn); + // $this->assertEquals("SUCCEEDED", $payIn->Status); + // } } diff --git a/tests/Cases/UsersTest.php b/tests/Cases/UsersTest.php index 6b3173b8..bc00722a 100644 --- a/tests/Cases/UsersTest.php +++ b/tests/Cases/UsersTest.php @@ -449,7 +449,7 @@ public function test_Users_CreateKycDocument_TestAll() foreach ($aKycDocTypes as $kycDoc) { try { $this->CreateKycDocument_TestOne($kycDoc[0], $kycDoc[1]); - } catch (\MangoPay\Libraries\Exception $exc) { + } catch (Exception $exc) { $message = 'Error (Code: ' . $exc->getCode() . ', ' . $exc->getMessage() . ') ' . 'during create/get KYC Document with type: ' . $kycDoc[0]; @@ -548,7 +548,7 @@ public function test_Users_CreateKycPage_EmptyFilePath() try { $this->_api->Users->CreateKycPageFromFile($user->Id, $kycDocument->Id, ''); $this->fail("This should have failed because path to file is empty"); - } catch (\MangoPay\Libraries\Exception $exc) { + } catch (Exception $exc) { $this->assertSame('Path of file cannot be empty', $exc->getMessage()); } } @@ -564,7 +564,7 @@ public function test_Users_CreateKycPage_WrongFilePath() try { $this->_api->Users->CreateKycPageFromFile($user->Id, $kycDocument->Id, 'notExistFileName.tmp'); $this->fail("This should have failed because file is non existent"); - } catch (\MangoPay\Libraries\Exception $exc) { + } catch (Exception $exc) { $this->assertSame('File not exist', $exc->getMessage()); } } @@ -742,7 +742,7 @@ public function test_395() Logs::Debug('MangoPay\ResponseException Code', $e->GetCode()); Logs::Debug('Message', $e->GetMessage()); Logs::Debug('Details', $e->GetErrorDetails()); - } catch (\MangoPay\Libraries\Exception $e) { + } catch (Exception $e) { Logs::Debug('MangoPay\Exception Message', $e->GetMessage()); } } diff --git a/tests/Cases/WalletsTest.php b/tests/Cases/WalletsTest.php index f86ac9eb..1612060b 100644 --- a/tests/Cases/WalletsTest.php +++ b/tests/Cases/WalletsTest.php @@ -60,7 +60,7 @@ public function test_Wallets_Transactions() * doesn't fail. * https://travis-ci.org/Mangopay/mangopay2-php-sdk/builds/208607353#L349 */ -// $this->assertIdenticalInputProps($transactions[0], $payIn); + // $this->assertIdenticalInputProps($transactions[0], $payIn); } public function test_Wallets_Transactions_Filter() From c6138da694df5db697e523ce4a7d89b64c770fe4 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:48:56 +0600 Subject: [PATCH 06/37] removed: unused code --- .php-cs-fixer.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 6aba95ff..978f05da 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -1,7 +1,5 @@ in(__DIR__.'/MangoPay') ->in(__DIR__.'/tests') From d5800825db355c964358e7b5af3f370b14e00597 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:42:55 +0600 Subject: [PATCH 07/37] add: missing property in Refund class --- MangoPay/Refund.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MangoPay/Refund.php b/MangoPay/Refund.php index 2bae988a..724ca8cf 100644 --- a/MangoPay/Refund.php +++ b/MangoPay/Refund.php @@ -37,6 +37,12 @@ class Refund extends Transaction */ public $RefundReason; + /** + * Message related to the refund + * @var string + */ + public $RefundReasonMessage; + /** * @var string */ From 959b1a7fcf75f628b505a19370a34825ff023703 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:43:52 +0600 Subject: [PATCH 08/37] added: missing property in PayIn --- MangoPay/PayIn.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/MangoPay/PayIn.php b/MangoPay/PayIn.php index a484137f..d3455a15 100644 --- a/MangoPay/PayIn.php +++ b/MangoPay/PayIn.php @@ -13,6 +13,23 @@ class PayIn extends Transaction */ public $CreditedWalletId; + /** + * The mode applied for the 3DS protocol for CB, Visa, and Mastercard. + * Default values: DEFAULT. Allowed values: DEFAULT, FORCE, NO_CHOICE + * + * @var string + */ + public $SecureMode; + + /** + * The 3DS protocol version to be applied to the transaction. Allowing values: V1, V2_1 + * + * @see https://mangopay.com/docs/concepts/payments/payment-methods/card/3ds + * @see https://mangopay.com/docs/endpoints/direct-card-payins#direct-card-payin-object + * @var string + */ + public $Requested3DSVersion; + /** * PaymentType {CARD, BANK_WIRE, DIRECT_DEBIT, PAYPAL, PAYCONIQ } * @var string From 475e87f941fab6803eb08dbac5de2c2b8acf89cf Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:01:25 +0600 Subject: [PATCH 09/37] added: missing property in PayIn --- MangoPay/PayIn.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/MangoPay/PayIn.php b/MangoPay/PayIn.php index d3455a15..61206d8f 100644 --- a/MangoPay/PayIn.php +++ b/MangoPay/PayIn.php @@ -60,6 +60,32 @@ class PayIn extends Transaction */ public $RecurringPayinRegistrationId; + /** + * The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. + * @var string + */ + public $IpAddress; + + /** + * Information about the browser used by the end user (author) to perform the payment. + * @var BrowserInfo + */ + public $BrowserInfo; + + /** + * Information about the end user billing address. If left empty, the default values will be automatically taken into account. + * Default values: FirstName, LastName, and Address information of the Shipping object if any, otherwise the user (author). + * @var Billing + */ + public $Billing; + + /** + * Information about the end user’s shipping address. If left empty, the default values will be automatically taken into account. + * Default values: FirstName, LastName, and Address information of the Billing object, if supplied, otherwise of the user (author). + * @var Shipping + */ + public $Shipping; + /** * Get array with mapping which property depends on other property * @return array From 6da6e4fb1bcee47c278379c3463ee61fe6838989 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Wed, 1 May 2024 01:05:47 +0600 Subject: [PATCH 10/37] Revert "fix: PHP Coding standards issues" This reverts commit f4e69f4d7856e708d99c0440f1f5a8c9aafa0fa5. --- MangoPay/ApiBankAccounts.php | 8 +- MangoPay/ApiBankingAliases.php | 18 +- MangoPay/ApiCardPreAuthorizations.php | 10 +- MangoPay/ApiCardRegistrations.php | 10 +- MangoPay/ApiCards.php | 26 +-- MangoPay/ApiClients.php | 50 ++--- MangoPay/ApiConversions.php | 6 +- MangoPay/ApiDisputeDocuments.php | 10 +- MangoPay/ApiDisputes.php | 78 ++++---- MangoPay/ApiEvents.php | 6 +- MangoPay/ApiHooks.php | 12 +- MangoPay/ApiKycDocuments.php | 10 +- MangoPay/ApiMandates.php | 20 +- MangoPay/ApiPayIns.php | 46 ++--- MangoPay/ApiPayOuts.php | 14 +- MangoPay/ApiRefunds.php | 2 +- MangoPay/ApiRegulatory.php | 6 +- MangoPay/ApiReports.php | 14 +- MangoPay/ApiRepudiations.php | 6 +- MangoPay/ApiResponses.php | 2 +- MangoPay/ApiTransfers.php | 16 +- MangoPay/ApiUboDeclarations.php | 4 +- MangoPay/ApiUsers.php | 92 ++++----- MangoPay/ApiWallets.php | 12 +- MangoPay/BankingAlias.php | 2 +- MangoPay/BankingAliasIBAN.php | 2 +- MangoPay/Billing.php | 2 +- MangoPay/CardPreAuthorization.php | 12 +- MangoPay/CardRegistration.php | 2 +- MangoPay/CardValidation.php | 4 +- MangoPay/Client.php | 4 +- MangoPay/Conversion.php | 6 +- MangoPay/ConversionQuote.php | 6 +- MangoPay/DeclaredUbo.php | 4 +- MangoPay/Dispute.php | 12 +- MangoPay/DisputeDocument.php | 4 +- MangoPay/DisputeReason.php | 2 +- MangoPay/Event.php | 2 +- MangoPay/EventType.php | 2 +- MangoPay/FilterDisputeDocuments.php | 4 +- MangoPay/FilterDisputes.php | 2 +- MangoPay/FilterEvents.php | 2 +- MangoPay/FilterKycDocuments.php | 4 +- MangoPay/FilterPreAuthorizations.php | 4 +- MangoPay/FilterRefunds.php | 2 +- MangoPay/FilterTransactions.php | 6 +- MangoPay/Hook.php | 6 +- MangoPay/KycDocument.php | 4 +- MangoPay/Libraries/ApiOAuth.php | 2 +- MangoPay/Libraries/AuthenticationHelper.php | 6 +- .../Libraries/AuthorizationTokenManager.php | 8 +- MangoPay/Libraries/DefaultStorageStrategy.php | 12 +- MangoPay/Libraries/IStorageStrategy.php | 4 +- MangoPay/Libraries/RestTool.php | 2 +- MangoPay/Mandate.php | 2 +- MangoPay/MangoPayApi.php | 14 +- MangoPay/PayInExecutionDetailsDirect.php | 4 +- ...yInExecutionDetailsExternalInstruction.php | 2 +- MangoPay/PayInExecutionDetailsWeb.php | 2 +- MangoPay/PayInPaymentDetailsApplePay.php | 2 +- MangoPay/PayInPaymentDetailsBankWire.php | 6 +- MangoPay/PayInRecurringRegistration.php | 12 +- MangoPay/PayOut.php | 44 ++--- MangoPay/RecurringPayInCIT.php | 2 +- MangoPay/RecurringPayInMIT.php | 4 +- MangoPay/Refund.php | 2 +- MangoPay/ReportRequest.php | 6 +- MangoPay/Repudiation.php | 10 +- MangoPay/SettlementTransfer.php | 4 +- MangoPay/Transaction.php | 12 +- MangoPay/UboDeclaration.php | 4 +- tests/Cases/Base.php | 108 +++++------ tests/Cases/CardPreAuthorizationsTest.php | 20 +- tests/Cases/CardsTest.php | 4 +- tests/Cases/ConversionsTest.php | 1 - tests/Cases/DepositTest.php | 38 ++-- tests/Cases/DisputesTest.php | 4 +- tests/Cases/PayInsTest.php | 176 +++++++++--------- tests/Cases/UsersTest.php | 8 +- tests/Cases/WalletsTest.php | 2 +- 80 files changed, 552 insertions(+), 553 deletions(-) diff --git a/MangoPay/ApiBankAccounts.php b/MangoPay/ApiBankAccounts.php index 0e3247de..c57e85f7 100644 --- a/MangoPay/ApiBankAccounts.php +++ b/MangoPay/ApiBankAccounts.php @@ -10,10 +10,10 @@ class ApiBankAccounts extends Libraries\ApiBase /** * Retrieves a list of Transactions pertaining to a certain Bank Account * @param string $bankAccountId Bank Account identifier - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Filtering object - * @param Sorting $sorting Sorting object - * @throws Libraries\Exception + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterTransactions $filter Filtering object + * @param \MangoPay\Sorting $sorting Sorting object + * @throws \MangoPay\Libraries\Exception */ public function GetTransactions($bankAccountId, & $pagination = null, $filter = null, $sorting = null) { diff --git a/MangoPay/ApiBankingAliases.php b/MangoPay/ApiBankingAliases.php index 2ecd67ce..d66252ae 100644 --- a/MangoPay/ApiBankingAliases.php +++ b/MangoPay/ApiBankingAliases.php @@ -10,7 +10,7 @@ class ApiBankingAliases extends Libraries\ApiBase /** * Get a banking alias * @param string $bankingAliasId Banking alias identifier - * @return BankingAlias returned from API + * @return \MangoPay\BankingAlias returned from API */ public function Get($bankingAliasId) { @@ -20,8 +20,8 @@ public function Get($bankingAliasId) /** * Create a banking alias - * @param BankingAlias $bankingAlias Banking alias - * @return BankingAlias returned from API + * @param \MangoPay\BankingAlias $bankingAlias Banking alias + * @return \MangoPay\BankingAlias returned from API * @throws Libraries\Exception */ public function Create($bankingAlias) @@ -39,8 +39,8 @@ public function Create($bankingAlias) /** * Update banking alias - * @param BankingAlias $bankingAlias Card object to save - * @return BankingAlias Card object returned from API + * @param \MangoPay\BankingAlias $bankingAlias Card object to save + * @return \MangoPay\BankingAlias Card object returned from API */ public function Update($bankingAlias) { @@ -50,8 +50,8 @@ public function Update($bankingAlias) /** * Get all banking aliases - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data * @param string $walletId Wallet identifier * @return \MangoPay\BankingAlias[] List of banking aliases */ @@ -64,8 +64,8 @@ public function GetAll($walletId, & $pagination = null, $sorting = null) /** * Get correct banking alias object * @param object $response Response from API - * @return BankingAlias BankingAlias object returned from API - * @throws Libraries\Exception If occur unexpected response from API + * @return \MangoPay\BankingAlias BankingAlias object returned from API + * @throws \MangoPay\Libraries\Exception If occur unexpected response from API */ private function GetBankingAliasResponse($response) { diff --git a/MangoPay/ApiCardPreAuthorizations.php b/MangoPay/ApiCardPreAuthorizations.php index 40efef61..6a70bf5c 100644 --- a/MangoPay/ApiCardPreAuthorizations.php +++ b/MangoPay/ApiCardPreAuthorizations.php @@ -9,8 +9,8 @@ class ApiCardPreAuthorizations extends Libraries\ApiBase { /** * Create new pre-authorization object - * @param CardPreAuthorization $cardPreAuthorization PreAuthorization object to create - * @return CardPreAuthorization PreAuthorization object returned from API + * @param \MangoPay\CardPreAuthorization $cardPreAuthorization PreAuthorization object to create + * @return \MangoPay\CardPreAuthorization PreAuthorization object returned from API */ public function Create($cardPreAuthorization, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($cardPreAuthorization, $idempotencyKey = null) /** * Get pre-authorization object * @param string $cardPreAuthorizationId PreAuthorization identifier - * @return CardPreAuthorization Card registration object returned from API + * @return \MangoPay\CardPreAuthorization Card registration object returned from API */ public function Get($cardPreAuthorizationId) { @@ -29,8 +29,8 @@ public function Get($cardPreAuthorizationId) /** * Update pre-authorization object - * @param CardPreAuthorization $cardPreAuthorization PreAuthorization object to save - * @return CardPreAuthorization PreAuthorization object returned from API + * @param \MangoPay\CardPreAuthorization $cardPreAuthorization PreAuthorization object to save + * @return \MangoPay\CardPreAuthorization PreAuthorization object returned from API */ public function Update($cardPreAuthorization) { diff --git a/MangoPay/ApiCardRegistrations.php b/MangoPay/ApiCardRegistrations.php index aac662a0..e45ab7c0 100644 --- a/MangoPay/ApiCardRegistrations.php +++ b/MangoPay/ApiCardRegistrations.php @@ -9,8 +9,8 @@ class ApiCardRegistrations extends Libraries\ApiBase { /** * Create new card registration - * @param CardRegistration $cardRegistration Card registration object to create - * @return CardRegistration Card registration object returned from API + * @param \MangoPay\CardRegistration $cardRegistration Card registration object to create + * @return \MangoPay\CardRegistration Card registration object returned from API */ public function Create($cardRegistration, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($cardRegistration, $idempotencyKey = null) /** * Get card registration * @param string $cardRegistrationId Card Registration identifier - * @return CardRegistration Card registration object returned from API + * @return \MangoPay\CardRegistration Card registration object returned from API */ public function Get($cardRegistrationId) { @@ -29,8 +29,8 @@ public function Get($cardRegistrationId) /** * Update card registration - * @param CardRegistration $cardRegistration Card registration object to save - * @return CardRegistration Card registration object returned from API + * @param \MangoPay\CardRegistration $cardRegistration Card registration object to save + * @return \MangoPay\CardRegistration Card registration object returned from API */ public function Update($cardRegistration) { diff --git a/MangoPay/ApiCards.php b/MangoPay/ApiCards.php index 9d699730..33e3f484 100644 --- a/MangoPay/ApiCards.php +++ b/MangoPay/ApiCards.php @@ -10,7 +10,7 @@ class ApiCards extends Libraries\ApiBase /** * Get card * @param string $cardId Card identifier - * @return Card object returned from API + * @return \MangoPay\Card object returned from API */ public function Get($cardId) { @@ -22,8 +22,8 @@ public function Get($cardId) * The fingerprint is a hash uniquely generated per 16-digit card number. * * @param string $fingerprint The fingerprint hash - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\Card[] List of Cards corresponding to provided fingerprint */ public function GetByFingerprint($fingerprint, & $pagination = null, $sorting = null) @@ -33,8 +33,8 @@ public function GetByFingerprint($fingerprint, & $pagination = null, $sorting = /** * Update card - * @param Card $card Card object to save - * @return Card Card object returned from API + * @param \MangoPay\Card $card Card object to save + * @return \MangoPay\Card Card object returned from API */ public function Update($card) { @@ -44,9 +44,9 @@ public function Update($card) /** * Gets a Card's PreAuthorizations * @param int $cardId ID of the Card for which to retrieve PreAuthorizations - * @param Pagination $pagination Pagination object - * @param FilterPreAuthorizations filter Filtering object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterPreAuthorizations filter Filtering object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\CardPreAuthorization[] List of the Card's PreAuthorizations */ public function GetPreAuthorizations($cardId, $pagination = null, $filter = null, $sorting = null) @@ -57,9 +57,9 @@ public function GetPreAuthorizations($cardId, $pagination = null, $filter = null /** * Retrieves a list of Transactions pertaining to a certain Card * @param string $cardId Card identifier - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Filtering object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterTransactions $filter Filtering object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\Transaction[] */ public function GetTransactions($cardId, & $pagination = null, $filter = null, $sorting = null) @@ -70,7 +70,7 @@ public function GetTransactions($cardId, & $pagination = null, $filter = null, $ /** * Validate a card * @param $cardId - * @return CardValidation + * @return \MangoPay\CardValidation * @throws Libraries\Exception */ public function ValidateCard($cardId, $cardValidation) @@ -81,7 +81,7 @@ public function ValidateCard($cardId, $cardValidation) /** * Get card validation * @param $cardId, $cardValidationId - * @return Card + * @return \MangoPay\Card * @throws Libraries\Exception */ public function GetCardValidation($cardId, $cardValidationId) diff --git a/MangoPay/ApiClients.php b/MangoPay/ApiClients.php index 53aa348a..584b5027 100644 --- a/MangoPay/ApiClients.php +++ b/MangoPay/ApiClients.php @@ -10,7 +10,7 @@ class ApiClients extends Libraries\ApiBase /** * Get client information * - * @return Client Client object returned from API + * @return \MangoPay\Client Client object returned from API */ public function Get() { @@ -20,7 +20,7 @@ public function Get() /** * Save client * @param Client $client Client object to save - * @return Client Client object returned from API + * @return \MangoPay\Client Client object returned from API */ public function Update($client) { @@ -37,13 +37,13 @@ public function Update($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 ClientLogoUpload $logo ClientLogoUpload object + * @param \MangoPay\ClientLogoUpload $logo ClientLogoUpload object */ public function UploadLogo($logoUpload, $idempotencyKey = null) { try { $this->CreateObject('client_upload_logo', $logoUpload, null, null, null, $idempotencyKey); - } catch (Libraries\ResponseException $exc) { + } catch (\MangoPay\Libraries\ResponseException $exc) { if ($exc->getCode() != 204) { throw $exc; } @@ -55,7 +55,7 @@ public function UploadLogo($logoUpload, $idempotencyKey = null) * 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 Libraries\Exception + * @throws \MangoPay\Libraries\Exception */ public function UploadLogoFromFile($file, $idempotencyKey = null) { @@ -65,18 +65,18 @@ public function UploadLogoFromFile($file, $idempotencyKey = null) } if (empty($filePath)) { - throw new Libraries\Exception('Path of file cannot be empty'); + throw new \MangoPay\Libraries\Exception('Path of file cannot be empty'); } if (!file_exists($filePath)) { - throw new Libraries\Exception('File not exist'); + throw new \MangoPay\Libraries\Exception('File not exist'); } - $logoUpload = new ClientLogoUpload(); + $logoUpload = new \MangoPay\ClientLogoUpload(); $logoUpload->File = base64_encode(file_get_contents($filePath)); if (empty($logoUpload->File)) { - throw new Libraries\Exception('Content of the file cannot be empty'); + throw new \MangoPay\Libraries\Exception('Content of the file cannot be empty'); } $this->UploadLogo($logoUpload, $idempotencyKey); @@ -86,14 +86,14 @@ public function UploadLogoFromFile($file, $idempotencyKey = null) * View your client wallets. To see your fees or credit wallets * for each currency set second $fundsType parameter. * - * @param FundsType $fundsType FundsType enum - * @param Sorting $sorting Sorting object + * @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 Pagination(); + $pagination = new \MangoPay\Pagination(); if (is_null($fundsType)) { return $this->GetList('client_wallets', $pagination, '\MangoPay\Wallet', null, null, $sorting); @@ -103,27 +103,27 @@ public function GetWallets($fundsType = null, $sorting = null) return $this->GetList('client_wallets_credit', $pagination, '\MangoPay\Wallet', null, null, $sorting); } - throw new Libraries\Exception('\MangoPay\FundsType object has wrong value and cannot get wallets'); + 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 FundsType $fundsType FundsType enum - * @param CurrencyIso $currencyIso CurrencyIso enum + * @param \MangoPay\FundsType $fundsType FundsType enum + * @param \MangoPay\CurrencyIso $currencyIso CurrencyIso enum * - * @return Wallet Wallet (fees or credit) with a particular currency + * @return \MangoPay\Wallet Wallet (fees or credit) with a particular currency */ public function GetWallet($fundsType, $currencyIso) { if (is_null($fundsType)) { - throw new Libraries\Exception( + throw new \MangoPay\Libraries\Exception( 'First parameter in function GetWallet in class ApiClients is required.' ); } if (is_null($currencyIso)) { - throw new Libraries\Exception( + throw new \MangoPay\Libraries\Exception( 'Second parameter in function GetWallet in class ApiClients is required.' ); } @@ -134,7 +134,7 @@ public function GetWallet($fundsType, $currencyIso) } elseif ($fundsType == FundsType::CREDIT) { $methodKey = 'client_wallets_credit_currency'; } else { - throw new Libraries\Exception('\MangoPay\FundsType object has wrong value and cannot get wallets'); + throw new \MangoPay\Libraries\Exception('\MangoPay\FundsType object has wrong value and cannot get wallets'); } return $this->GetObject($methodKey, '\MangoPay\Wallet', $currencyIso); @@ -143,10 +143,10 @@ public function GetWallet($fundsType, $currencyIso) /** * View the transactions linked to your client wallets (fees and credit) * - * @param FundsType $fundsType FundsType enum - * @param CurrencyIso $currencyIso CurrencyIso enum - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Object to filter data + * @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) */ @@ -159,13 +159,13 @@ public function GetWalletTransactions($fundsType = null, $currencyIso = null, & } elseif ($fundsType == FundsType::CREDIT) { $methodKey = 'client_wallets_transactions_credit_currency'; } else { - throw new Libraries\Exception( + throw new \MangoPay\Libraries\Exception( '\MangoPay\FundsType object has wrong value.' ); } if (!is_null($fundsType) && is_null($currencyIso)) { - throw new Libraries\Exception( + throw new \MangoPay\Libraries\Exception( 'If FundsType is defined the second parameter (currency) is required.' ); } diff --git a/MangoPay/ApiConversions.php b/MangoPay/ApiConversions.php index 6fefe241..874299ff 100644 --- a/MangoPay/ApiConversions.php +++ b/MangoPay/ApiConversions.php @@ -13,7 +13,7 @@ class ApiConversions extends Libraries\ApiBase * The rate returned is given in real time. * @param string $debitedCurrency The sell currency – the currency of the wallet to be debited * @param string $creditedCurrency The buy currency – the currency of the wallet to be credited. - * @return ConversionRate object returned from API + * @return \MangoPay\ConversionRate object returned from API */ public function GetConversionRate($debitedCurrency, $creditedCurrency) { @@ -24,7 +24,7 @@ public function GetConversionRate($debitedCurrency, $creditedCurrency) * This endpoint allows the platform to move funds between two * wallets of different currencies instantaneously. * @param CreateInstantConversion $instantConversion - * @return Conversion object returned from API + * @return \MangoPay\Conversion object returned from API */ public function CreateInstantConversion($instantConversion) { @@ -46,7 +46,7 @@ public function CreateQuotedConversion($quotedConversion) * This endpoint allows the platform to get * the details of a conversion which has been carried out. * @param string $id The unique identifier of the conversion. - * @return Conversion object returned from API + * @return \MangoPay\Conversion object returned from API */ public function GetConversion($id) { diff --git a/MangoPay/ApiDisputeDocuments.php b/MangoPay/ApiDisputeDocuments.php index e4fe6fa0..ab5523ed 100644 --- a/MangoPay/ApiDisputeDocuments.php +++ b/MangoPay/ApiDisputeDocuments.php @@ -15,7 +15,7 @@ class ApiDisputeDocuments extends Libraries\ApiBase /** * Gets dispute's document * @param string $documentId Dispute's document identifier - * @return DisputeDocument Dispute's document object returned from API + * @return \MangoPay\DisputeDocument Dispute's document object returned from API */ public function Get($documentId) { @@ -24,9 +24,9 @@ public function Get($documentId) /** * Gets dispute's documents for client - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data - * @param FilterKycDocuments $filter Filtering object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data + * @param \MangoPay\FilterKycDocuments $filter Filtering object * @return \MangoPay\DisputeDocument[] List of dispute documents returned from API */ public function GetAll(& $pagination = null, $sorting = null, $filter = null) @@ -38,7 +38,7 @@ public function GetAll(& $pagination = null, $sorting = null, $filter = null) * Creates temporary URLs where each page of a dispute document can be viewed. * * @param string $documentId Identification of the document whose pages to view - * @param Pagination $pagination Pagination object + * @param \MangoPay\Pagination $pagination Pagination object * @return \MangoPay\DocumentPageConsult[] Array of consults for viewing the dispute document's pages */ public function CreateDisputeDocumentConsult($documentId, & $pagination = null) diff --git a/MangoPay/ApiDisputes.php b/MangoPay/ApiDisputes.php index d0961b61..de041b1a 100644 --- a/MangoPay/ApiDisputes.php +++ b/MangoPay/ApiDisputes.php @@ -15,7 +15,7 @@ class ApiDisputes extends Libraries\ApiBase /** * Gets dispute * @param string $disputeId Dispute identifier - * @return Dispute Dispute instance returned from API + * @return \MangoPay\Dispute Dispute instance returned from API */ public function Get($disputeId) { @@ -24,9 +24,9 @@ public function Get($disputeId) /** * Get all disputes - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data - * @param FilterDisputes $filter Filtering object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data + * @param \MangoPay\FilterDisputes $filter Filtering object * @return \MangoPay\Dispute[] Array with disputes */ public function GetAll(& $pagination = null, $sorting = null, $filter = null) @@ -36,8 +36,8 @@ public function GetAll(& $pagination = null, $sorting = null, $filter = null) /** * List Disputes that need settling - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data * @return \MangoPay\Dispute[] Array with disputes */ public function GetPendingSettlements(& $pagination = null, $sorting = null) @@ -47,8 +47,8 @@ public function GetPendingSettlements(& $pagination = null, $sorting = null) /** * Updates dispute's tag - * @param Dispute Dispute object to update - * @return Dispute Transfer instance returned from API + * @param \MangoPay\Dispute Dispute object to update + * @return \MangoPay\Dispute Transfer instance returned from API */ public function Update($dispute) { @@ -58,8 +58,8 @@ public function Update($dispute) /** * Contests dispute * @param string $disputeId Dispute identifier - * @param Money $contestedFunds Contested funds - * @return Dispute Dispute instance returned from API + * @param \MangoPay\Money $contestedFunds Contested funds + * @return \MangoPay\Dispute Dispute instance returned from API */ public function ContestDispute($disputeId, $contestedFunds) { @@ -72,7 +72,7 @@ public function ContestDispute($disputeId, $contestedFunds) /** * This method is used to resubmit a Dispute if it is reopened requiring more docs * @param string $disputeId Dispute identifier - * @return Dispute Dispute instance returned from API + * @return \MangoPay\Dispute Dispute instance returned from API */ public function ResubmitDispute($disputeId) { @@ -84,7 +84,7 @@ public function ResubmitDispute($disputeId) /** * Close dispute * @param string $disputeId Dispute identifier - * @return Dispute Dispute instance returned from API + * @return \MangoPay\Dispute Dispute instance returned from API */ public function CloseDispute($disputeId) { @@ -96,9 +96,9 @@ public function CloseDispute($disputeId) /** * Gets dispute's transactions * @param string $disputeId Dispute identifier - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data - * @param FilterTransactions $filter Filtering object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data + * @param \MangoPay\FilterTransactions $filter Filtering object * @return \MangoPay\Transaction[] List of Transaction instances returned from API * @throws Libraries\Exception */ @@ -110,9 +110,9 @@ public function GetTransactions($disputeId, & $pagination = null, $sorting = nul /** * Gets dispute's documents for wallet * @param string $walletId Wallet identifier - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data - * @param FilterDisputes $filter Filtering object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data + * @param \MangoPay\FilterDisputes $filter Filtering object * @return \MangoPay\Dispute[] List of dispute instances returned from API * @throws Libraries\Exception */ @@ -124,9 +124,9 @@ public function GetDisputesForWallet($walletId, & $pagination = null, $sorting = /** * Gets user's disputes * @param string $userId User identifier - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data - * @param FilterDisputes $filter Filtering object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data + * @param \MangoPay\FilterDisputes $filter Filtering object * @return \MangoPay\Dispute[] List of Dispute instances returned from API * @throws Libraries\Exception */ @@ -138,7 +138,7 @@ public function GetDisputesForUser($userId, & $pagination = null, $sorting = nul /** * Gets repudiation * @param string $repudiationId Repudiation identifier - * @return Repudiation Repudiation instance returned from API + * @return \MangoPay\Repudiation Repudiation instance returned from API */ public function GetRepudiation($repudiationId) { @@ -147,9 +147,9 @@ public function GetRepudiation($repudiationId) /** * Creates settlement transfer - * @param SettlementTransfer $settlementTransfer Settlement transfer + * @param \MangoPay\SettlementTransfer $settlementTransfer Settlement transfer * @param string $repudiationId Repudiation identifier - * @return Transfer Transfer instance returned from API + * @return \MangoPay\Transfer Transfer instance returned from API */ public function CreateSettlementTransfer($settlementTransfer, $repudiationId, $idempotencyKey = null) { @@ -159,7 +159,7 @@ public function CreateSettlementTransfer($settlementTransfer, $repudiationId, $i /** * Gets settlement transfer * @param string $settlementTransferId Settlement transfer identifier - * @return SettlementTransfer Transfer instance returned from API + * @return \MangoPay\SettlementTransfer Transfer instance returned from API */ public function GetSettlementTransfer($settlementTransferId) { @@ -169,9 +169,9 @@ public function GetSettlementTransfer($settlementTransferId) /** * Gets documents for dispute * @param string $disputeId Dispute identifier - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data - * @param FilterDisputeDocuments $filter Filtering object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data + * @param \MangoPay\FilterDisputeDocuments $filter Filtering object * @return \MangoPay\DisputeDocument[] List of DisputeDocument instances returned from API * @throws Libraries\Exception */ @@ -183,8 +183,8 @@ public function GetDocumentsForDispute($disputeId, & $pagination = null, $sortin /** * Update dispute document * @param string $disputeId Dispute identifier - * @param DisputeDocument $disputeDocument Dispute document to save - * @return DisputeDocument Document returned from API + * @param \MangoPay\DisputeDocument $disputeDocument Dispute document to save + * @return \MangoPay\DisputeDocument Document returned from API */ public function UpdateDisputeDocument($disputeId, $disputeDocument) { @@ -194,8 +194,8 @@ public function UpdateDisputeDocument($disputeId, $disputeDocument) /** * Creates document for dispute * @param string $disputeId Dispute identifier - * @param DisputeDocument $disputeDocument Dispute document to be created - * @return DisputeDocument Dispute document returned from API + * @param \MangoPay\DisputeDocument $disputeDocument Dispute document to be created + * @return \MangoPay\DisputeDocument Dispute document returned from API */ public function CreateDisputeDocument($disputeId, $disputeDocument, $idempotencyKey = null) { @@ -206,13 +206,13 @@ public function CreateDisputeDocument($disputeId, $disputeDocument, $idempotency * Creates document's page for dispute * @param string $disputeId Dispute identifier * @param string $disputeDocumentId Dispute document identifier - * @param DisputeDocumentPage $disputeDocumentPage Dispute document page object + * @param \MangoPay\DisputeDocumentPage $disputeDocumentPage Dispute document page object */ public function CreateDisputeDocumentPage($disputeId, $disputeDocumentId, $disputeDocumentPage, $idempotencyKey = null) { try { $this->CreateObject('disputes_document_page_create', $disputeDocumentPage, null, $disputeId, $disputeDocumentId, $idempotencyKey); - } catch (Libraries\ResponseException $exc) { + } catch (\MangoPay\Libraries\ResponseException $exc) { if ($exc->getCode() != 204) { throw $exc; } @@ -224,7 +224,7 @@ public function CreateDisputeDocumentPage($disputeId, $disputeDocumentId, $dispu * @param string $disputeId Dispute identifier * @param string $disputeDocumentId Dispute document identifier * @param string $file File path - * @throws Libraries\Exception + * @throws \MangoPay\Libraries\Exception */ public function CreateDisputeDocumentPageFromFile($disputeId, $disputeDocumentId, $file, $idempotencyKey = null) { @@ -234,18 +234,18 @@ public function CreateDisputeDocumentPageFromFile($disputeId, $disputeDocumentId } if (empty($filePath)) { - throw new Libraries\Exception('Path of file cannot be empty'); + throw new \MangoPay\Libraries\Exception('Path of file cannot be empty'); } if (!file_exists($filePath)) { - throw new Libraries\Exception('File not exist'); + throw new \MangoPay\Libraries\Exception('File not exist'); } - $disputeDocumentPage = new DisputeDocumentPage(); + $disputeDocumentPage = new \MangoPay\DisputeDocumentPage(); $disputeDocumentPage->File = base64_encode(file_get_contents($filePath)); if (empty($disputeDocumentPage->File)) { - throw new Libraries\Exception('Content of the file cannot be empty'); + throw new \MangoPay\Libraries\Exception('Content of the file cannot be empty'); } $this->CreateDisputeDocumentPage($disputeId, $disputeDocumentId, $disputeDocumentPage, $idempotencyKey); diff --git a/MangoPay/ApiEvents.php b/MangoPay/ApiEvents.php index 0c221a2f..3b6059f4 100644 --- a/MangoPay/ApiEvents.php +++ b/MangoPay/ApiEvents.php @@ -9,9 +9,9 @@ class ApiEvents extends Libraries\ApiBase { /** * Get events - * @param Pagination $pagination Pagination object - * @param FilterEvents $filter Object to filter data - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterEvents $filter Object to filter data + * @param \MangoPay\Sorting $sorting Object to sorting data * * @return \MangoPay\Event[] Events list */ diff --git a/MangoPay/ApiHooks.php b/MangoPay/ApiHooks.php index c2622e7a..12e92680 100644 --- a/MangoPay/ApiHooks.php +++ b/MangoPay/ApiHooks.php @@ -11,7 +11,7 @@ class ApiHooks extends Libraries\ApiBase * Create new hook * @param Hook $hook * @param string $idempotencyKey Idempotency key for response replication - * @return Hook Hook object returned from API + * @return \MangoPay\Hook Hook object returned from API */ public function Create($hook, $idempotencyKey = null) { @@ -21,7 +21,7 @@ public function Create($hook, $idempotencyKey = null) /** * Get hook * @param string $hookId Hook identifier - * @return Hook Wallet object returned from API + * @return \MangoPay\Hook Wallet object returned from API */ public function Get($hookId) { @@ -30,8 +30,8 @@ public function Get($hookId) /** * Save hook - * @param Hook $hook Hook object to save - * @return Hook Hook object returned from API + * @param \MangoPay\Hook $hook Hook object to save + * @return \MangoPay\Hook Hook object returned from API */ public function Update($hook) { @@ -40,8 +40,8 @@ public function Update($hook) /** * Get all hooks - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\Hook[] Array with objects returned from API * @throws Libraries\Exception */ diff --git a/MangoPay/ApiKycDocuments.php b/MangoPay/ApiKycDocuments.php index 3bd28c60..64a060b2 100644 --- a/MangoPay/ApiKycDocuments.php +++ b/MangoPay/ApiKycDocuments.php @@ -9,9 +9,9 @@ class ApiKycDocuments extends Libraries\ApiBase { /** * Get all KYC documents - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data - * @param FilterKycDocuments $filter Object to filter data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data + * @param \MangoPay\FilterKycDocuments $filter Object to filter data * @return \MangoPay\KycDocument[] Array with objects returned from API */ public function GetAll(& $pagination = null, $sorting = null, $filter = null) @@ -22,7 +22,7 @@ public function GetAll(& $pagination = null, $sorting = null, $filter = null) /** * Get KYC document * @param string $kycDocumentId Document identifier - * @return KycDocument Document returned from API + * @return \MangoPay\KycDocument Document returned from API */ public function Get($kycDocumentId) { @@ -34,7 +34,7 @@ public function Get($kycDocumentId) * Creates temporary URLs where each page of a KYC document can be viewed. * * @param string $kycDocumentId Identification of the document whose pages to view - * @param Pagination $pagination Pagination object + * @param \MangoPay\Pagination $pagination Pagination object * @return \MangoPay\DocumentPageConsult[] Array of consults for viewing the KYC document's pages * @throws Libraries\Exception */ diff --git a/MangoPay/ApiMandates.php b/MangoPay/ApiMandates.php index 067f4483..cb9d8647 100644 --- a/MangoPay/ApiMandates.php +++ b/MangoPay/ApiMandates.php @@ -10,7 +10,7 @@ class ApiMandates extends Libraries\ApiBase /** * Create new mandate * @param Mandate $mandate - * @return Mandate Mandate object returned from API + * @return \MangoPay\Mandate Mandate object returned from API */ public function Create($mandate, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($mandate, $idempotencyKey = null) /** * Get mandate * @param string $mandateId Mandate identifier - * @return Mandate Mandate object returned from API + * @return \MangoPay\Mandate Mandate object returned from API */ public function Get($mandateId) { @@ -30,11 +30,11 @@ public function Get($mandateId) /** * Cancel mandate * @param string $mandateId Id of mandate object to cancel - * @return Mandate Mandate object returned from API + * @return \MangoPay\Mandate Mandate object returned from API */ public function Cancel($mandateId) { - $mandate = new Mandate(); + $mandate = new \MangoPay\Mandate(); $mandate->Id = $mandateId; return $this->SaveObject('mandates_save', $mandate, '\MangoPay\Mandate'); @@ -42,9 +42,9 @@ public function Cancel($mandateId) /** * Get all mandates - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Object to filter data - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterTransactions $filter Object to filter data + * @param \MangoPay\Sorting $sorting Object to sorting data * @return \MangoPay\Mandate[] Array with mandates */ public function GetAll(& $pagination = null, $filter = null, $sorting = null) @@ -55,9 +55,9 @@ public function GetAll(& $pagination = null, $filter = null, $sorting = null) /** * Retrieves list of Transactions pertaining to a certain Mandate * @param string $mandateId Mandate identifier - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Filtering object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterTransactions $filter Filtering object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\Transaction[] */ public function GetTransactions($mandateId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/ApiPayIns.php b/MangoPay/ApiPayIns.php index 96e4b7b6..5c1bb55d 100644 --- a/MangoPay/ApiPayIns.php +++ b/MangoPay/ApiPayIns.php @@ -9,8 +9,8 @@ class ApiPayIns extends Libraries\ApiBase { /** * Create new pay-in object - * @param PayIn $payIn \MangoPay\PayIn object - * @return PayIn Object returned from API + * @param \MangoPay\PayIn $payIn \MangoPay\PayIn object + * @return \MangoPay\PayIn Object returned from API */ public function Create($payIn, $idempotencyKey = null) { @@ -22,7 +22,7 @@ public function Create($payIn, $idempotencyKey = null) /** * Get pay-in object * @param string $payInId Pay-in identifier - * @return PayIn Object returned from API + * @return \MangoPay\PayIn Object returned from API */ public function Get($payInId) { @@ -32,8 +32,8 @@ public function Get($payInId) /** * Create refund for pay-in object * @param string $payInId Pay-in identifier - * @param Refund $refund Refund object to create - * @return Refund Object returned by REST API + * @param \MangoPay\Refund $refund Refund object to create + * @return \MangoPay\Refund Object returned by REST API */ public function CreateRefund($payInId, $refund, $idempotencyKey = null) { @@ -42,8 +42,8 @@ public function CreateRefund($payInId, $refund, $idempotencyKey = null) /** * Create a recurring payment - * @param PayInRecurringRegistration $recurringRegistration - * @return PayInRecurringRegistrationRequestResponse + * @param \MangoPay\PayInRecurringRegistration $recurringRegistration + * @return \MangoPay\PayInRecurringRegistrationRequestResponse */ public function CreateRecurringRegistration($recurringRegistration, $idempotencyKey = null) { @@ -53,7 +53,7 @@ public function CreateRecurringRegistration($recurringRegistration, $idempotency /** * Get recurring payment * @param string $recurringRegistrationId - * @return PayInRecurringRegistrationGet + * @return \MangoPay\PayInRecurringRegistrationGet */ public function GetRecurringRegistration($recurringRegistrationId, $idempotencyKey = null) { @@ -63,7 +63,7 @@ public function GetRecurringRegistration($recurringRegistrationId, $idempotencyK /** * Update recurring payment * @param PayInRecurringRegistrationUpdate $recurringUpdate - * @return PayInRecurringRegistrationGet + * @return \MangoPay\PayInRecurringRegistrationGet */ public function UpdateRecurringRegistration($recurringUpdate, $idempotencyKey = null) { @@ -72,8 +72,8 @@ public function UpdateRecurringRegistration($recurringUpdate, $idempotencyKey = /** * Create a Recurring PayIn CIT - * @param RecurringPayInCIT $recurringPayInRegistrationCIT - * @return PayInRecurring + * @param \MangoPay\RecurringPayInCIT $recurringPayInRegistrationCIT + * @return \MangoPay\PayInRecurring */ public function CreateRecurringPayInRegistrationCIT($recurringPayInRegistrationCIT, $idempotencyKey = null) { @@ -82,8 +82,8 @@ public function CreateRecurringPayInRegistrationCIT($recurringPayInRegistrationC /** * Create a Recurring PayIn MIT - * @param RecurringPayInMIT $recurringPayInRegistrationMIT - * @return PayInRecurring + * @param \MangoPay\RecurringPayInMIT $recurringPayInRegistrationMIT + * @return \MangoPay\PayInRecurring */ public function CreateRecurringPayInRegistrationMIT($recurringPayInRegistrationMIT, $idempotencyKey = null) { @@ -93,9 +93,9 @@ public function CreateRecurringPayInRegistrationMIT($recurringPayInRegistrationM /** * Retrieves a list of Refunds pertaining to a certain PayIn * @param string $payInId ID of PayIn for which to retrieve Refunds - * @param Pagination $pagination Pagination object - * @param FilterRefunds $filter Filtering object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterRefunds $filter Filtering object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\Refund[] List of the PayIn's Refunds */ public function GetRefunds($payInId, & $pagination = null, $filter = null, $sorting = null) @@ -127,7 +127,7 @@ private function GetExecutionKey($payIn) * Retrieves a more detailed view of details concerning * the card used to process a Web payment. * @param string $payInId ID of the PayIn to retrieve card details for - * @return PayInWebExtendedView Object returned from API + * @return \MangoPay\PayInWebExtendedView Object returned from API */ public function GetExtendedCardView($payInId) { @@ -146,8 +146,8 @@ public function CreateCardPreAuthorizedDepositPayIn(CreateCardPreAuthorizedDepos /** * Create new PayPal Web pay-in object - * @param PayIn $payIn \MangoPay\PayIn object - * @return PayIn Object returned from API + * @param \MangoPay\PayIn $payIn \MangoPay\PayIn object + * @return \MangoPay\PayIn Object returned from API */ public function CreatePayPal($payIn, $idempotencyKey = null) { @@ -156,8 +156,8 @@ public function CreatePayPal($payIn, $idempotencyKey = null) /** * Create new GooglePay Direct pay-in object - * @param PayIn $payIn \MangoPay\PayIn object - * @return PayIn Object returned from API + * @param \MangoPay\PayIn $payIn \MangoPay\PayIn object + * @return \MangoPay\PayIn Object returned from API */ public function CreateGooglePay($payIn, $idempotencyKey = null) { @@ -166,8 +166,8 @@ public function CreateGooglePay($payIn, $idempotencyKey = null) /** * Look up metadata from BIN or Google Pay token - * @param PaymentMethodMetadata $paymentMethodMetadata \MangoPay\PaymentMethodMetadata object - * @return PaymentMethodMetadata Object returned from API + * @param \MangoPay\PaymentMethodMetadata $paymentMethodMetadata \MangoPay\PaymentMethodMetadata object + * @return \MangoPay\PaymentMethodMetadata Object returned from API */ public function GetPaymentMethodMetadata(PaymentMethodMetadata $paymentMethodMetadata, $idempotencyKey = null) { diff --git a/MangoPay/ApiPayOuts.php b/MangoPay/ApiPayOuts.php index 59869e17..c0edfcb6 100644 --- a/MangoPay/ApiPayOuts.php +++ b/MangoPay/ApiPayOuts.php @@ -10,7 +10,7 @@ class ApiPayOuts extends Libraries\ApiBase /** * Create new pay-out * @param PayOut $payOut - * @return PayOut Object returned from API + * @return \MangoPay\PayOut Object returned from API */ public function Create($payOut, $idempotencyKey = null) { @@ -22,7 +22,7 @@ public function Create($payOut, $idempotencyKey = null) * This method is used to check whether or not the destination bank is eligible for instant payout. * @param PayOutEligibilityRequest $payOutEligibility * @param $idempotencyKey - * @return PayOutEligibilityResponse Object returned for the API + * @return \MangoPay\PayOutEligibilityResponse Object returned for the API */ public function CheckInstantPayoutEligibility($payOutEligibility, $idempotencyKey = null) { @@ -39,7 +39,7 @@ public function CheckInstantPayoutEligibility($payOutEligibility, $idempotencyKe /** * Get pay-out object * @param string $payOutId PayOut identifier - * @return PayOut Object returned from API + * @return \MangoPay\PayOut Object returned from API */ public function Get($payOutId) { @@ -49,7 +49,7 @@ public function Get($payOutId) /** * Get bankwire pay-out object * @param string $payOutId PayOut identifier - * @return PayOut Object returned from API + * @return \MangoPay\PayOut Object returned from API * @throws Libraries\Exception */ public function GetBankwire($payOutId) @@ -60,9 +60,9 @@ public function GetBankwire($payOutId) /** * Returns a list of Refunds pertaining to a certain PayOut. * @param string $payOutId ID of the PayOut for which to retrieve Refunds - * @param Pagination $pagination Pagination object - * @param FilterRefunds filter Filtering object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterRefunds filter Filtering object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\Refund[] List of Refunds for the PayOut */ public function GetRefunds($payOutId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/ApiRefunds.php b/MangoPay/ApiRefunds.php index 3a654fac..69434394 100644 --- a/MangoPay/ApiRefunds.php +++ b/MangoPay/ApiRefunds.php @@ -10,7 +10,7 @@ class ApiRefunds extends Libraries\ApiBase /** * Get refund object * @param string $refundId Refund Id - * @return Refund Refund object returned from API + * @return \MangoPay\Refund Refund object returned from API */ public function Get($refundId) { diff --git a/MangoPay/ApiRegulatory.php b/MangoPay/ApiRegulatory.php index 0bd3e8cf..ef1895e4 100644 --- a/MangoPay/ApiRegulatory.php +++ b/MangoPay/ApiRegulatory.php @@ -10,7 +10,7 @@ class ApiRegulatory extends Libraries\ApiBase /** * Get country authorizations by country code * @param string $countryCode - * @return CountryAuthorization + * @return \MangoPay\CountryAuthorization * @throws Libraries\Exception */ public function GetCountryAuthorizations($countryCode) @@ -20,8 +20,8 @@ public function GetCountryAuthorizations($countryCode) /** * Get all countries authorizations - * @param Pagination $pagination - * @param Sorting $sorting + * @param \MangoPay\Pagination $pagination + * @param \MangoPay\Sorting $sorting * @return \MangoPay\CountryAuthorization[] * @throws Libraries\Exception */ diff --git a/MangoPay/ApiReports.php b/MangoPay/ApiReports.php index 04b3d1b6..221249bb 100644 --- a/MangoPay/ApiReports.php +++ b/MangoPay/ApiReports.php @@ -9,8 +9,8 @@ class ApiReports extends Libraries\ApiBase { /** * Creates new report request - * @param ReportRequest $reportRequest - * @return ReportRequest Report request instance returned from API + * @param \MangoPay\ReportRequest $reportRequest + * @return \MangoPay\ReportRequest Report request instance returned from API */ public function Create($reportRequest, $idempotencyKey = null) { @@ -33,7 +33,7 @@ public function Create($reportRequest, $idempotencyKey = null) /** * Gets report request. * @param string $reportRequestId Report request identifier - * @return ReportRequest Report request instance returned from API + * @return \MangoPay\ReportRequest Report request instance returned from API */ public function Get($reportRequestId) { @@ -42,10 +42,10 @@ public function Get($reportRequestId) /** * Gets all report requests. - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Object to filter data - * @param Sorting $sorting Object to sorting data - * @return ReportRequest Array with report requests + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterTransactions $filter Object to filter data + * @param \MangoPay\Sorting $sorting Object to sorting data + * @return \MangoPay\ReportRequest Array with report requests */ public function GetAll(& $pagination = null, $filter = null, $sorting = null) { diff --git a/MangoPay/ApiRepudiations.php b/MangoPay/ApiRepudiations.php index 9d8f24f2..16c71cd9 100644 --- a/MangoPay/ApiRepudiations.php +++ b/MangoPay/ApiRepudiations.php @@ -18,9 +18,9 @@ public function Get($repudiationId) /** * Retrieves a list of Refunds pertaining to a certain Repudiation * @param string $repudiationId Repudiation identifier - * @param Pagination $pagination Pagination object - * @param FilterRefunds $filter Filtering object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterRefunds $filter Filtering object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\Refund[] */ public function GetRefunds($repudiationId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/ApiResponses.php b/MangoPay/ApiResponses.php index bbd33fbd..1c6440c6 100644 --- a/MangoPay/ApiResponses.php +++ b/MangoPay/ApiResponses.php @@ -11,7 +11,7 @@ class ApiResponses extends Libraries\ApiBase /** * Get response from previous call by idempotency key * @param string $idempotencyKey Idempotency key - * @return Response Entity of Response object + * @return \MangoPay\Response Entity of Response object */ public function Get($idempotencyKey) { diff --git a/MangoPay/ApiTransfers.php b/MangoPay/ApiTransfers.php index d1e1df5e..2cad41d3 100644 --- a/MangoPay/ApiTransfers.php +++ b/MangoPay/ApiTransfers.php @@ -9,8 +9,8 @@ class ApiTransfers extends Libraries\ApiBase { /** * Create new transfer - * @param Transfer $transfer - * @return Transfer Transfer object returned from API + * @param \MangoPay\Transfer $transfer + * @return \MangoPay\Transfer Transfer object returned from API */ public function Create($transfer, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($transfer, $idempotencyKey = null) /** * Get transfer * @param string $transferId Transfer identifier - * @return Transfer Transfer object returned from API + * @return \MangoPay\Transfer Transfer object returned from API */ public function Get($transferId) { @@ -30,8 +30,8 @@ public function Get($transferId) /** * Create refund for transfer object * @param string $transferId Transfer identifier - * @param Refund $refund Refund object to create - * @return Refund Object returned by REST API + * @param \MangoPay\Refund $refund Refund object to create + * @return \MangoPay\Refund Object returned by REST API */ public function CreateRefund($transferId, $refund, $idempotencyKey = null) { @@ -41,9 +41,9 @@ public function CreateRefund($transferId, $refund, $idempotencyKey = null) /** * Retrieve list of Refunds pertaining to a certain Transfer * @param string $transferId Transfer identifier - * @param Pagination $pagination Pagination object - * @param FilterRefunds $filter Filtering object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterRefunds $filter Filtering object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\Refund[] List of the Transfer's Refunds */ public function GetRefunds($transferId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/ApiUboDeclarations.php b/MangoPay/ApiUboDeclarations.php index 7a81028a..9ec6dbad 100644 --- a/MangoPay/ApiUboDeclarations.php +++ b/MangoPay/ApiUboDeclarations.php @@ -10,7 +10,7 @@ class ApiUboDeclarations extends Libraries\ApiBase /** * Creates a new UBO Declaration for an user. * @param string $userId The ID of the user - * @return UboDeclaration UBO Declaration object returned from API + * @return \MangoPay\UboDeclaration UBO Declaration object returned from API */ public function Create($userId) { @@ -53,7 +53,7 @@ public function GetById($uboDeclarationId) public function CreateUbo($userId, $uboDeclarationId, $ubo) { if (is_null($uboDeclarationId) or empty($uboDeclarationId)) { - throw new Libraries\ResponseException('Parameter uboDeclarationId is empty', 400); + throw new \MangoPay\Libraries\ResponseException('Parameter uboDeclarationId is empty', 400); } return $this->SaveObject('ubo_create', $ubo, '\MangoPay\Ubo', $userId, $uboDeclarationId); } diff --git a/MangoPay/ApiUsers.php b/MangoPay/ApiUsers.php index 524f62c2..dab35f49 100644 --- a/MangoPay/ApiUsers.php +++ b/MangoPay/ApiUsers.php @@ -30,8 +30,8 @@ public function Create($user, $idempotencyKey = null) /** * Get all users - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data * @return UserLegal[]|UserNatural[] Array with users */ public function GetAll(& $pagination = null, $sorting = null) @@ -119,8 +119,8 @@ public function Update($user) /** * Create bank account for user * @param string $userId User Id - * @param BankAccount $bankAccount Entity of bank account object - * @return BankAccount Create bank account object + * @param \MangoPay\BankAccount $bankAccount Entity of bank account object + * @return \MangoPay\BankAccount Create bank account object */ public function CreateBankAccount($userId, $bankAccount, $idempotencyKey = null) { @@ -131,9 +131,9 @@ public function CreateBankAccount($userId, $bankAccount, $idempotencyKey = null) /** * Get all bank accounts for user * @param string $userId User Id - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data - * @param FilterBankAccounts $filter Filtering object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data + * @param \MangoPay\FilterBankAccounts $filter Filtering object * * @return \MangoPay\BankAccount[] Array with bank account entities */ @@ -147,7 +147,7 @@ public function GetBankAccounts($userId, & $pagination = null, $sorting = null, * @param string $userId User Id * @param int $bankAccountId Bank account Id * - * @return BankAccount Entity of bank account object + * @return \MangoPay\BankAccount Entity of bank account object */ public function GetBankAccount($userId, $bankAccountId) { @@ -157,8 +157,8 @@ public function GetBankAccount($userId, $bankAccountId) /** * Save a bank account * @param string $userId - * @param BankAccount $bankAccount - * @return BankAccount Entity of bank account object + * @param \MangoPay\BankAccount $bankAccount + * @return \MangoPay\BankAccount Entity of bank account object */ public function UpdateBankAccount($userId, $bankAccount) { @@ -168,8 +168,8 @@ public function UpdateBankAccount($userId, $bankAccount) /** * Get all wallets for user * @param string $userId User Id - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data * * @return \MangoPay\Wallet[] Array with objects returned from API */ @@ -181,9 +181,9 @@ public function GetWallets($userId, & $pagination = null, $sorting = null) /** * Get all transactions for user * @param string $userId User Id - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Object to filter data - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterTransactions $filter Object to filter data + * @param \MangoPay\Sorting $sorting Object to sorting data * * @return \MangoPay\Transaction[] Transactions for user returned from API */ @@ -195,9 +195,9 @@ public function GetTransactions($userId, & $pagination = null, $filter = null, $ /** * Get all cards for user * @param string $userId User Id - * @param Pagination $pagination Pagination object - * @param FilterCards $filter Object to filter data - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterCards $filter Object to filter data + * @param \MangoPay\Sorting $sorting Object to sorting data * * @return \MangoPay\Card[] Cards for user returned from API */ @@ -209,9 +209,9 @@ public function GetCards($userId, & $pagination = null, $filter = null, $sorting /** * Create new KYC document * @param string $userId User Id - * @param KycDocument $kycDocument + * @param \MangoPay\KycDocument $kycDocument * @param string $idempotencyKey Key for response replication - * @return KycDocument Document returned from API + * @return \MangoPay\KycDocument Document returned from API */ public function CreateKycDocument($userId, $kycDocument, $idempotencyKey = null) { @@ -221,9 +221,9 @@ public function CreateKycDocument($userId, $kycDocument, $idempotencyKey = null) /** * Get all KYC documents for user * @param string $userId User Id - * @param Pagination $pagination Pagination object - * @param Sorting $sorting Object to sorting data - * @param FilterKycDocuments $filter Object to filter data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Object to sorting data + * @param \MangoPay\FilterKycDocuments $filter Object to filter data * * @return \MangoPay\KycDocument[] Array with KYC documents entities */ @@ -236,7 +236,7 @@ public function GetKycDocuments($userId, & $pagination = null, $sorting = null, * Get KYC document * @param string $userId User Id * @param string $kycDocumentId Document identifier - * @return KycDocument Document returned from API + * @return \MangoPay\KycDocument Document returned from API */ public function GetKycDocument($userId, $kycDocumentId) { @@ -246,9 +246,9 @@ public function GetKycDocument($userId, $kycDocumentId) /** * Get all mandates for user * @param string $userId User Id - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Object to filter data - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterTransactions $filter Object to filter data + * @param \MangoPay\Sorting $sorting Object to sorting data * * @return \MangoPay\Mandate[] Array with mandate entities */ @@ -261,9 +261,9 @@ public function GetMandates($userId, & $pagination = null, $filter = null, $sort * Get mandates for user and bank account * @param string $userId User Id * @param string $bankAccountId Bank account Id - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Object to filter data - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterTransactions $filter Object to filter data + * @param \MangoPay\Sorting $sorting Object to sorting data * * @return \MangoPay\Mandate[] Array with mandate entities */ @@ -275,8 +275,8 @@ public function GetMandatesForBankAccount($userId, $bankAccountId, & $pagination /** * Save KYC document * @param string $userId User Id - * @param KycDocument $kycDocument Document to save - * @return KycDocument Document returned from API + * @param \MangoPay\KycDocument $kycDocument Document to save + * @return \MangoPay\KycDocument Document returned from API */ public function UpdateKycDocument($userId, $kycDocument) { @@ -287,15 +287,15 @@ public function UpdateKycDocument($userId, $kycDocument) * Create page for Kyc document * @param string $userId User Id * @param string $kycDocumentId KYC Document Id - * @param KycPage $kycPage KYC Page + * @param \MangoPay\KycPage $kycPage KYC Page * @return true always true. If an error occurred, a \MangoPay\Libraries\Exception is thrown - * @throws Libraries\Exception + * @throws \MangoPay\Libraries\Exception */ public function CreateKycPage($userId, $kycDocumentId, $kycPage, $idempotencyKey = null) { try { $this->CreateObject('kyc_page_create', $kycPage, null, $userId, $kycDocumentId, $idempotencyKey); - } catch (Libraries\ResponseException $exc) { + } catch (\MangoPay\Libraries\ResponseException $exc) { if ($exc->getCode() != 204) { throw $exc; } @@ -310,23 +310,23 @@ public function CreateKycPage($userId, $kycDocumentId, $kycPage, $idempotencyKey * @param string $kycDocumentId KYC Document Id * @param string $filePath File path * @return true always true. If an error occurred, a \MangoPay\Libraries\Exception is thrown - * @throws Libraries\Exception + * @throws \MangoPay\Libraries\Exception */ public function CreateKycPageFromFile($userId, $kycDocumentId, $filePath, $idempotencyKey = null) { if (empty($filePath)) { - throw new Libraries\Exception('Path of file cannot be empty'); + throw new \MangoPay\Libraries\Exception('Path of file cannot be empty'); } if (!file_exists($filePath)) { - throw new Libraries\Exception('File not exist'); + throw new \MangoPay\Libraries\Exception('File not exist'); } - $kycPage = new KycPage(); + $kycPage = new \MangoPay\KycPage(); $kycPage->File = base64_encode(file_get_contents($filePath)); if (empty($kycPage->File)) { - throw new Libraries\Exception('Content of the file cannot be empty'); + throw new \MangoPay\Libraries\Exception('Content of the file cannot be empty'); } return $this->CreateKycPage($userId, $kycDocumentId, $kycPage, $idempotencyKey); @@ -337,7 +337,7 @@ public function CreateKycPageFromFile($userId, $kycDocumentId, $filePath, $idemp * @param string $userId User Id * @param $year * @param $month - * @return EMoney EMoney obhect returned from API + * @return \MangoPay\EMoney EMoney obhect returned from API * @throws Libraries\Exception */ public function GetEMoney($userId, $year = null, $month = null) @@ -362,9 +362,9 @@ private function GetCurrentYear() /** * Gets a list with PreAuthorizations belonging to a specific user * @param string $userId ID of the user whose PreAuthorizations to retrieve - * @param Pagination $pagination Pagination object - * @param FilterPreAuthorizations $filter Filtering object - * @param Sorting $sorting Sorting object + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterPreAuthorizations $filter Filtering object + * @param \MangoPay\Sorting $sorting Sorting object * @return \MangoPay\CardPreAuthorization[] The user's PreAuthorizations */ @@ -377,7 +377,7 @@ public function GetPreAuthorizations($userId, $pagination = null, $filter = null * Get correct user object * @param object $response Response from API * @return UserLegal|UserNatural User object returned from API - * @throws Libraries\Exception If occur unexpected response from API + * @throws \MangoPay\Libraries\Exception If occur unexpected response from API */ private function GetUserResponse($response) { @@ -429,7 +429,7 @@ public function GetRegulatory($userId) * This call allows you to check the validity of the format * of a piece of user data, and to retrieve the validation rules applied to it. * @param $companyNumberDetails - * @return CompanyNumberDetails + * @return \MangoPay\CompanyNumberDetails */ public function ValidateTheFormatOfUserData($companyNumberDetails) { diff --git a/MangoPay/ApiWallets.php b/MangoPay/ApiWallets.php index af6d51d0..1967d69e 100644 --- a/MangoPay/ApiWallets.php +++ b/MangoPay/ApiWallets.php @@ -10,7 +10,7 @@ class ApiWallets extends Libraries\ApiBase /** * Create new wallet * @param Wallet $wallet - * @return Wallet Wallet object returned from API + * @return \MangoPay\Wallet Wallet object returned from API */ public function Create($wallet, $idempotencyKey = null) { @@ -20,7 +20,7 @@ public function Create($wallet, $idempotencyKey = null) /** * Get wallet * @param string $walletId Wallet identifier - * @return Wallet Wallet object returned from API + * @return \MangoPay\Wallet Wallet object returned from API */ public function Get($walletId) { @@ -30,7 +30,7 @@ public function Get($walletId) /** * Save wallet * @param Wallet $wallet Wallet object to save - * @return Wallet Wallet object returned from API + * @return \MangoPay\Wallet Wallet object returned from API */ public function Update($wallet) { @@ -40,9 +40,9 @@ public function Update($wallet) /** * Get transactions for the wallet * @param string $walletId Wallet identifier - * @param Pagination $pagination Pagination object - * @param FilterTransactions $filter Object to filter data - * @param Sorting $sorting Object to sorting data + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\FilterTransactions $filter Object to filter data + * @param \MangoPay\Sorting $sorting Object to sorting data * @return \MangoPay\Transaction[] Transactions for wallet returned from API */ public function GetTransactions($walletId, & $pagination = null, $filter = null, $sorting = null) diff --git a/MangoPay/BankingAlias.php b/MangoPay/BankingAlias.php index 0c118652..d1d280cd 100644 --- a/MangoPay/BankingAlias.php +++ b/MangoPay/BankingAlias.php @@ -27,7 +27,7 @@ class BankingAlias extends Libraries\EntityBase /** * The type of banking alias (note that only IBAN is available at present) - * @var BankingAliasType + * @var \MangoPay\BankingAliasType */ public $Type; diff --git a/MangoPay/BankingAliasIBAN.php b/MangoPay/BankingAliasIBAN.php index 7ddc2a96..ab0c4f8d 100644 --- a/MangoPay/BankingAliasIBAN.php +++ b/MangoPay/BankingAliasIBAN.php @@ -9,7 +9,7 @@ class BankingAliasIBAN extends BankingAlias { /** * The type of banking alias (note that only IBAN is available at present) - * @var BankingAliasType + * @var \MangoPay\BankingAliasType */ public $Type = BankingAliasType::IBAN; diff --git a/MangoPay/Billing.php b/MangoPay/Billing.php index 580a37b7..a9c943d3 100644 --- a/MangoPay/Billing.php +++ b/MangoPay/Billing.php @@ -21,7 +21,7 @@ class Billing extends Libraries\Dto /** * The billing address - * @var Address + * @var \MangoPay\Address */ public $Address; diff --git a/MangoPay/CardPreAuthorization.php b/MangoPay/CardPreAuthorization.php index 53f057c3..4cf3c8a9 100644 --- a/MangoPay/CardPreAuthorization.php +++ b/MangoPay/CardPreAuthorization.php @@ -17,21 +17,21 @@ class CardPreAuthorization extends Libraries\EntityBase * It represents the amount debited on the bank account * of the Author.DebitedFunds = Fees + CreditedFunds * (amount received on wallet) - * @var Money + * @var \MangoPay\Money */ public $DebitedFunds; /** * Status of the PreAuthorization * @var string - * @see CardPreAuthorizationStatus + * @see \MangoPay\CardPreAuthorizationStatus */ public $Status; /** * The status of the payment after the PreAuthorization * @var string - * @see CardPreAuthorizationPaymentStatus + * @see \MangoPay\CardPreAuthorizationPaymentStatus */ public $PaymentStatus; @@ -120,13 +120,13 @@ class CardPreAuthorization extends Libraries\EntityBase /** * Billing information - * @var Billing + * @var \MangoPay\Billing */ public $Billing; /** * Security validation information - * @var SecurityInfo + * @var \MangoPay\SecurityInfo */ public $SecurityInfo; @@ -138,7 +138,7 @@ class CardPreAuthorization extends Libraries\EntityBase /** * RemainingFunds - * @var Money + * @var \MangoPay\Money */ public $RemainingFunds; diff --git a/MangoPay/CardRegistration.php b/MangoPay/CardRegistration.php index 1c8cbdea..b9e10f38 100644 --- a/MangoPay/CardRegistration.php +++ b/MangoPay/CardRegistration.php @@ -70,7 +70,7 @@ class CardRegistration extends Libraries\EntityBase /** * Status * @var string - * @see CardRegistrationStatus + * @see \MangoPay\CardRegistrationStatus */ public $Status; diff --git a/MangoPay/CardValidation.php b/MangoPay/CardValidation.php index f88e55cb..e005a124 100644 --- a/MangoPay/CardValidation.php +++ b/MangoPay/CardValidation.php @@ -55,7 +55,7 @@ class CardValidation extends Libraries\EntityBase /** * @var string - * @see TransactionType + * @see \MangoPay\TransactionType */ public $Type; @@ -68,7 +68,7 @@ class CardValidation extends Libraries\EntityBase /** * The current status of the card validation * @var string - * @see CardValidationStatus + * @see \MangoPay\CardValidationStatus */ public $Status; diff --git a/MangoPay/Client.php b/MangoPay/Client.php index a6d7a249..38a1f2cc 100644 --- a/MangoPay/Client.php +++ b/MangoPay/Client.php @@ -69,7 +69,7 @@ class Client extends Libraries\EntityBase /** * Categorization details of the client - * @var PlatformCategorization + * @var \MangoPay\PlatformCategorization */ public $PlatformCategorization; @@ -81,7 +81,7 @@ class Client extends Libraries\EntityBase /** * The address of the company’s headquarters - * @var Address + * @var \MangoPay\Address */ public $HeadquartersAddress; diff --git a/MangoPay/Conversion.php b/MangoPay/Conversion.php index c7450bbd..e68038b7 100644 --- a/MangoPay/Conversion.php +++ b/MangoPay/Conversion.php @@ -13,7 +13,7 @@ class Conversion extends Libraries\EntityBase /** * The type of transaction * @var string - * @see TransactionType + * @see \MangoPay\TransactionType */ public $Type; @@ -21,14 +21,14 @@ class Conversion extends Libraries\EntityBase * The nature of the transaction, providing more * information about the context in which the transaction occurred: * @var string - * @see TransactionNature + * @see \MangoPay\TransactionNature */ public $Nature; /** * The status of the transaction. * @var string - * @see TransactionStatus + * @see \MangoPay\TransactionStatus */ public $Status; diff --git a/MangoPay/ConversionQuote.php b/MangoPay/ConversionQuote.php index 761c5c38..42ac5270 100644 --- a/MangoPay/ConversionQuote.php +++ b/MangoPay/ConversionQuote.php @@ -14,7 +14,7 @@ class ConversionQuote extends EntityBase /** * @var string - * @see TransactionStatus + * @see \MangoPay\TransactionStatus */ public $Status; @@ -26,13 +26,13 @@ class ConversionQuote extends EntityBase /** * Debited funds - * @var Money + * @var \MangoPay\Money */ public $DebitedFunds; /** * Credited funds - * @var Money + * @var \MangoPay\Money */ public $CreditedFunds; diff --git a/MangoPay/DeclaredUbo.php b/MangoPay/DeclaredUbo.php index 5ac8af18..d49b4dd0 100644 --- a/MangoPay/DeclaredUbo.php +++ b/MangoPay/DeclaredUbo.php @@ -16,14 +16,14 @@ class DeclaredUbo /** * Validation status of this declared UBO. * @var string - * @see DeclaredUboStatus + * @see \MangoPay\DeclaredUboStatus */ public $Status; /** * Reason why the declared UBO is not valid. * @var string - * @see UboRefusedReasonType + * @see \MangoPay\UboRefusedReasonType */ public $RefusedReasonType; diff --git a/MangoPay/Dispute.php b/MangoPay/Dispute.php index a4d7af32..14b77c55 100644 --- a/MangoPay/Dispute.php +++ b/MangoPay/Dispute.php @@ -16,14 +16,14 @@ class Dispute extends Libraries\EntityBase /** * The type of transaction that is disputed * @var string - * @see TransactionType + * @see \MangoPay\TransactionType */ public $InitialTransactionType; /** * The type of dispute * @var string - * @see DisputeType + * @see \MangoPay\DisputeType */ public $DisputeType; @@ -35,26 +35,26 @@ class Dispute extends Libraries\EntityBase /** * Dispute's reason - * @var DisputeReason + * @var \MangoPay\DisputeReason */ public $DisputeReason; /** * Disputed funds - * @var Money + * @var \MangoPay\Money */ public $DisputedFunds; /** * Contested funds - * @var Money + * @var \MangoPay\Money */ public $ContestedFunds; /** * The current status of the dispute * @var string - * @see DisputeStatus + * @see \MangoPay\DisputeStatus */ public $Status; diff --git a/MangoPay/DisputeDocument.php b/MangoPay/DisputeDocument.php index 0c5420c0..a84be3d5 100644 --- a/MangoPay/DisputeDocument.php +++ b/MangoPay/DisputeDocument.php @@ -16,14 +16,14 @@ class DisputeDocument extends Libraries\Document /** * Type of dispute document * @var string - * @see DisputeDocumentType + * @see \MangoPay\DisputeDocumentType */ public $Type; /** * Status of dispute document * @var string - * @see DisputeDocumentStatus + * @see \MangoPay\DisputeDocumentStatus */ public $Status; } diff --git a/MangoPay/DisputeReason.php b/MangoPay/DisputeReason.php index a2d46876..81eacb00 100644 --- a/MangoPay/DisputeReason.php +++ b/MangoPay/DisputeReason.php @@ -10,7 +10,7 @@ class DisputeReason extends Libraries\Dto /** * Dispute's reason type * @var string - * @see DisputeReasonType + * @see \MangoPay\DisputeReasonType */ public $DisputeReasonType; diff --git a/MangoPay/Event.php b/MangoPay/Event.php index 6b612d13..2de03dc5 100644 --- a/MangoPay/Event.php +++ b/MangoPay/Event.php @@ -15,7 +15,7 @@ class Event extends Libraries\Dto /** * Event type - * @var EventType + * @var \MangoPay\EventType */ public $EventType; diff --git a/MangoPay/EventType.php b/MangoPay/EventType.php index dfa08542..ffbda762 100644 --- a/MangoPay/EventType.php +++ b/MangoPay/EventType.php @@ -83,6 +83,6 @@ class EventType const DepositPreAuthorizationPaymentCanceled = "DEPOSIT_PREAUTHORIZATION_PAYMENT_CANCELED"; const DepositPreAuthorizationPaymentValidated = "DEPOSIT_PREAUTHORIZATION_PAYMENT_VALIDATED"; const CardValidationCreated = "CARD_VALIDATION_CREATED"; - const CardValidationFailed = "CARD_VALIDATION_FAILED"; + const CardValidationFailed= "CARD_VALIDATION_FAILED"; const CardValidationSucceeded = "CARD_VALIDATION_SUCCEEDED"; } diff --git a/MangoPay/FilterDisputeDocuments.php b/MangoPay/FilterDisputeDocuments.php index 50f3ab33..706fe463 100644 --- a/MangoPay/FilterDisputeDocuments.php +++ b/MangoPay/FilterDisputeDocuments.php @@ -9,13 +9,13 @@ class FilterDisputeDocuments extends FilterBase { /** * @var string - * @see DisputeDocumentStatus + * @see \MangoPay\DisputeDocumentStatus */ public $Status; /** * @var string - * @see DisputeDocumentType + * @see \MangoPay\DisputeDocumentType */ public $Type; } diff --git a/MangoPay/FilterDisputes.php b/MangoPay/FilterDisputes.php index 2a87475d..6a361032 100644 --- a/MangoPay/FilterDisputes.php +++ b/MangoPay/FilterDisputes.php @@ -9,7 +9,7 @@ class FilterDisputes extends FilterBase { /** * @var string - * @see DisputeType + * @see \MangoPay\DisputeType */ public $DisputeType; diff --git a/MangoPay/FilterEvents.php b/MangoPay/FilterEvents.php index 05a9f3ce..ead4580c 100644 --- a/MangoPay/FilterEvents.php +++ b/MangoPay/FilterEvents.php @@ -9,7 +9,7 @@ class FilterEvents extends FilterBase { /** * Event type - * @var EventType + * @var \MangoPay\EventType */ public $EventType; } diff --git a/MangoPay/FilterKycDocuments.php b/MangoPay/FilterKycDocuments.php index 92399bce..ac7311d5 100644 --- a/MangoPay/FilterKycDocuments.php +++ b/MangoPay/FilterKycDocuments.php @@ -9,13 +9,13 @@ class FilterKycDocuments extends FilterBase { /** * @var string - * @see KycDocumentStatus + * @see \MangoPay\KycDocumentStatus */ public $Status; /** * @var string - * @see KycDocumentType + * @see \MangoPay\KycDocumentType */ public $Type; } diff --git a/MangoPay/FilterPreAuthorizations.php b/MangoPay/FilterPreAuthorizations.php index e48d1a87..22cda945 100644 --- a/MangoPay/FilterPreAuthorizations.php +++ b/MangoPay/FilterPreAuthorizations.php @@ -15,14 +15,14 @@ class FilterPreAuthorizations extends Libraries\Dto /** * Status of the PreAuthorizations * @var string - * @see CardPreAuthorizationStatus + * @see \MangoPay\CardPreAuthorizationStatus */ public $Status; /** * Status of the payment after the PreAuthorization * @var string - * @see CardPreAuthorizationPaymentStatus + * @see \MangoPay\CardPreAuthorizationPaymentStatus */ public $PaymentStatus; } diff --git a/MangoPay/FilterRefunds.php b/MangoPay/FilterRefunds.php index 94aa0e7e..e7b1c56b 100644 --- a/MangoPay/FilterRefunds.php +++ b/MangoPay/FilterRefunds.php @@ -10,7 +10,7 @@ class FilterRefunds extends Libraries\Dto /** * Multiple values separated by commas are allowed * @var string - * @see RefundStatus + * @see \MangoPay\RefundStatus */ public $Status; diff --git a/MangoPay/FilterTransactions.php b/MangoPay/FilterTransactions.php index fad9326c..e7e807d6 100644 --- a/MangoPay/FilterTransactions.php +++ b/MangoPay/FilterTransactions.php @@ -9,19 +9,19 @@ class FilterTransactions extends FilterBase { /** * @var string - * @see TransactionStatus + * @see \MangoPay\TransactionStatus */ public $Status; /** * @var string - * @see TransactionType + * @see \MangoPay\TransactionType */ public $Type; /** * @var string - * @see TransactionNature + * @see \MangoPay\TransactionNature */ public $Nature; diff --git a/MangoPay/Hook.php b/MangoPay/Hook.php index 2ae386dd..40bb5918 100644 --- a/MangoPay/Hook.php +++ b/MangoPay/Hook.php @@ -15,19 +15,19 @@ class Hook extends Libraries\EntityBase /** * @var string - * @see HookStatus + * @see \MangoPay\HookStatus */ public $Status; /** * @var string - * @see HookValidity + * @see \MangoPay\HookValidity */ public $Validity; /** * @var string - * @see EventType + * @see \MangoPay\EventType */ public $EventType; } diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index 3d71abd6..1befe53b 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -9,13 +9,13 @@ class KycDocument extends Libraries\Document { /** * @var string - * @see KycDocumentType + * @see \MangoPay\KycDocumentType */ public $Type; /** * @var string - * @see KycDocumentStatus + * @see \MangoPay\KycDocumentStatus */ public $Status; diff --git a/MangoPay/Libraries/ApiOAuth.php b/MangoPay/Libraries/ApiOAuth.php index 409d2d01..89dc5944 100644 --- a/MangoPay/Libraries/ApiOAuth.php +++ b/MangoPay/Libraries/ApiOAuth.php @@ -9,7 +9,7 @@ class ApiOAuth extends ApiBase { /** * Get token information to OAuth Authentication - * @return OAuthToken OAuthToken object with token information + * @return \MangoPay\Libraries\OAuthToken OAuthToken object with token information */ public function CreateToken() { diff --git a/MangoPay/Libraries/AuthenticationHelper.php b/MangoPay/Libraries/AuthenticationHelper.php index 93f6ecc7..1c1d5098 100644 --- a/MangoPay/Libraries/AuthenticationHelper.php +++ b/MangoPay/Libraries/AuthenticationHelper.php @@ -31,7 +31,7 @@ public function GetHttpHeaderKey() /** * Get basic key for HTTP header * @return string - * @throws Exception If MangoPay_ClientId or MangoPay_ClientPassword is not defined + * @throws \MangoPay\Libraries\Exception If MangoPay_ClientId or MangoPay_ClientPassword is not defined */ public function GetHttpHeaderBasicKey() { @@ -66,7 +66,7 @@ public function GetAutenticationKey() * Get HTTP header value with authorization string for basic authentication * * @return string Value for HTTP header with authentication string - * @throws Exception If required constants are not defined. + * @throws \MangoPay\Libraries\Exception If required constants are not defined. */ private function GetHttpHeaderBasic() { @@ -77,7 +77,7 @@ private function GetHttpHeaderBasic() * Get HTTP header value with authorization string for strong authentication * * @return string Value for HTTP header with authentication string - * @throws Exception If OAuth token is not created (or is invalid) for strong authentication. + * @throws \MangoPay\Libraries\Exception If OAuth token is not created (or is invalid) for strong authentication. */ private function GetHttpHeaderStrong() { diff --git a/MangoPay/Libraries/AuthorizationTokenManager.php b/MangoPay/Libraries/AuthorizationTokenManager.php index 8e6b158c..58f10ade 100644 --- a/MangoPay/Libraries/AuthorizationTokenManager.php +++ b/MangoPay/Libraries/AuthorizationTokenManager.php @@ -9,7 +9,7 @@ class AuthorizationTokenManager extends ApiBase { /** * Storage object - * @var IStorageStrategy + * @var \MangoPay\Libraries\IStorageStrategy */ private $_storageStrategy; @@ -24,7 +24,7 @@ public function __construct($root) * Gets the current authorization token. * In the very first call, this method creates a new token before returning. * If currently stored token is expired, this method creates a new one. - * @return OAuthToken Valid OAuthToken instance. + * @return \MangoPay\Libraries\OAuthToken Valid OAuthToken instance. */ public function GetToken($autenticationKey) { @@ -40,7 +40,7 @@ public function GetToken($autenticationKey) /** * Stores authorization token passed as an argument in the underlying * storage strategy implementation. - * @param OAuthToken $token Token instance to be stored. + * @param \MangoPay\Libraries\OAuthToken $token Token instance to be stored. */ public function StoreToken($token) { @@ -52,7 +52,7 @@ public function StoreToken($token) * By default, the DefaultStorageStrategy instance is used. * There is no need to explicitly call this method until some more complex * storage implementation is needed. - * @param IStorageStrategy $customStorageStrategy IStorageStrategy interface implementation. + * @param \MangoPay\Libraries\IStorageStrategy $customStorageStrategy IStorageStrategy interface implementation. */ public function RegisterCustomStorageStrategy($customStorageStrategy) { diff --git a/MangoPay/Libraries/DefaultStorageStrategy.php b/MangoPay/Libraries/DefaultStorageStrategy.php index d5f55865..95bb3efb 100644 --- a/MangoPay/Libraries/DefaultStorageStrategy.php +++ b/MangoPay/Libraries/DefaultStorageStrategy.php @@ -18,7 +18,7 @@ public function __construct($config) /** * Gets the current authorization token. - * @return OAuthToken Currently stored token instance or null. + * @return \MangoPay\Libraries\OAuthToken Currently stored token instance or null. * @throws Exception */ public function Get() @@ -37,24 +37,24 @@ public function Get() $serialized = str_replace($this->_prefixContent, '', $data); return unserialize($serialized); } catch (Exception $e) { - throw new Exception('Cannot get token from file, or:' . $e->getMessage()); + throw new \MangoPay\Libraries\Exception('Cannot get token from file, or:' . $e->getMessage()); } } /** * Stores authorization token passed as an argument. - * @param OAuthToken $token Token instance to be stored. + * @param \MangoPay\Libraries\OAuthToken $token Token instance to be stored. */ public function Store($token) { if (!is_writable($this->GetPathToTemporaryFolder())) { - throw new Exception('Cannot create or write to file ' . $this->GetPathToTemporaryFolder()); + throw new \MangoPay\Libraries\Exception('Cannot create or write to file ' . $this->GetPathToTemporaryFolder()); } $serialized = serialize($token); $result = file_put_contents($this->GetPathToFile(), $this->_prefixContent . $serialized, LOCK_EX); if ($result === false) { - throw new Exception('Cannot put token to file'); + throw new \MangoPay\Libraries\Exception('Cannot put token to file'); } } @@ -74,7 +74,7 @@ private function GetPathToFile() private function GetPathToTemporaryFolder() { if (is_null($this->_config->TemporaryFolder)) { - throw new Exception('Path to temporary folder is not defined'); + throw new \MangoPay\Libraries\Exception('Path to temporary folder is not defined'); } return $this->_config->TemporaryFolder; diff --git a/MangoPay/Libraries/IStorageStrategy.php b/MangoPay/Libraries/IStorageStrategy.php index 9ca83e0f..e2a0197c 100644 --- a/MangoPay/Libraries/IStorageStrategy.php +++ b/MangoPay/Libraries/IStorageStrategy.php @@ -9,13 +9,13 @@ interface IStorageStrategy { /** * Gets the current authorization token. - * @return OAuthToken Currently stored token instance or null. + * @return \MangoPay\Libraries\OAuthToken Currently stored token instance or null. */ public function Get(); /** * Stores authorization token passed as an argument. - * @param OAuthToken $token Token instance to be stored. + * @param \MangoPay\Libraries\OAuthToken $token Token instance to be stored. */ public function Store($token); } diff --git a/MangoPay/Libraries/RestTool.php b/MangoPay/Libraries/RestTool.php index 5dd85b8b..0a7bb826 100644 --- a/MangoPay/Libraries/RestTool.php +++ b/MangoPay/Libraries/RestTool.php @@ -124,7 +124,7 @@ public function AddRequestHttpHeader($httpHeader) /** * Call request to MangoPay API * @param string $urlMethod Type of method in REST API - * @param RequestType $requestType Type of request + * @param \MangoPay\Libraries\RequestType $requestType Type of request * @param array $requestData Data to send in request * @param string $idempotencyKey * @param \MangoPay\Pagination $pagination Pagination object diff --git a/MangoPay/Mandate.php b/MangoPay/Mandate.php index b37ccc24..617ab3c6 100644 --- a/MangoPay/Mandate.php +++ b/MangoPay/Mandate.php @@ -53,7 +53,7 @@ class Mandate extends Libraries\EntityBase /** * Status of the mandate * @var string - * @see MandateStatus + * @see \MangoPay\MandateStatus */ public $Status; diff --git a/MangoPay/MangoPayApi.php b/MangoPay/MangoPayApi.php index e60379b8..d2f588ec 100644 --- a/MangoPay/MangoPayApi.php +++ b/MangoPay/MangoPayApi.php @@ -18,13 +18,13 @@ class MangoPayApi /** * Authorization token methods - * @var Libraries\AuthorizationTokenManager + * @var \MangoPay\Libraries\AuthorizationTokenManager */ public $OAuthTokenManager; /** * Configuration instance - * @var Libraries\Configuration + * @var \MangoPay\Libraries\Configuration */ public $Config; @@ -34,7 +34,7 @@ class MangoPayApi /** * OAuth methods - * @var Libraries\ApiOAuth + * @var \MangoPay\Libraries\ApiOAuth */ public $AuthenticationManager; @@ -176,7 +176,7 @@ class MangoPayApi public $logger; /** - * @var Libraries\HttpBase + * @var \MangoPay\Libraries\HttpBase */ public $httpClient; @@ -243,7 +243,7 @@ public function __construct() // Setting default NullLogger $this->logger = new NullLogger(); - $this->httpClient = new Libraries\HttpCurl($this); + $this->httpClient = new \MangoPay\Libraries\HttpCurl($this); } /** @@ -279,7 +279,7 @@ public function setConfig($Config) } /** - * @param Libraries\HttpBase $httpClient + * @param \MangoPay\Libraries\HttpBase $httpClient */ public function setHttpClient(Libraries\HttpBase $httpClient) { @@ -287,7 +287,7 @@ public function setHttpClient(Libraries\HttpBase $httpClient) } /** - * @return Libraries\HttpBase + * @return \MangoPay\Libraries\HttpBase */ public function getHttpClient() { diff --git a/MangoPay/PayInExecutionDetailsDirect.php b/MangoPay/PayInExecutionDetailsDirect.php index be03919a..9750df76 100644 --- a/MangoPay/PayInExecutionDetailsDirect.php +++ b/MangoPay/PayInExecutionDetailsDirect.php @@ -33,13 +33,13 @@ class PayInExecutionDetailsDirect extends Libraries\Dto implements PayInExecutio /** * Billing information - * @var Billing + * @var \MangoPay\Billing */ public $Billing; /** * Security & validation information - * @var SecurityInfo + * @var \MangoPay\SecurityInfo */ public $SecurityInfo; diff --git a/MangoPay/PayInExecutionDetailsExternalInstruction.php b/MangoPay/PayInExecutionDetailsExternalInstruction.php index c1509dfd..d5c47548 100644 --- a/MangoPay/PayInExecutionDetailsExternalInstruction.php +++ b/MangoPay/PayInExecutionDetailsExternalInstruction.php @@ -21,7 +21,7 @@ class PayInExecutionDetailsExternalInstruction extends Libraries\Dto implements /** * Information about the account that was debited. - * @var DebitedBankAccount + * @var \MangoPay\DebitedBankAccount */ public $DebitedBankAccount; } diff --git a/MangoPay/PayInExecutionDetailsWeb.php b/MangoPay/PayInExecutionDetailsWeb.php index e97a8254..6907c65c 100644 --- a/MangoPay/PayInExecutionDetailsWeb.php +++ b/MangoPay/PayInExecutionDetailsWeb.php @@ -50,7 +50,7 @@ class PayInExecutionDetailsWeb extends Libraries\Dto implements PayInExecutionDe /** * Billing information - * @var Billing + * @var \MangoPay\Billing */ public $Billing; diff --git a/MangoPay/PayInPaymentDetailsApplePay.php b/MangoPay/PayInPaymentDetailsApplePay.php index fe4359e3..e0c0384b 100644 --- a/MangoPay/PayInPaymentDetailsApplePay.php +++ b/MangoPay/PayInPaymentDetailsApplePay.php @@ -6,7 +6,7 @@ class PayInPaymentDetailsApplePay extends Libraries\Dto implements PayInPaymentD { /** * Payment information returned by Apple Pay payment - * @var PaymentData + * @var \MangoPay\PaymentData */ public $PaymentData; diff --git a/MangoPay/PayInPaymentDetailsBankWire.php b/MangoPay/PayInPaymentDetailsBankWire.php index 7935038c..08500939 100644 --- a/MangoPay/PayInPaymentDetailsBankWire.php +++ b/MangoPay/PayInPaymentDetailsBankWire.php @@ -9,19 +9,19 @@ class PayInPaymentDetailsBankWire extends Libraries\Dto implements PayInPaymentD { /** * Declared debited funds - * @var Money + * @var \MangoPay\Money */ public $DeclaredDebitedFunds; /** * Declared fees - * @var Money + * @var \MangoPay\Money */ public $DeclaredFees; /** * Bank account details - * @var BankAccount + * @var \MangoPay\BankAccount */ public $BankAccount; diff --git a/MangoPay/PayInRecurringRegistration.php b/MangoPay/PayInRecurringRegistration.php index fea03a8f..81b0d4b1 100644 --- a/MangoPay/PayInRecurringRegistration.php +++ b/MangoPay/PayInRecurringRegistration.php @@ -30,22 +30,22 @@ class PayInRecurringRegistration extends Libraries\Dto public $CreditedWalletId; /** - * @var Money + * @var \MangoPay\Money */ public $FirstTransactionDebitedFunds; /** - * @var Money + * @var \MangoPay\Money */ public $FirstTransactionFees; /** - * @var Billing + * @var \MangoPay\Billing */ public $Billing; /** - * @var Shipping + * @var \MangoPay\Shipping */ public $Shipping; @@ -75,12 +75,12 @@ class PayInRecurringRegistration extends Libraries\Dto public $Migration; /** - * @var Money + * @var \MangoPay\Money */ public $NextTransactionDebitedFunds; /** - * @var Money + * @var \MangoPay\Money */ public $NextTransactionFees; diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index 6de604b0..b06e0e7b 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -7,17 +7,17 @@ */ class PayOut extends Transaction { - /** - * The unique identifier of the bank account. - * @var string - */ - public $BankAccountId; + /** + * The unique identifier of the bank account. + * @var string + */ + public $BankAccountId; - /** - * Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. - * @var string - */ - public $BankWireRef; + /** + * Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. + * @var string + */ + public $BankWireRef; /** * Debited wallet Id @@ -31,24 +31,24 @@ class PayOut extends Transaction */ public $PaymentType; - /** - * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var PayOutPaymentDetailsBankWire - */ - public $PayoutPaymentDetails; + /** + * One of PayOutPaymentDetails implementations, depending on $PaymentType + * @var \MangoPay\PayOutPaymentDetailsBankWire + */ + public $PayoutPaymentDetails; /** * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var PayOutPaymentDetailsBankWire + * @var \MangoPay\PayOutPaymentDetailsBankWire */ public $MeanOfPaymentDetails; - /** - * Payout mode requested, default is 'STANDARD', Allowed values are - * 'STANDARD', 'INSTANT_PAYMENT', 'INSTANT_PAYMENT_ONLY' - * @var string - */ - public $PayoutModeRequested = 'STANDARD'; + /** + * Payout mode requested, default is 'STANDARD', Allowed values are + * 'STANDARD', 'INSTANT_PAYMENT', 'INSTANT_PAYMENT_ONLY' + * @var string + */ + public $PayoutModeRequested = 'STANDARD'; /** * Get array with mapping which property depends on other property diff --git a/MangoPay/RecurringPayInCIT.php b/MangoPay/RecurringPayInCIT.php index 37e6253a..b5a31a3b 100644 --- a/MangoPay/RecurringPayInCIT.php +++ b/MangoPay/RecurringPayInCIT.php @@ -10,7 +10,7 @@ class RecurringPayInCIT extends Libraries\Dto public $RecurringPayinRegistrationId; /** - * @var BrowserInfo + * @var \MangoPay\BrowserInfo */ public $BrowserInfo; diff --git a/MangoPay/RecurringPayInMIT.php b/MangoPay/RecurringPayInMIT.php index 229c007f..1cd12e31 100644 --- a/MangoPay/RecurringPayInMIT.php +++ b/MangoPay/RecurringPayInMIT.php @@ -10,12 +10,12 @@ class RecurringPayInMIT extends Libraries\Dto public $RecurringPayinRegistrationId; /** - * @var Money + * @var \MangoPay\Money */ public $DebitedFunds; /** - * @var Money + * @var \MangoPay\Money */ public $Fees; diff --git a/MangoPay/Refund.php b/MangoPay/Refund.php index 724ca8cf..557e86ef 100644 --- a/MangoPay/Refund.php +++ b/MangoPay/Refund.php @@ -33,7 +33,7 @@ class Refund extends Transaction /** * Contains info about the reason for refund - * @var RefundReasonDetails + * @var \MangoPay\RefundReasonDetails */ public $RefundReason; diff --git a/MangoPay/ReportRequest.php b/MangoPay/ReportRequest.php index 1b563992..73bdddc8 100644 --- a/MangoPay/ReportRequest.php +++ b/MangoPay/ReportRequest.php @@ -16,7 +16,7 @@ class ReportRequest extends Libraries\EntityBase /** * Status of the report. * @var string - * @see ReportStatus + * @see \MangoPay\ReportStatus */ public $Status; @@ -41,7 +41,7 @@ class ReportRequest extends Libraries\EntityBase /** * Type of the report. * @var string - * @see ReportType + * @see \MangoPay\ReportType */ public $ReportType; @@ -59,7 +59,7 @@ class ReportRequest extends Libraries\EntityBase /** * Filters for the report list. - * @var FilterReports + * @var \MangoPay\FilterReports */ public $Filters; diff --git a/MangoPay/Repudiation.php b/MangoPay/Repudiation.php index cd6a961b..2c497bc5 100644 --- a/MangoPay/Repudiation.php +++ b/MangoPay/Repudiation.php @@ -15,20 +15,20 @@ class Repudiation extends Libraries\EntityBase /** * The funds repudiated from the wallet - * @var Money + * @var \MangoPay\Money */ public $DebitedFunds; /** * The fees taken on the repudiation – will always be 0 at this stage - * @var Money + * @var \MangoPay\Money */ public $Fees; /** * The amount of credited funds – since there are currently no fees, * this will be equal to the DebitedFunds - * @var Money + * @var \MangoPay\Money */ public $CreditedFunds; @@ -41,7 +41,7 @@ class Repudiation extends Libraries\EntityBase /** * The status of the transfer * @var string - * @see TransactionStatus + * @see \MangoPay\TransactionStatus */ public $Status; @@ -80,7 +80,7 @@ class Repudiation extends Libraries\EntityBase /** * The initial transaction type * @var string - * @see TransactionType + * @see \MangoPay\TransactionType */ public $InitialTransactionType; diff --git a/MangoPay/SettlementTransfer.php b/MangoPay/SettlementTransfer.php index d3e29791..af41a784 100644 --- a/MangoPay/SettlementTransfer.php +++ b/MangoPay/SettlementTransfer.php @@ -15,7 +15,7 @@ class SettlementTransfer extends Transfer /** * The funds debited from the debited wallet - * @var Money + * @var \MangoPay\Money */ public $DebitedFunds; @@ -27,7 +27,7 @@ class SettlementTransfer extends Transfer * Fees of -200 will transfer 800 from the original wallet * to the credit wallet, and transfer 200 from your Fees * wallet to your Credit wallet - * @var Money + * @var \MangoPay\Money */ public $Fees; diff --git a/MangoPay/Transaction.php b/MangoPay/Transaction.php index 30008c08..fce8058b 100644 --- a/MangoPay/Transaction.php +++ b/MangoPay/Transaction.php @@ -22,25 +22,25 @@ class Transaction extends Libraries\EntityBase /** * Debited funds - * @var Money + * @var \MangoPay\Money */ public $DebitedFunds; /** * Credited funds - * @var Money + * @var \MangoPay\Money */ public $CreditedFunds; /** * Fees - * @var Money + * @var \MangoPay\Money */ public $Fees; /** * @var string - * @see TransactionStatus + * @see \MangoPay\TransactionStatus */ public $Status; @@ -64,13 +64,13 @@ class Transaction extends Libraries\EntityBase /** * @var string - * @see TransactionType + * @see \MangoPay\TransactionType */ public $Type; /** * @var string - * @see TransactionNature + * @see \MangoPay\TransactionNature */ public $Nature; diff --git a/MangoPay/UboDeclaration.php b/MangoPay/UboDeclaration.php index 2b0b407b..7b30f6b5 100644 --- a/MangoPay/UboDeclaration.php +++ b/MangoPay/UboDeclaration.php @@ -15,14 +15,14 @@ class UboDeclaration extends Libraries\EntityBase /** * Declaration status. * @var string - * @see UboDeclarationStatus + * @see \MangoPay\UboDeclarationStatus */ public $Status; /** * List of reasons why the declaration was refused. * @var string - * @see UboDeclarationRefusedOrIncompleteReasonType + * @see \MangoPay\UboDeclarationRefusedOrIncompleteReasonType */ public $Reason; diff --git a/tests/Cases/Base.php b/tests/Cases/Base.php index 24692e3a..d9ec13bf 100644 --- a/tests/Cases/Base.php +++ b/tests/Cases/Base.php @@ -39,12 +39,12 @@ abstract class Base extends TestCase */ public static $MatrixUboDeclaration; /** - * @var Ubo + * @var \MangoPay\Ubo */ public static $MatrixUbo; /** * Test bank account belonging to John - access by getJohnsAccount() - * @var BankAccount + * @var \MangoPay\BankAccount */ public static $JohnsAccount; /** @@ -272,10 +272,10 @@ protected function getJohnsPayInCardWeb() $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $user->Id; $payIn->CreditedUserId = $user->Id; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Currency = 'EUR'; $payIn->DebitedFunds->Amount = 1000; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Currency = 'EUR'; $payIn->Fees->Amount = 5; $payIn->CreditedWalletId = $wallet->Id; @@ -341,10 +341,10 @@ protected function getNewPayInDirectDebitDirect($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 10000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -387,10 +387,10 @@ protected function getJohnsWalletWithMoneyAndCardId($amount = 1000) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = self::$JohnsWalletWithMoney->Id; $payIn->AuthorId = $cardRegistration->UserId; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = $amount; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; @@ -444,10 +444,10 @@ protected function getJohnsWalletWithMoney($amount = 1000) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = self::$JohnsWalletWithMoney->Id; $payIn->AuthorId = $cardRegistration->UserId; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = $amount; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; @@ -530,16 +530,16 @@ protected function getJohnsMandate() /** * Creates self::$JohnsAccount (bank account belonging to John) if not created yet - * @return BankAccount + * @return \MangoPay\BankAccount */ protected function getJohnsAccount() { if (self::$JohnsAccount === null || self::$JohnsAccount->Active == false) { $john = $this->getJohn(); - $account = new BankAccount(); + $account = new \MangoPay\BankAccount(); $account->OwnerName = $john->FirstName . ' ' . $john->LastName; $account->OwnerAddress = $john->Address; - $account->Details = new BankAccountDetailsIBAN(); + $account->Details = new \MangoPay\BankAccountDetailsIBAN(); $account->Details->IBAN = 'FR7630004000031234567890143'; $account->Details->BIC = 'BNPAFRPP'; self::$JohnsAccount = $this->_api->Users->CreateBankAccount($john->Id, $account); @@ -562,10 +562,10 @@ protected function getJohnsPayOutBankWire() $payOut->Tag = 'DefaultTag'; $payOut->AuthorId = $user->Id; $payOut->CreditedUserId = $user->Id; - $payOut->DebitedFunds = new Money(); + $payOut->DebitedFunds = new \MangoPay\Money(); $payOut->DebitedFunds->Currency = 'EUR'; $payOut->DebitedFunds->Amount = 10; - $payOut->Fees = new Money(); + $payOut->Fees = new \MangoPay\Money(); $payOut->Fees->Currency = 'EUR'; $payOut->Fees->Amount = 5; @@ -595,10 +595,10 @@ protected function getJohnsPayOutForCardDirect() $payOut->Tag = 'DefaultTag'; $payOut->AuthorId = $payIn->AuthorId; $payOut->CreditedUserId = $payIn->AuthorId; - $payOut->DebitedFunds = new Money(); + $payOut->DebitedFunds = new \MangoPay\Money(); $payOut->DebitedFunds->Currency = 'EUR'; $payOut->DebitedFunds->Amount = 10; - $payOut->Fees = new Money(); + $payOut->Fees = new \MangoPay\Money(); $payOut->Fees->Currency = 'EUR'; $payOut->Fees->Amount = 5; @@ -639,10 +639,10 @@ protected function getNewPayInCardDirect($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -683,10 +683,10 @@ protected function getNewPayInMbwayWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -712,10 +712,10 @@ protected function getNewPayInGooglePayDirect($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 100; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -768,10 +768,10 @@ protected function getNewPayInMultibancoWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -799,10 +799,10 @@ protected function getNewPayInSatispayWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 20; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 2000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -839,10 +839,10 @@ protected function getNewPayInBlikWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 30; $payIn->Fees->Currency = 'PLN'; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 3000; $payIn->DebitedFunds->Currency = 'PLN'; @@ -872,10 +872,10 @@ protected function getNewPayInKlarnaWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -929,10 +929,10 @@ protected function getLegacyPayInIdealWeb($userId = null) $payIn->PaymentType = "CARD"; $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -963,10 +963,10 @@ protected function getNewPayInIdealWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -994,10 +994,10 @@ protected function getNewPayInGiropayWeb($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $userId; $payIn->CreditedWalletId = $wallet->Id; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 10; $payIn->Fees->Currency = 'EUR'; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; @@ -1038,10 +1038,10 @@ protected function getNewPayInCardDirect3DSecure($userId = null) $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $userId; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -1088,10 +1088,10 @@ protected function getNewTransfer() $transfer->Tag = 'DefaultTag'; $transfer->AuthorId = $user->Id; $transfer->CreditedUserId = $user->Id; - $transfer->DebitedFunds = new Money(); + $transfer->DebitedFunds = new \MangoPay\Money(); $transfer->DebitedFunds->Currency = 'EUR'; $transfer->DebitedFunds->Amount = 100; - $transfer->Fees = new Money(); + $transfer->Fees = new \MangoPay\Money(); $transfer->Fees->Currency = 'EUR'; $transfer->Fees->Amount = 0; @@ -1113,10 +1113,10 @@ protected function getNewRefundForTransfer($transfer) $refund->DebitedWalletId = $transfer->DebitedWalletId; $refund->CreditedWalletId = $transfer->CreditedWalletId; $refund->AuthorId = $user->Id; - $refund->DebitedFunds = new Money(); + $refund->DebitedFunds = new \MangoPay\Money(); $refund->DebitedFunds->Amount = $transfer->DebitedFunds->Amount; $refund->DebitedFunds->Currency = $transfer->DebitedFunds->Currency; - $refund->Fees = new Money(); + $refund->Fees = new \MangoPay\Money(); $refund->Fees->Amount = $transfer->Fees->Amount; $refund->Fees->Currency = $transfer->Fees->Currency; @@ -1134,10 +1134,10 @@ protected function getNewRefundForPayIn($payIn) $refund = new \MangoPay\Refund(); $refund->CreditedWalletId = $payIn->CreditedWalletId; $refund->AuthorId = $user->Id; - $refund->DebitedFunds = new Money(); + $refund->DebitedFunds = new \MangoPay\Money(); $refund->DebitedFunds->Amount = $payIn->DebitedFunds->Amount; $refund->DebitedFunds->Currency = $payIn->DebitedFunds->Currency; - $refund->Fees = new Money(); + $refund->Fees = new \MangoPay\Money(); $refund->Fees->Amount = $payIn->Fees->Amount; $refund->Fees->Currency = $payIn->Fees->Currency; @@ -1154,10 +1154,10 @@ protected function getPartialRefundForPayIn($payIn) $refund = new \MangoPay\Refund(); $refund->AuthorId = $user->Id; - $refund->DebitedFunds = new Money(); + $refund->DebitedFunds = new \MangoPay\Money(); $refund->DebitedFunds->Amount = 100; $refund->DebitedFunds->Currency = $payIn->DebitedFunds->Currency; - $refund->Fees = new Money(); + $refund->Fees = new \MangoPay\Money(); $refund->Fees->Amount = 10; $refund->Fees->Currency = $payIn->Fees->Currency; @@ -1201,7 +1201,7 @@ protected function getJohnsCardPreAuthorization($idempotencyKey = null) $cardPreAuthorization = new \MangoPay\CardPreAuthorization(); $cardPreAuthorization->AuthorId = $user->Id; - $cardPreAuthorization->DebitedFunds = new Money(); + $cardPreAuthorization->DebitedFunds = new \MangoPay\Money(); $cardPreAuthorization->DebitedFunds->Currency = "EUR"; $cardPreAuthorization->DebitedFunds->Amount = 1000; $cardPreAuthorization->CardId = $getCardRegistration->CardId; @@ -1243,10 +1243,10 @@ protected function getJohnsPayInPaypalWeb() $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $user->Id; $payIn->CreditedUserId = $user->Id; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Currency = 'EUR'; $payIn->DebitedFunds->Amount = 1000; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Currency = 'EUR'; $payIn->Fees->Amount = 5; $payIn->CreditedWalletId = $wallet->Id; @@ -1274,11 +1274,11 @@ protected function getJohnsPayInPaypalWebV2() $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $user->Id; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Currency = 'EUR'; $payIn->DebitedFunds->Amount = 500; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Currency = 'EUR'; $payIn->Fees->Amount = 0; @@ -1333,10 +1333,10 @@ protected function getJohnsPayInPayconiqWeb() $payIn = new \MangoPay\PayIn(); $payIn->AuthorId = $user->Id; $payIn->CreditedUserId = $user->Id; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Currency = 'EUR'; $payIn->DebitedFunds->Amount = 1000; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Currency = 'EUR'; $payIn->Fees->Amount = 5; $payIn->CreditedWalletId = $wallet->Id; diff --git a/tests/Cases/CardPreAuthorizationsTest.php b/tests/Cases/CardPreAuthorizationsTest.php index 5dbc77b6..96cb3253 100644 --- a/tests/Cases/CardPreAuthorizationsTest.php +++ b/tests/Cases/CardPreAuthorizationsTest.php @@ -48,17 +48,17 @@ public function test_CardPreAuthorization_CheckCardInfo() } - // function test_CardPreAuthorization_Update() - // { - //TO BE FIXED - /* $cardPreAuthorization = $this->getJohnsCardPreAuthorization(); - $cardPreAuthorization->PaymentStatus = \MangoPay\CardPreAuthorizationPaymentStatus::Canceled; +// function test_CardPreAuthorization_Update() +// { + //TO BE FIXED + /* $cardPreAuthorization = $this->getJohnsCardPreAuthorization(); + $cardPreAuthorization->PaymentStatus = \MangoPay\CardPreAuthorizationPaymentStatus::Canceled; - $resultCardPreAuthorization = $this->_api->CardPreAuthorizations->Update($cardPreAuthorization); + $resultCardPreAuthorization = $this->_api->CardPreAuthorizations->Update($cardPreAuthorization); - $this->assertSame(\MangoPay\CardPreAuthorizationStatus::Succeeded, $resultCardPreAuthorization->Status); - $this->assertSame(\MangoPay\CardPreAuthorizationPaymentStatus::Canceled, $resultCardPreAuthorization->PaymentStatus); + $this->assertSame(\MangoPay\CardPreAuthorizationStatus::Succeeded, $resultCardPreAuthorization->Status); + $this->assertSame(\MangoPay\CardPreAuthorizationPaymentStatus::Canceled, $resultCardPreAuthorization->PaymentStatus); - */ - // } + */ +// } } diff --git a/tests/Cases/CardsTest.php b/tests/Cases/CardsTest.php index 36572763..890e036e 100644 --- a/tests/Cases/CardsTest.php +++ b/tests/Cases/CardsTest.php @@ -59,7 +59,7 @@ public function test_Card_Validate() $john = $this->getNewJohn(); $cardRegistration = $this->getUpdatedCardRegistration($john->Id); - $cardValidation = new CardValidation(); + $cardValidation = new \MangoPay\CardValidation(); $cardValidation->Id = $cardRegistration->CardId; $cardValidation->Tag = "Test card validate"; $cardValidation->IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; @@ -83,7 +83,7 @@ public function test_get_Card_Validation() $john = $this->getNewJohn(); $cardRegistration = $this->getUpdatedCardRegistration($john->Id); - $cardValidation = new CardValidation(); + $cardValidation = new \MangoPay\CardValidation(); $cardValidation->Id = $cardRegistration->CardId; $cardValidation->Tag = "Test get card validation"; $cardValidation->IpAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; diff --git a/tests/Cases/ConversionsTest.php b/tests/Cases/ConversionsTest.php index 0248ecbd..2b963032 100644 --- a/tests/Cases/ConversionsTest.php +++ b/tests/Cases/ConversionsTest.php @@ -7,7 +7,6 @@ use MangoPay\CreateQuotedConversion; use MangoPay\Money; use MangoPay\TransactionType; - use function PHPUnit\Framework\assertNotNull; class ConversionsTest extends Base diff --git a/tests/Cases/DepositTest.php b/tests/Cases/DepositTest.php index ddbaf200..ebc10992 100644 --- a/tests/Cases/DepositTest.php +++ b/tests/Cases/DepositTest.php @@ -50,23 +50,23 @@ public function test_Deposits_Get() $this->assertEquals($deposit->Id, $fetchedDeposit->Id); } - // /** - // * @throws \Exception - // */ - // public function test_Deposits_Cancel() - // { - // $cardRegistration = $this->getCardRegistrationForDeposit(); - // $user = $this->getJohn(); - // - // $deposit = $this->_api->Deposits->Create($this->getNewDeposit($cardRegistration->CardId, $user->Id)); - // - // $dto = new CancelDeposit(); - // $dto->PaymentStatus = "CANCELED"; - // - // $this->_api->Deposits->Cancel($deposit->Id, $dto); - // - // $fetchedDeposit = $this->_api->Deposits->Get($deposit->Id); - // - // $this->assertEquals("CANCELED", $fetchedDeposit->PaymentStatus); - // } +// /** +// * @throws \Exception +// */ +// public function test_Deposits_Cancel() +// { +// $cardRegistration = $this->getCardRegistrationForDeposit(); +// $user = $this->getJohn(); +// +// $deposit = $this->_api->Deposits->Create($this->getNewDeposit($cardRegistration->CardId, $user->Id)); +// +// $dto = new CancelDeposit(); +// $dto->PaymentStatus = "CANCELED"; +// +// $this->_api->Deposits->Cancel($deposit->Id, $dto); +// +// $fetchedDeposit = $this->_api->Deposits->Get($deposit->Id); +// +// $this->assertEquals("CANCELED", $fetchedDeposit->PaymentStatus); +// } } diff --git a/tests/Cases/DisputesTest.php b/tests/Cases/DisputesTest.php index 8677ebfd..66dd9503 100644 --- a/tests/Cases/DisputesTest.php +++ b/tests/Cases/DisputesTest.php @@ -382,13 +382,13 @@ public function test_Disputes_UpdateDisputeDocument() $this->_api->Disputes->CreateDisputeDocumentPageFromFile($disputeForTest->Id, $disputeDocument->Id, __DIR__ . "/../TestKycPageFile.png"); - $disputeDocument->Status = DisputeDocumentStatus::ValidationAsked; + $disputeDocument->Status = \MangoPay\DisputeDocumentStatus::ValidationAsked; $result = $this->_api->Disputes->UpdateDisputeDocument($disputeForTest->Id, $disputeDocument); $this->assertNotNull($result); $this->assertEquals($disputeDocument->Type, $result->Type); - $this->assertTrue($result->Status == DisputeDocumentStatus::ValidationAsked); + $this->assertTrue($result->Status == \MangoPay\DisputeDocumentStatus::ValidationAsked); } public function test_Disputes_GetRepudiation() diff --git a/tests/Cases/PayInsTest.php b/tests/Cases/PayInsTest.php index c1c360a6..2373c2d1 100644 --- a/tests/Cases/PayInsTest.php +++ b/tests/Cases/PayInsTest.php @@ -22,9 +22,9 @@ public function test_PayIns_Create_CardWeb() $payIn = $this->getJohnsPayInCardWeb(); $this->assertTrue($payIn->Id > 0); - $this->assertSame(PayInPaymentType::Card, $payIn->PaymentType); + $this->assertSame(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertSame(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertSame(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertNotNull($payIn->ExecutionDetails->Billing); } @@ -36,9 +36,9 @@ public function test_PayIns_Get_CardWeb() $getPayIn = $this->_api->PayIns->Get($payIn->Id); $this->assertSame($payIn->Id, $getPayIn->Id); - $this->assertSame($payIn->PaymentType, PayInPaymentType::Card); + $this->assertSame($payIn->PaymentType, \MangoPay\PayInPaymentType::Card); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertSame(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertSame(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertIdenticalInputProps($payIn, $getPayIn); $this->assertSame(PayInStatus::Created, $getPayIn->Status); @@ -58,9 +58,9 @@ public function test_PayIns_Create_CardDirect() $this->assertTrue($payIn->Id > 0); $this->assertEquals($wallet->Id, $payIn->CreditedWalletId); - $this->assertEquals(PayInPaymentType::Card, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Direct, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $payIn->ExecutionDetails); $this->assertInstanceOf('\MangoPay\Money', $payIn->DebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $payIn->CreditedFunds); @@ -82,9 +82,9 @@ public function test_PayIns_Get_CardDirect() $getPayIn = $this->_api->PayIns->Get($payIn->Id); $this->assertSame($payIn->Id, $getPayIn->Id); - $this->assertSame(PayInPaymentType::Card, $payIn->PaymentType); + $this->assertSame(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertSame(PayInExecutionType::Direct, $payIn->ExecutionType); + $this->assertSame(\MangoPay\PayInExecutionType::Direct, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $payIn->ExecutionDetails); $this->assertIdenticalInputProps($payIn, $getPayIn); $this->assertNotNull($getPayIn->PaymentDetails->CardId); @@ -134,10 +134,10 @@ public function test_PayIns_PreAuthorizedDirect() $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 1000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 0; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -154,9 +154,9 @@ public function test_PayIns_PreAuthorizedDirect() $this->assertTrue($createPayIn->Id > 0); $this->assertEquals($wallet->Id, $createPayIn->CreditedWalletId); - $this->assertEquals(PayInPaymentType::Preauthorized, $createPayIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Preauthorized, $createPayIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsPreAuthorized', $createPayIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Direct, $createPayIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $createPayIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $createPayIn->ExecutionDetails); $this->assertInstanceOf('\MangoPay\Money', $createPayIn->DebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $createPayIn->CreditedFunds); @@ -176,11 +176,11 @@ public function test_PayIns_BankWireDirect_Create() $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; // payment type as CARD - $payIn->PaymentDetails = new PayInPaymentDetailsBankWire(); - $payIn->PaymentDetails->DeclaredDebitedFunds = new Money(); + $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsBankWire(); + $payIn->PaymentDetails->DeclaredDebitedFunds = new \MangoPay\Money(); $payIn->PaymentDetails->DeclaredDebitedFunds->Amount = 10000; $payIn->PaymentDetails->DeclaredDebitedFunds->Currency = 'EUR'; - $payIn->PaymentDetails->DeclaredFees = new Money(); + $payIn->PaymentDetails->DeclaredFees = new \MangoPay\Money(); $payIn->PaymentDetails->DeclaredFees->Amount = 0; $payIn->PaymentDetails->DeclaredFees->Currency = 'EUR'; $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); @@ -190,11 +190,11 @@ public function test_PayIns_BankWireDirect_Create() $this->assertTrue($createPayIn->Id > 0); $this->assertEquals($wallet->Id, $createPayIn->CreditedWalletId); - $this->assertEquals(PayInPaymentType::BankWire, $createPayIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::BankWire, $createPayIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsBankWire', $createPayIn->PaymentDetails); $this->assertInstanceOf('\MangoPay\Money', $createPayIn->PaymentDetails->DeclaredDebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $createPayIn->PaymentDetails->DeclaredFees); - $this->assertEquals(PayInExecutionType::Direct, $createPayIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $createPayIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $createPayIn->ExecutionDetails); $this->assertEquals($user->Id, $createPayIn->AuthorId); $this->assertEquals(PayInStatus::Created, $createPayIn->Status); @@ -215,11 +215,11 @@ public function test_PayIns_BankWireDirect_Get() $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; // payment type as CARD - $payIn->PaymentDetails = new PayInPaymentDetailsBankWire(); - $payIn->PaymentDetails->DeclaredDebitedFunds = new Money(); + $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsBankWire(); + $payIn->PaymentDetails->DeclaredDebitedFunds = new \MangoPay\Money(); $payIn->PaymentDetails->DeclaredDebitedFunds->Amount = 10000; $payIn->PaymentDetails->DeclaredDebitedFunds->Currency = 'EUR'; - $payIn->PaymentDetails->DeclaredFees = new Money(); + $payIn->PaymentDetails->DeclaredFees = new \MangoPay\Money(); $payIn->PaymentDetails->DeclaredFees->Amount = 0; $payIn->PaymentDetails->DeclaredFees->Currency = 'EUR'; $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); @@ -228,11 +228,11 @@ public function test_PayIns_BankWireDirect_Get() $getPayIn = $this->_api->PayIns->Get($createdPayIn->Id); $this->assertEquals($getPayIn->Id, $createdPayIn->Id); - $this->assertEquals(PayInPaymentType::BankWire, $getPayIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::BankWire, $getPayIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsBankWire', $getPayIn->PaymentDetails); $this->assertInstanceOf('\MangoPay\Money', $getPayIn->PaymentDetails->DeclaredDebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $getPayIn->PaymentDetails->DeclaredFees); - $this->assertEquals(PayInExecutionType::Direct, $getPayIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $getPayIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $getPayIn->ExecutionDetails); $this->assertEquals($user->Id, $getPayIn->AuthorId); $this->assertEquals('PAYIN', $getPayIn->Type); @@ -251,10 +251,10 @@ public function test_PayIns_DirectDeDirectDebitWeb_Create() $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; - $payIn->DebitedFunds = new Money(); + $payIn->DebitedFunds = new \MangoPay\Money(); $payIn->DebitedFunds->Amount = 10000; $payIn->DebitedFunds->Currency = 'EUR'; - $payIn->Fees = new Money(); + $payIn->Fees = new \MangoPay\Money(); $payIn->Fees->Amount = 100; $payIn->Fees->Currency = 'EUR'; // payment type as CARD @@ -269,10 +269,10 @@ public function test_PayIns_DirectDeDirectDebitWeb_Create() $this->assertTrue($createPayIn->Id > 0); $this->assertEquals($wallet->Id, $createPayIn->CreditedWalletId); - $this->assertEquals(PayInPaymentType::DirectDebit, $createPayIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::DirectDebit, $createPayIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsDirectDebit', $createPayIn->PaymentDetails); $this->assertEquals('GIROPAY', $createPayIn->PaymentDetails->DirectDebitType); - $this->assertEquals(PayInExecutionType::Web, $createPayIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Web, $createPayIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $createPayIn->ExecutionDetails); $this->assertEquals("FR", $createPayIn->ExecutionDetails->Culture); $this->assertEquals($user->Id, $createPayIn->AuthorId); @@ -461,10 +461,10 @@ public function test_PayIns_Apple_Pay_Create() $applePayPayIn->CreditedWalletId = $wallet->Id; $applePayPayIn->AuthorId = $user->Id; $applePayPayIn->CreditedUserId = $user->Id; - $applePayPayIn->DebitedFunds = new Money(); + $applePayPayIn->DebitedFunds = new \MangoPay\Money(); $applePayPayIn->DebitedFunds->Amount = 199; $applePayPayIn->DebitedFunds->Currency = 'EUR'; - $applePayPayIn->Fees = new Money(); + $applePayPayIn->Fees = new \MangoPay\Money(); $applePayPayIn->Fees->Amount = 1; $applePayPayIn->Fees->Currency = 'EUR'; $applePayPayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); @@ -503,10 +503,10 @@ private function getRecurringPayin() $payIn->CardId = $cardId; $payIn->CreditedUserId = $user->Id; $payIn->CreditedWalletId = $walletId; - $payIn->FirstTransactionDebitedFunds = new Money(); + $payIn->FirstTransactionDebitedFunds = new \MangoPay\Money(); $payIn->FirstTransactionDebitedFunds->Amount = 12; $payIn->FirstTransactionDebitedFunds->Currency = 'EUR'; - $payIn->FirstTransactionFees = new Money(); + $payIn->FirstTransactionFees = new \MangoPay\Money(); $payIn->FirstTransactionFees->Amount = 1; $payIn->FirstTransactionFees->Currency = 'EUR'; $billing = new \MangoPay\Billing(); @@ -628,10 +628,10 @@ public function test_Create_Recurring_PayIn_CIT_With_Debited_Funds_And_Fees() $payIn->CardId = $cardId; $payIn->CreditedUserId = $user->Id; $payIn->CreditedWalletId = $walletId; - $payIn->FirstTransactionDebitedFunds = new Money(); + $payIn->FirstTransactionDebitedFunds = new \MangoPay\Money(); $payIn->FirstTransactionDebitedFunds->Amount = 10; $payIn->FirstTransactionDebitedFunds->Currency = 'EUR'; - $payIn->FirstTransactionFees = new Money(); + $payIn->FirstTransactionFees = new \MangoPay\Money(); $payIn->FirstTransactionFees->Amount = 1; $payIn->FirstTransactionFees->Currency = 'EUR'; $billing = new \MangoPay\Billing(); @@ -646,10 +646,10 @@ public function test_Create_Recurring_PayIn_CIT_With_Debited_Funds_And_Fees() $payIn->Billing = $billing; $payIn->EndDate = 1833377810; $payIn->Migration = true; - $payIn->NextTransactionDebitedFunds = new Money(); + $payIn->NextTransactionDebitedFunds = new \MangoPay\Money(); $payIn->NextTransactionDebitedFunds->Amount = 12; $payIn->NextTransactionDebitedFunds->Currency = 'EUR'; - $payIn->NextTransactionFees = new Money(); + $payIn->NextTransactionFees = new \MangoPay\Money(); $payIn->NextTransactionFees->Amount = 1; $payIn->NextTransactionFees->Currency = 'EUR'; $payIn->Frequency = "Daily"; @@ -690,10 +690,10 @@ public function test_PayIns_Google_Pay_Create() $googlePayPayIn->CreditedWalletId = $wallet->Id; $googlePayPayIn->AuthorId = $user->Id; $googlePayPayIn->CreditedUserId = $user->Id; - $googlePayPayIn->DebitedFunds = new Money(); + $googlePayPayIn->DebitedFunds = new \MangoPay\Money(); $googlePayPayIn->DebitedFunds->Amount = 199; $googlePayPayIn->DebitedFunds->Currency = 'EUR'; - $googlePayPayIn->Fees = new Money(); + $googlePayPayIn->Fees = new \MangoPay\Money(); $googlePayPayIn->Fees->Amount = 1; $googlePayPayIn->Fees->Currency = 'EUR'; $googlePayPayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); @@ -732,9 +732,9 @@ public function test_ExampleOf3DSecureV2_1() $this->assertTrue($payIn->Id > 0); $this->assertEquals($wallet->Id, $payIn->CreditedWalletId); - $this->assertEquals(PayInPaymentType::Card, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Direct, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $payIn->ExecutionDetails); $this->assertInstanceOf('\MangoPay\Money', $payIn->DebitedFunds); $this->assertInstanceOf('\MangoPay\Money', $payIn->CreditedFunds); @@ -752,9 +752,9 @@ public function test_PayIns_Create_MbwayWeb() $payIn = $this->getNewPayInMbwayWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(PayInPaymentType::Mbway, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Mbway, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsMbway', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -770,9 +770,9 @@ public function test_PayIns_Create_GooglePayDirectV2() $payIn = $this->getNewPayInGooglePayDirect(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(PayInPaymentType::GooglePayV2, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::GooglePayV2, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsGooglePay', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Direct, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Direct, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsDirect', $payIn->ExecutionDetails); $this->assertEquals('PAYIN', $payIn->Type); $this->assertEquals('REGULAR', $payIn->Nature); @@ -786,9 +786,9 @@ public function test_PayIns_Create_MultibancoWeb() $payIn = $this->getNewPayInMultibancoWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(PayInPaymentType::Multibanco, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Multibanco, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsMultibanco', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -803,9 +803,9 @@ public function test_PayIns_Create_Satispay_Web() $payIn = $this->getNewPayInSatispayWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(PayInPaymentType::Satispay, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Satispay, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsSatispay', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -820,9 +820,9 @@ public function test_PayIns_Create_BlikWeb() $payIn = $this->getNewPayInBlikWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(PayInPaymentType::Blik, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Blik, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsBlik', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -837,9 +837,9 @@ public function test_PayIns_Create_KlarnaWeb() $payIn = $this->getNewPayInKlarnaWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(PayInPaymentType::Klarna, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Klarna, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsKlarna', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -854,9 +854,9 @@ public function test_PayIns_Create_Legacy_IdealWeb() $payIn = $this->getLegacyPayInIdealWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(PayInPaymentType::Card, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Card, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsCard', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -869,9 +869,9 @@ public function test_PayIns_Create_IdealWeb() $payIn = $this->getNewPayInIdealWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(PayInPaymentType::Ideal, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Ideal, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsIdeal', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -886,9 +886,9 @@ public function test_PayIns_Create_Giropay_Web() $payIn = $this->getNewPayInGiropayWeb(); $this->assertNotNull($payIn->Id > 0); - $this->assertEquals(PayInPaymentType::Giropay, $payIn->PaymentType); + $this->assertEquals(\MangoPay\PayInPaymentType::Giropay, $payIn->PaymentType); $this->assertInstanceOf('\MangoPay\PayInPaymentDetailsGiropay', $payIn->PaymentDetails); - $this->assertEquals(PayInExecutionType::Web, $payIn->ExecutionType); + $this->assertEquals(\MangoPay\PayInExecutionType::Web, $payIn->ExecutionType); $this->assertInstanceOf('\MangoPay\PayInExecutionDetailsWeb', $payIn->ExecutionDetails); $this->assertEquals(PayInStatus::Created, $payIn->Status); $this->assertEquals('PAYIN', $payIn->Type); @@ -915,36 +915,36 @@ public function test_CardDirect_getPaymentMethodMetadata() $this->assertNotNull($result_metadata->BinData[0]->CardType); } - // /** - // * @throws \Exception - // */ - // public function test_CreateCardPreAuthorizedDepositPayIn() { - // $cardRegistration = $this->getCardRegistrationForDeposit(); - // $user = $this->getJohn(); - // $wallet = $this->getJohnsWallet(); - // - // $deposit = $this->_api->Deposits->Create($this->getNewDeposit($cardRegistration->CardId, $user->Id)); - // - // $dto = new CreateCardPreAuthorizedDepositPayIn(); - // $dto->DepositId = $deposit->Id; - // $dto->AuthorId = $user->Id; - // $dto->CreditedWalletId = $wallet->Id; - // - // $debitedFunds = new Money(); - // $debitedFunds->Amount = 500; - // $debitedFunds->Currency = "EUR"; - // - // $fees = new Money(); - // $fees->Amount = 0; - // $fees->Currency = "EUR"; - // - // $dto->DebitedFunds = $debitedFunds; - // $dto->Fees = $fees; - // - // $payIn = $this->_api->PayIns->CreateCardPreAuthorizedDepositPayIn($dto); - // print_r($payIn); - // - // $this->assertNotNull($payIn); - // $this->assertEquals("SUCCEEDED", $payIn->Status); - // } +// /** +// * @throws \Exception +// */ +// public function test_CreateCardPreAuthorizedDepositPayIn() { +// $cardRegistration = $this->getCardRegistrationForDeposit(); +// $user = $this->getJohn(); +// $wallet = $this->getJohnsWallet(); +// +// $deposit = $this->_api->Deposits->Create($this->getNewDeposit($cardRegistration->CardId, $user->Id)); +// +// $dto = new CreateCardPreAuthorizedDepositPayIn(); +// $dto->DepositId = $deposit->Id; +// $dto->AuthorId = $user->Id; +// $dto->CreditedWalletId = $wallet->Id; +// +// $debitedFunds = new Money(); +// $debitedFunds->Amount = 500; +// $debitedFunds->Currency = "EUR"; +// +// $fees = new Money(); +// $fees->Amount = 0; +// $fees->Currency = "EUR"; +// +// $dto->DebitedFunds = $debitedFunds; +// $dto->Fees = $fees; +// +// $payIn = $this->_api->PayIns->CreateCardPreAuthorizedDepositPayIn($dto); +// print_r($payIn); +// +// $this->assertNotNull($payIn); +// $this->assertEquals("SUCCEEDED", $payIn->Status); +// } } diff --git a/tests/Cases/UsersTest.php b/tests/Cases/UsersTest.php index bc00722a..6b3173b8 100644 --- a/tests/Cases/UsersTest.php +++ b/tests/Cases/UsersTest.php @@ -449,7 +449,7 @@ public function test_Users_CreateKycDocument_TestAll() foreach ($aKycDocTypes as $kycDoc) { try { $this->CreateKycDocument_TestOne($kycDoc[0], $kycDoc[1]); - } catch (Exception $exc) { + } catch (\MangoPay\Libraries\Exception $exc) { $message = 'Error (Code: ' . $exc->getCode() . ', ' . $exc->getMessage() . ') ' . 'during create/get KYC Document with type: ' . $kycDoc[0]; @@ -548,7 +548,7 @@ public function test_Users_CreateKycPage_EmptyFilePath() try { $this->_api->Users->CreateKycPageFromFile($user->Id, $kycDocument->Id, ''); $this->fail("This should have failed because path to file is empty"); - } catch (Exception $exc) { + } catch (\MangoPay\Libraries\Exception $exc) { $this->assertSame('Path of file cannot be empty', $exc->getMessage()); } } @@ -564,7 +564,7 @@ public function test_Users_CreateKycPage_WrongFilePath() try { $this->_api->Users->CreateKycPageFromFile($user->Id, $kycDocument->Id, 'notExistFileName.tmp'); $this->fail("This should have failed because file is non existent"); - } catch (Exception $exc) { + } catch (\MangoPay\Libraries\Exception $exc) { $this->assertSame('File not exist', $exc->getMessage()); } } @@ -742,7 +742,7 @@ public function test_395() Logs::Debug('MangoPay\ResponseException Code', $e->GetCode()); Logs::Debug('Message', $e->GetMessage()); Logs::Debug('Details', $e->GetErrorDetails()); - } catch (Exception $e) { + } catch (\MangoPay\Libraries\Exception $e) { Logs::Debug('MangoPay\Exception Message', $e->GetMessage()); } } diff --git a/tests/Cases/WalletsTest.php b/tests/Cases/WalletsTest.php index 1612060b..f86ac9eb 100644 --- a/tests/Cases/WalletsTest.php +++ b/tests/Cases/WalletsTest.php @@ -60,7 +60,7 @@ public function test_Wallets_Transactions() * doesn't fail. * https://travis-ci.org/Mangopay/mangopay2-php-sdk/builds/208607353#L349 */ - // $this->assertIdenticalInputProps($transactions[0], $payIn); +// $this->assertIdenticalInputProps($transactions[0], $payIn); } public function test_Wallets_Transactions_Filter() From 6c17547f0cfb3756dbebc810097736bdcc88b05f Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Wed, 1 May 2024 01:11:53 +0600 Subject: [PATCH 11/37] Update MangoPay/PayOut.php Co-authored-by: William Desportes --- MangoPay/PayOut.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index b06e0e7b..c66ba3a1 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -48,7 +48,7 @@ class PayOut extends Transaction * 'STANDARD', 'INSTANT_PAYMENT', 'INSTANT_PAYMENT_ONLY' * @var string */ - public $PayoutModeRequested = 'STANDARD'; + public $PayoutModeRequested; /** * Get array with mapping which property depends on other property From a096ea6eb21685ef321176b028cb018ac34350bc Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Wed, 1 May 2024 01:13:46 +0600 Subject: [PATCH 12/37] update: gitignore and attributes --- .gitattributes | 2 +- .gitignore | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9ba0826c..338b15ad 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,4 +8,4 @@ Makefile export-ignore /php_env export-ignore phpunit.xml export-ignore -.php_cs export-ignore +.php-cs-fixer.php export-ignore diff --git a/.gitignore b/.gitignore index a2c6d56e..37f526df 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,6 @@ composer.lock .* !.github -!.php-cs-fixer.* +!.php-cs-fixer.php !.gitignore !.gitattributes From 96d67ae668e8a0b9cf4f46784852e6c20ec5d994 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Thu, 2 May 2024 09:41:38 +0600 Subject: [PATCH 13/37] added: label properties for KYC Document --- MangoPay/KycDocument.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index 1befe53b..c85ceb7d 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -8,18 +8,33 @@ class KycDocument extends Libraries\Document { /** + * The user ID who owns this document * @var string * @see \MangoPay\KycDocumentType */ public $Type; + /** + * The label of KYC document type + * @var string + */ + public $TypeLabel; + /** + * The status of the KYC document * @var string * @see \MangoPay\KycDocumentStatus */ public $Status; + /** + * The label of KYC document status + * @var string + */ + public $StatusLabel; + /** + * Refused reason type * @var string */ public $UserId; From c1f8164eccf18c13f8de95573f563079098b6129 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Thu, 2 May 2024 09:43:00 +0600 Subject: [PATCH 14/37] update: property doc for KYC $UserId --- MangoPay/KycDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index c85ceb7d..da7dd020 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -34,7 +34,7 @@ class KycDocument extends Libraries\Document public $StatusLabel; /** - * Refused reason type + * The user Id * @var string */ public $UserId; From ce7d988f29423d8a7d9ab1951daad6a8313083ac Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Thu, 2 May 2024 10:55:00 +0600 Subject: [PATCH 15/37] update: api base, api ubo and its declaration for parameter type --- MangoPay/ApiUboDeclarations.php | 59 ++++++++++++++++++++------------- MangoPay/Libraries/ApiBase.php | 4 +-- MangoPay/UboDeclaration.php | 1 + 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/MangoPay/ApiUboDeclarations.php b/MangoPay/ApiUboDeclarations.php index 9ec6dbad..010d682b 100644 --- a/MangoPay/ApiUboDeclarations.php +++ b/MangoPay/ApiUboDeclarations.php @@ -10,13 +10,21 @@ class ApiUboDeclarations extends Libraries\ApiBase /** * Creates a new UBO Declaration for an user. * @param string $userId The ID of the user - * @return \MangoPay\UboDeclaration UBO Declaration object returned from API + * @return \MangoPay\UboDeclaration|array|object UBO Declaration object returned from API */ public function Create($userId) { return $this->CreateObject('ubo_declaration_create', null, '\MangoPay\UboDeclaration', $userId); } + /** + * Gets all UBO Declarations for an user. + * @param string $userId The ID of the user + * @param \MangoPay\Pagination $pagination Pagination object + * @param \MangoPay\Sorting $sorting Sorting object + * @return \MangoPay\UboDeclaration[]|array List of UBO Declarations returned from API + * @throws \MangoPay\Libraries\Exception + */ public function GetAll($userId, $pagination = null, $sorting = null) { return $this->GetList("ubo_declaration_all", $pagination, '\MangoPay\UboDeclaration', $userId, null, $sorting); @@ -24,9 +32,10 @@ public function GetAll($userId, $pagination = null, $sorting = null) /** * Gets an UBO Declaration. - * @param string $userId - * @param string $uboDeclarationId - * @return UboDeclaration UBO Declaration object returned from API + * @param string $userId The ID of the user + * @param string $uboDeclarationId UBO Declaration identifier + * @return UboDeclaration|array|object UBO Declaration object returned from API + * @throws \MangoPay\Libraries\Exception */ public function Get($userId, $uboDeclarationId) { @@ -35,8 +44,8 @@ public function Get($userId, $uboDeclarationId) /** * Gets an UBO Declaration directly by Id. - * @param string $uboDeclarationId - * @return UboDeclaration UBO Declaration object returned from API + * @param string $uboDeclarationId UBO Declaration identifier + * @return UboDeclaration|array|object UBO Declaration object returned from API */ public function GetById($uboDeclarationId) { @@ -45,10 +54,11 @@ public function GetById($uboDeclarationId) /** * Creates a new UBO for the specified arguments - * @param string $userId int - * @param string $uboDeclarationId int - * @param Ubo $ubo - * @return Ubo UBO object returned from API + * @param string $userId The ID of the user + * @param string $uboDeclarationId The ID of the UBO declaration + * @param Ubo $ubo The UBO object to be created + * @return Ubo|array|object UBO object returned from API + * @throws \MangoPay\Libraries\ResponseException */ public function CreateUbo($userId, $uboDeclarationId, $ubo) { @@ -60,10 +70,10 @@ public function CreateUbo($userId, $uboDeclarationId, $ubo) /** * Updates an UBO - * @param string $userId - * @param string $uboDeclarationId - * @param Ubo $ubo - * @return Ubo UBO object returned from API + * @param string $userId The ID of the user + * @param string $uboDeclarationId The ID of the UBO declaration + * @param Ubo $ubo The UBO object to be updated + * @return Ubo|array|object UBO object returned from API */ public function UpdateUbo($userId, $uboDeclarationId, $ubo) { @@ -72,10 +82,11 @@ public function UpdateUbo($userId, $uboDeclarationId, $ubo) /** * Gets an UBO - * @param string $userId - * @param string $uboDeclarationId - * @param string $uboId - * @return Ubo UBO object returned from API + * @param string $userId The ID of the user + * @param string $uboDeclarationId The ID of the UBO declaration + * @param string $uboId The ID of the UBO + * @return \MangoPay\Ubo|array|object UBO object returned from API + * @throws \MangoPay\Libraries\Exception */ public function GetUbo($userId, $uboDeclarationId, $uboId) { @@ -84,9 +95,9 @@ public function GetUbo($userId, $uboDeclarationId, $uboId) /** * Updates an UBO Declaration with the status VALIDATION_ASKED. - * @param string $userId - * @param string $uboDeclarationId - * @return UboDeclaration + * @param string $userId The ID of the user + * @param string $uboDeclarationId The ID of the UBO declaration + * @return \MangoPay\UboDeclaration|array|object */ public function SubmitForValidation($userId, $uboDeclarationId) { @@ -98,8 +109,10 @@ public function SubmitForValidation($userId, $uboDeclarationId) /** * Gets an UBO Declaration. - * @param string $uboDeclarationId - * @return UboDeclaration UBO Declaration object returned from API + * @param string $uboDeclarationId UBO Declaration identifier + * @return \MangoPay\UboDeclaration|array|object UBO Declaration object returned from API + * @throws \MangoPay\Libraries\Exception + * @throws \Exception */ public function GetUboDeclarationById($uboDeclarationId) { diff --git a/MangoPay/Libraries/ApiBase.php b/MangoPay/Libraries/ApiBase.php index fe163378..d9a4263c 100644 --- a/MangoPay/Libraries/ApiBase.php +++ b/MangoPay/Libraries/ApiBase.php @@ -266,7 +266,7 @@ protected function GetRequestType($key) /** * Create object in API * @param string $methodKey Key with request data - * @param object $entity Entity object + * @param object|null $entity Entity object * @param object $responseClassName Name of entity class from response * @param string $entityId Entity identifier * @return object Response data @@ -302,7 +302,7 @@ protected function CreateObject($methodKey, $entity, $responseClassName = null, /** * Get entity object from API * @param string $methodKey Key with request data - * @param object $responseClassName Name of entity class from response + * @param string $responseClassName Name of entity class from response * @param array $params path variable in urls * @return object Response data * @throws Exception diff --git a/MangoPay/UboDeclaration.php b/MangoPay/UboDeclaration.php index 7b30f6b5..b9f8c04e 100644 --- a/MangoPay/UboDeclaration.php +++ b/MangoPay/UboDeclaration.php @@ -8,6 +8,7 @@ class UboDeclaration extends Libraries\EntityBase { /** + * * @var int Unix timestamp, Date of process */ public $ProcessedDate; From 87bfb35c918c5c93367b9b8ba8f83927eb9c6cd7 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Thu, 2 May 2024 10:55:26 +0600 Subject: [PATCH 16/37] update: php cs fixer config --- .php-cs-fixer.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 978f05da..40de0768 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -1,18 +1,18 @@ in(__DIR__.'/MangoPay') - ->in(__DIR__.'/tests') + ->in(__DIR__.'/MangoPay') + ->in(__DIR__.'/tests') ; return (new PhpCsFixer\Config()) - ->setRules([ - '@PSR12' => true, - 'fully_qualified_strict_types' => true, - 'array_syntax' => ['syntax' => 'short'], - 'visibility_required' => [ - 'elements' => ['property', 'method'], // 'const' is removed for old PHP compat - ], - ]) - ->setFinder($finder) - ; \ No newline at end of file + ->setRules([ + '@PSR12' => true, + 'fully_qualified_strict_types' => true, + 'array_syntax' => ['syntax' => 'short'], + 'visibility_required' => [ + 'elements' => ['property', 'method'], // 'const' is removed for old PHP compat + ], + ]) + ->setFinder($finder) +; From c31570d7df8f21910da835b56d1d6e08e6fb72e0 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Thu, 2 May 2024 10:58:46 +0600 Subject: [PATCH 17/37] update: missing property for Ubo Declaration --- MangoPay/UboDeclaration.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MangoPay/UboDeclaration.php b/MangoPay/UboDeclaration.php index b9f8c04e..399acc00 100644 --- a/MangoPay/UboDeclaration.php +++ b/MangoPay/UboDeclaration.php @@ -8,8 +8,8 @@ class UboDeclaration extends Libraries\EntityBase { /** - * - * @var int Unix timestamp, Date of process + * The Declaration process date. + * @var int Unix timestamp, Date of the process */ public $ProcessedDate; @@ -20,6 +20,12 @@ class UboDeclaration extends Libraries\EntityBase */ public $Status; + /** + * The output status of Declaration status. + * @var string + */ + public $OutputStatus; + /** * List of reasons why the declaration was refused. * @var string From a12582ad54648ad10f875ae54d0462f91d350022 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Sat, 4 May 2024 14:45:39 +0600 Subject: [PATCH 18/37] Use local namespace for PayOutPaymentDetailsBankWire Co-authored-by: William Desportes --- MangoPay/PayOut.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index c66ba3a1..9ac854ea 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -33,7 +33,7 @@ class PayOut extends Transaction /** * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var \MangoPay\PayOutPaymentDetailsBankWire + * @var PayOutPaymentDetailsBankWire */ public $PayoutPaymentDetails; From aa87640cde12041cf5ac485a2bfae2e4b7c85187 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Sat, 4 May 2024 14:53:31 +0600 Subject: [PATCH 19/37] Use local namespace for PayOutPaymentDetailsBankWire Co-authored-by: William Desportes --- MangoPay/PayOut.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index 9ac854ea..32d9e7ba 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -39,7 +39,7 @@ class PayOut extends Transaction /** * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var \MangoPay\PayOutPaymentDetailsBankWire + * @var PayOutPaymentDetailsBankWire */ public $MeanOfPaymentDetails; From 156a26d415a0ef43209b54f9cf0a998b1dc8ba66 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Sat, 4 May 2024 14:54:47 +0600 Subject: [PATCH 20/37] Update Property documentation Co-authored-by: William Desportes --- MangoPay/PayOut.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index 32d9e7ba..a16031ea 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -14,7 +14,8 @@ class PayOut extends Transaction public $BankAccountId; /** - * Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. + * Custom description to appear on the user’s bank statement along with the platform name. + * The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. * @var string */ public $BankWireRef; From 089bff7cafd7252835d62902517448343080a0a1 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Sat, 4 May 2024 14:55:35 +0600 Subject: [PATCH 21/37] Delete old install script Co-authored-by: William Desportes --- php_env/PHP_8.1/Dockerfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/php_env/PHP_8.1/Dockerfile b/php_env/PHP_8.1/Dockerfile index f0993f8a..15b2e86f 100644 --- a/php_env/PHP_8.1/Dockerfile +++ b/php_env/PHP_8.1/Dockerfile @@ -21,8 +21,4 @@ RUN docker-php-ext-install pcntl RUN docker-php-source delete # Install composer -COPY composer.sh / -RUN chmod +x composer.sh -RUN /composer.sh -RUN mv composer.phar /usr/local/bin/composer -RUN mkdir /.composer && chmod o+rwx /.composer +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer From 964ee7ea66c513020d24b3e0d7bd0ba97d0effb2 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Sat, 4 May 2024 14:58:51 +0600 Subject: [PATCH 22/37] delete: php cs fixer cache file --- .php-cs-fixer.cache | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .php-cs-fixer.cache diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache deleted file mode 100644 index 33c1c544..00000000 --- a/.php-cs-fixer.cache +++ /dev/null @@ -1 +0,0 @@ -{"php":"8.3.6","version":"3.54.0:v3.54.0#2aecbc8640d7906c38777b3dcab6f4ca79004d08","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":{"elements":["property","method"]},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"fully_qualified_strict_types":true,"array_syntax":{"syntax":"short"}},"hashes":{"MangoPay\/DepositStatus.php":"c5e74558b55f4ef2f47b2bb53f9362c2","MangoPay\/ShippingAddress.php":"d947fe7120cfa529297c224af48aeb0b","MangoPay\/DisputeDocumentPage.php":"acbe40fd680eaefdebdff33770c2bf1a","MangoPay\/CardInfo.php":"561eb46b996f0cbbe1a724e2c05cbf8e","MangoPay\/UboDeclarationStatus.php":"93c1a9fe9179526b6e385b9bca7c9646","MangoPay\/Card.php":"f6088c89b0dee02cf67b5ea4453311e7","MangoPay\/InstantPayout.php":"47a33e70333a48deaaccbfa8233280ba","MangoPay\/Deposit.php":"2bd227e6ae6e19abd62dab8729d505c5","MangoPay\/CreateDeposit.php":"bf8ab5220418c8157e2b7daabb074bdc","MangoPay\/UserLegal.php":"4669f7f2c95dccf7b3669a051308de0d","MangoPay\/PayOutPaymentDetailsBankWire.php":"cedf0c748a86c1b0aee42de6c7f62454","MangoPay\/CardRegistration.php":"9b8edd056acc85d3077879a538f5a663","MangoPay\/ReportStatus.php":"256d09cb0bdeea982a0fc12f0b992c7a","MangoPay\/ShippingPreference.php":"467810bd0ff78f60db7c4131f8c48cf1","MangoPay\/ApiRepudiations.php":"4f417ce17e580b920d509f85294aca2b","MangoPay\/PayOut.php":"5c2149c973148ba913cd24f3c04b6525","MangoPay\/ApiEvents.php":"2da2a03e57117d436c21f591c4bb32ac","MangoPay\/Transaction.php":"3d26d113d6cef86cead4fd55d5947886","MangoPay\/Conversion.php":"92c453c36c7671fd1989a389101817ae","MangoPay\/Refund.php":"9ebd65639d361754f75650601dde93a5","MangoPay\/Event.php":"7915af0901bebb95eaa7c1c94f32e82e","MangoPay\/BankingAlias.php":"836f17ff67ffe29ba3f1162d8f97b0bc","MangoPay\/ConversionQuote.php":"14295ea17da8165d99f41ed84c95713c","MangoPay\/ReportRequest.php":"8b06aa91b783f838590e57a0b6deca62","MangoPay\/PayInRecurringRegistrationUpdate.php":"8f0ad1aa6fc4b04c6c10d2660f46dcc1","MangoPay\/CardValidity.php":"63a06d959c451343d0ade31a43f01e58","MangoPay\/ApiHooks.php":"50838cfc311904a8744574c110dc10ee","MangoPay\/DisputeType.php":"348c117a275e1a041be6d0e4121bf46d","MangoPay\/UboDeclarationRefusedOrIncompleteReasonType.php":"88c449ceb6dc9afe5708935ea23770de","MangoPay\/MandateStatus.php":"44cdca914b2f899d527400f12f2238b9","MangoPay\/RecurringPayInMIT.php":"4381a5c54e7405178efb7c6394f8c1aa","MangoPay\/Wallet.php":"7583276d0bba7732f489086e9e1c44dc","MangoPay\/ApiPayOuts.php":"3146860b4620521629a6059a1612ae09","MangoPay\/KycPage.php":"4dc12a16a289981e636911bbf6cdd778","MangoPay\/KeyValueArray.php":"5fc7a707ae67f3489c0c5cde10d114b9","MangoPay\/ApiReports.php":"47dbc94a2f99912a354f50fbbf2a3def","MangoPay\/FilterBase.php":"85417808e88d8f8b6a8ad1e879455b96","MangoPay\/ApiTransfers.php":"349902f6ce2c620f1e6bdec6774a6d72","MangoPay\/MangoPayApi.php":"23e686e02df3753eb5905085f1652e43","MangoPay\/DebitedBankAccount.php":"4a5ddb892c0c4a60baa24058b6a5bb14","MangoPay\/UserBlockStatus.php":"6959e13098ba4cf4bf1fc2802e26c9ab","MangoPay\/FilterDisputeDocuments.php":"19a85f53c1770859c31c964fd917fa32","MangoPay\/PayInPaymentDetailsMbway.php":"90794aef5acccf026476a23d861611bd","MangoPay\/PayInExecutionDetailsWeb.php":"49b2fee05ecf62eff427116ca8a27d94","MangoPay\/PayInRecurring.php":"ca65de284baa7c0f81879eee0f6f5926","MangoPay\/PaymentMethodMetadata.php":"d3e67d1c6da156035ee074544cc54713","MangoPay\/PayInPaymentDetailsPreAuthorized.php":"71c92dc9d8ad198c8283ad4bacbd400d","MangoPay\/PayOutPaymentType.php":"c3c64904ddc3a4dc1b90bd9a72d00092","MangoPay\/DisputeReasonType.php":"9049d7d67f6d8cc20c4032d42a7f5348","MangoPay\/PayInPaymentDetailsIdeal.php":"47e3a713b18cc8aefd8e46d2f77166fb","MangoPay\/SettlementTransfer.php":"b61390f435150e04279110ed14bb7628","MangoPay\/BusinessType.php":"2c9b3ddb23177cdfb5e3941901c0edb7","MangoPay\/ApiDeposits.php":"e8b152f7f0d23496d235eb7977c754ba","MangoPay\/Pagination.php":"ff528c35d8a32b9f1a88a92f2a581361","MangoPay\/RefundStatus.php":"0df1f0a78cd7f3ce3538c13688247319","MangoPay\/Ubo.php":"45ee190470a30fd2ad70a4e75aed4a34","MangoPay\/PayInRecurringRegistrationGet.php":"b2dfe5af60958982596670f1e32c6e8f","MangoPay\/BankingAliasOTHER.php":"e65dfcd99571fa9083114e72fa247333","MangoPay\/Shipping.php":"5cbf7de0fe9daa722229946833442b72","MangoPay\/Response.php":"f9d9788b69ac72350a35d62957b20190","MangoPay\/PayInPaymentDetailsDirectDebitDirect.php":"7eb675ee724bf2c0cf52ec46516a37bd","MangoPay\/Address.php":"468a26b89a32be2b7ccb999dc344e704","MangoPay\/RecurringPayInCurrentState.php":"0de91dfe2b84071acab730ff6f5c6e11","MangoPay\/SortDirection.php":"79a30de12b21f71445b4af4a723c6c5c","MangoPay\/PersonType.php":"7ab6c6186c01b41cb487f8f59ff1b265","MangoPay\/Hook.php":"845fa0a01f5813fd6f42743efa9f696f","MangoPay\/KycLevel.php":"8f195262405035aa22a87bd311ad16f2","MangoPay\/PayInTemplateURLOptions.php":"351b253b44dbd16e67f2f589e8c83ac7","MangoPay\/ClientLogoUpload.php":"ff0842a868cea8c2d3c6e78f97514298","MangoPay\/PayInPaymentDetailsPayconiq.php":"db8785a218e17d51152d176333967b05","MangoPay\/Sorting.php":"3eb1af265ee46597c996586609453e7c","MangoPay\/PayIn.php":"13524c0bffd04ed4c863f58b2731d0f7","MangoPay\/FilterEvents.php":"67fdb4afd296ae4ea07ae63190d2b250","MangoPay\/ApiWallets.php":"cff52f43c833c6c5c969575e692f669b","MangoPay\/NaturalUserCapacity.php":"ab7da6f45c010d360ff9714ddd30e9f8","MangoPay\/PayInWebExtendedView.php":"6dfd596609bdf9593d9651d5bc1102e4","MangoPay\/DeclaredUbo.php":"2ce0dfaa479eae894200e8ed2e3e4842","MangoPay\/BankAccountDetailsCA.php":"37caeedc0198f1156e66f704191146da","MangoPay\/UboRefusedReasonType.php":"1b7b835b60c7fbe4baba5904099fcbb3","MangoPay\/FilterBankAccounts.php":"293e311e26defe58be9071ffa6e56c7c","MangoPay\/AVSResult.php":"a1bd07221e57bd8e99581addf007f709","MangoPay\/FilterCards.php":"cc3a3d509da4dd24b5933eb11c1226aa","MangoPay\/CardPreAuthorization.php":"5d5dc7d4dff27ec034262ab696812fd1","MangoPay\/User.php":"55599407a1cdba0f59bbfcff62f1d784","MangoPay\/ApiCardPreAuthorizations.php":"8026cc5e928f73689e85de8603e24934","MangoPay\/FilterReports.php":"09e747a24bf8c9db514768397f129e0c","MangoPay\/HookStatus.php":"a38da5f0a8f6c13c75a1ddcb7125c321","MangoPay\/PayInExecutionDetailsDirect.php":"5e439abfb4a668d7000b6fc0da697c97","MangoPay\/ReportType.php":"5946eae62c38d9d0d39e1374654dbbf2","MangoPay\/Libraries\/RestTool.php":"98bc061973ae14602066c97fbc19a2fe","MangoPay\/Libraries\/Document.php":"5517f6864791795ab5db4997c1d0fdf9","MangoPay\/Libraries\/IStorageStrategy.php":"fa5f309eb14566d4c1ce970b4bae6224","MangoPay\/Libraries\/Dto.php":"c80d676977c321f322941f1e52b0ac8a","MangoPay\/Libraries\/AuthenticationHelper.php":"7a2272437209840e53b5391def82dad6","MangoPay\/Libraries\/HttpBase.php":"338500e29612cdb01e1e20098e7ad7df","MangoPay\/Libraries\/UrlTool.php":"8b95a646b560edac31a67d4c705041f2","MangoPay\/Libraries\/Logs.php":"d74ef8e4189de5d1c60050834cbe0b8d","MangoPay\/Libraries\/HttpResponse.php":"57fbf00901140f61dd3272c1a3561064","MangoPay\/Libraries\/AuthorizationTokenManager.php":"6fed73223925745eaf174970d101a571","MangoPay\/Libraries\/ApiOAuth.php":"de46232677c88ac23b6d0a7b7b852f17","MangoPay\/Libraries\/ResponseException.php":"a36888f88f627ab66037fa2b267cd47d","MangoPay\/Libraries\/Configuration.php":"a634a5ab6fd69da815627dbdf4d4aa90","MangoPay\/Libraries\/DefaultStorageStrategy.php":"5a37cd1befcd0005c4c58cf7cc1b15b8","MangoPay\/Libraries\/Error.php":"a7aaad5ccbf119e886f2717d1d2204b8","MangoPay\/Libraries\/Upload.php":"b52fb70e67f5816f25a1bab355fd3804","MangoPay\/Libraries\/EntityBase.php":"5960f5f4a6f7ff5be8b314373852b24e","MangoPay\/Libraries\/RequestType.php":"4d0e46db5da8efb4c3e0a54ce246ec43","MangoPay\/Libraries\/Exception.php":"345db775625839d68d5ced99497b713d","MangoPay\/Libraries\/ApiBase.php":"b4dd80763288040ddcf4d0489633515d","MangoPay\/Libraries\/HttpCurl.php":"137c74cf8db65546e98ea19bfa3e9cd0","MangoPay\/Libraries\/OAuthToken.php":"1707ada8e0deb6e889eda8620a7aee72","MangoPay\/Birthplace.php":"287f7d219b5f4b2ffb2764228ecffe53","MangoPay\/PayInPaymentDetails.php":"441ec552b55b5db6f97e046049c828bd","MangoPay\/Dispute.php":"6d0340786cd72c125ad33e855bfc45b7","MangoPay\/PayInRecurringRegistration.php":"fe964ea36194dcb588c76e3c2ae4070e","MangoPay\/DocumentPageConsult.php":"c6bf75b40dd32f0dd9f4a11c12bab765","MangoPay\/FilterKycDocuments.php":"3aab65a018a28295cd5da98ebc69f106","MangoPay\/ApiDisputes.php":"c99810adad4f6200febea335b34cfcfc","MangoPay\/DisputeStatus.php":"a43b2909b392e9f3447a26e571c4ea5c","MangoPay\/BankingAliasType.php":"c66d0c47f3f4a136e9aa119bc3f77e2e","MangoPay\/Transfer.php":"fbbe688542ecb279f321bf9ed5cad505","MangoPay\/KycDocumentType.php":"ba3bac13281bca7a261d541f6b6ff7ca","MangoPay\/KycDocument.php":"3270ee0a02087835ae88477361ebb48c","MangoPay\/PayInPaymentDetailsDirectDebit.php":"cf16d7bb626d6aa4a96c878e508533b5","MangoPay\/RefundReasonDetails.php":"d1668fa893e28e1a55e746c01c516260","MangoPay\/PayInStatus.php":"ccc9c4c085f53ab44b0d210ce370e1ac","MangoPay\/HookValidity.php":"dce4e339dee09693082d17ff1ce9ab31","MangoPay\/CountryAuthorization.php":"f3fb6d622ff795f88d96a2c55e776983","MangoPay\/CreateQuotedConversion.php":"90585279e3f177f2e3730cd430fde039","MangoPay\/UserCategory.php":"3f8729fc7805d98e58a10cdfc661996a","MangoPay\/BrowserInfo.php":"d26238ae3a545e8ea0fcbed17a262191","MangoPay\/Sector.php":"6c5a8e55bd4b816f7d2c7e89836e67e0","MangoPay\/PlatformCategorization.php":"7f56b08fc669b2ca34721c5fe062b69f","MangoPay\/PayinsLinked.php":"5b20d445e4b15ab661f0a48d27d43092","MangoPay\/TransactionStatus.php":"ec6889aa991fd5bad5760034624f5312","MangoPay\/ApiBankAccounts.php":"7ac840b57e0e09525dc7126518c16cdb","MangoPay\/PayInPaymentDetailsKlarna.php":"f5df86a44de85106094facafa9ea7a13","MangoPay\/CurrencyIso.php":"8daaf73243ebcd96769d548290123be7","MangoPay\/DisputeDocumentStatus.php":"c32a510fdacf361c34299fce42a0ec68","MangoPay\/CompanyNumberDetails.php":"d51ef3247b2b79de141ce5d11b254898","MangoPay\/CardPreAuthorizationPaymentStatus.php":"6a03c9cbe63160d80b016d2892c419b7","MangoPay\/ApiRefunds.php":"379a993792bf01f5007c9094fa036ae5","MangoPay\/BankAccountDetailsUS.php":"cd72af713cf461ad96ed19cc3250a30b","MangoPay\/PayInRecurringRegistrationRequestResponse.php":"50be93f33b671c8f6cbffe5d3e1eb668","MangoPay\/ApiCards.php":"474eb0e76f4fe7e15738b7cacd98ecfa","MangoPay\/DisputeDocument.php":"5ad25f0af621aeb840fd4e22878885dc","MangoPay\/ApiUsers.php":"d83b0a39c5da822022c3a66efe36c14e","MangoPay\/ScopeBlocked.php":"b06beb6f82568e6b72bb8cb04413e21d","MangoPay\/CompanyNumber.php":"61ff35f4d2880703eaafddea84b93ed2","MangoPay\/PayInPaymentDetailsMultibanco.php":"d96f2d54642f62ddaa84eff347f00936","MangoPay\/PayInCardTemplateURLOptions.php":"c7b30345e2883f510b2e2ccae1d9dbc5","MangoPay\/ApiPayIns.php":"e731b4f12e33cc7642f75a09027b7615","MangoPay\/ApiKycDocuments.php":"c3d24976e54d0e8e6afa134f30d19360","MangoPay\/ApiCardRegistrations.php":"91119c6012a67d009e58ed2c752da0b9","MangoPay\/Money.php":"ff794df47b535692c9964c71f52a3cad","MangoPay\/ConversionRate.php":"020cfcac5b05e676c7314df32c17e434","MangoPay\/ApiBankingAliases.php":"8eab9267183ccdac0ff3147d317d54d5","MangoPay\/FilterPreAuthorizations.php":"5d4acdd72eed5aa020073cb1908db83c","MangoPay\/LineItem.php":"e8c507314a14a139dcb36fab4ad0af6c","MangoPay\/CreateCardPreAuthorizedDepositPayIn.php":"3412c13f2af02dcbff5f68d7b709e99e","MangoPay\/ApiDisputeDocuments.php":"f7973f7d83aad382aa8cbd46bff78798","MangoPay\/TransactionNature.php":"a598596c4345cc24685c1f155359480c","MangoPay\/ApiResponses.php":"61239d96092d9ce57c84aa94a8f8cdac","MangoPay\/FallbackReason.php":"bfeb1afb8bb5acef0f0d5cc17bc8a4bd","MangoPay\/ApiMandates.php":"0a23c28b65ba9a8026b9452b316cd7dc","MangoPay\/PayInPaymentDetailsPaypal.php":"b5a2b1144cef9731b60ff18376935f4f","MangoPay\/SecurityInfo.php":"f238e241822ccd26a9b31888d2b97287","MangoPay\/PaymentData.php":"1c318135842edc07407f9388e9427c00","MangoPay\/BankAccountDetails.php":"613ce3a7fccc4cfd2f0a02aae8d89202","MangoPay\/PayInPaymentDetailsGooglePay.php":"1e8ef31742de3cc176314e0ecf7275f1","MangoPay\/KycDocumentStatus.php":"c571099565ae1b551716adfd8e6ee8e9","MangoPay\/ApiConversions.php":"ab10fa7280b1decc08909e050dc35b2d","MangoPay\/PayOutStatus.php":"828e32a9105b155e3b632bb8af6a4b30","MangoPay\/PayInExecutionDetailsExternalInstruction.php":"916dfd43361b5509c282418787b1b82f","MangoPay\/BankingAliasIBAN.php":"9ecc6d5525531305615beb33c2418c31","MangoPay\/TransactionType.php":"93a08ffcca945002a5eef45cd6a0d305","MangoPay\/BankAccountDetailsOTHER.php":"46a511f4cea4b057dfcad4ba41da2e0c","MangoPay\/CreateInstantConversion.php":"54cb69ddd85935f71fe26ee4292f15a3","MangoPay\/PayInPaymentType.php":"5dcdbd7e0e6fcb93afa3226b5b7b89e6","MangoPay\/CardValidationStatus.php":"05734f46262e3a37e25ba98387af2e5d","MangoPay\/KycDocumentRefusedReasonType.php":"7b00461c84028abe377749f63e48a09d","MangoPay\/RateLimit.php":"962fa82cbcd45e739f1659d14b2d15c4","MangoPay\/ApiRegulatory.php":"62ff807a31964d4204b41551c8e7b744","MangoPay\/FundsType.php":"654614749967108aa6daa8de0da2aaf6","MangoPay\/FilterRefunds.php":"c1535dbad874891bfb11e2dbcc378e98","MangoPay\/BankAccountDetailsGB.php":"c0e4a74c4986ff8449b01a548244f5d6","MangoPay\/BankAccount.php":"6dd3b9c12f927b1ce0e88923a025f492","MangoPay\/PayInPaymentDetailsApplePay.php":"369f6e45949dbd7fd96b9b654d006cc0","MangoPay\/PayInPaymentDetailsSatispay.php":"38120857a1fa659e685ac027aea2a4d2","MangoPay\/UserNatural.php":"d9d0624f7afb2ea01c099227d6e98beb","MangoPay\/FilterTransactions.php":"1d037bc826a84722e155fdc90692459f","MangoPay\/BankAccountDetailsIBAN.php":"6f302319b7f4bb7e81b46d053b0cff10","MangoPay\/CardRegistrationStatus.php":"742888ac5d0a61afa66bfbd9048f6563","MangoPay\/Repudiation.php":"4d567f84b9318f19e4f7af5aeed7ba9e","MangoPay\/CountryAuthorizationData.php":"5831f0876cbcbb0d2b8368fcd4eef5e9","MangoPay\/PayInExecutionDetails.php":"9449109287d9db3c3c1934c40843e8db","MangoPay\/PayOutPaymentDetails.php":"81a35a67c6de892d0160569215c339b8","MangoPay\/ApiUboDeclarations.php":"bbe6c8b41adc65bc0786db2648f987e5","MangoPay\/Billing.php":"e11d6e554fade650207e9f1b9ddd33a8","MangoPay\/PayPalWebTracking.php":"69404331bf166bee338a77fc6ec3b81e","MangoPay\/FilterDisputes.php":"2915bc736f9a701548b97d85ce515bb9","MangoPay\/Mandate.php":"725dda053777283677a2ec6b2a88779a","MangoPay\/DisputeDocumentType.php":"2ae8191b36ef36cb6078028abafbb313","MangoPay\/ApiClients.php":"ac99854276006807768ddd394651c6b4","MangoPay\/LegalPersonType.php":"23671eeba43334ac6fdfc6870cb4f5c7","MangoPay\/CardPreAuthorizationStatus.php":"dbaf899616645b596c0f0c40cda487bf","MangoPay\/UboDeclaration.php":"b7fe4f22984ee613702546005ecad5b1","MangoPay\/Autoloader.php":"5c9ac088f7f992c76c7c0b629001eaf4","MangoPay\/EventType.php":"ed53d81c390cd2d705018e1005993bbf","MangoPay\/EMoney.php":"8460b068b3c7a6635d837a0b0c5ef414","MangoPay\/PayOutEligibilityResponse.php":"e9d36df4d11314822080d79c975c8bd9","MangoPay\/DeclaredUboStatus.php":"7822b5b22e20da01804196b236adef81","MangoPay\/PayInExecutionType.php":"e0feb88acf73627f4e2ab7ec7391f4ed","MangoPay\/PayInPaymentDetailsBankWire.php":"1c1b6698b0a0298fd7131973223df24b","MangoPay\/CardValidation.php":"1f97686066a2b9d5e7ee5f5eaca14396","MangoPay\/DisputeReason.php":"4b4a6fb68dc5b61c2565a87f9398d511","MangoPay\/Client.php":"bb1fa3e61cd56063f0b35f61652cc249","MangoPay\/PayInPaymentDetailsGiropay.php":"c180d47308a9041d425c2856338c92dd","MangoPay\/PayInPaymentDetailsBlik.php":"3ee2b5f65e5bfde161c69ad8baf1b5f8","MangoPay\/CancelDeposit.php":"63a4cd6ba00d009cd86404449cf5f3b5","MangoPay\/PayInPaymentDetailsCard.php":"0e96ec20e2215e53b32c74484bf51195","MangoPay\/PayOutEligibilityRequest.php":"06bd74bc9941c03aec3d66c62fd62021","MangoPay\/RecurringPayInCIT.php":"96b58ffd6f0a0c711d712e76402b34c2","MangoPay\/UboDeclarationRefusedReasonType.php":"b238aaa7400dc890a9640c60b255f227","tests\/Mocks\/MockStorageStrategy.php":"f8e1a1a5956ff891b01851621e034a6c","tests\/Cases\/RateLimitTest.php":"129472fa4e50404058a2bc7577d4a665","tests\/Cases\/CardPreAuthorizationsTest.php":"26a6e899e126b5ca24172b0398694dbc","tests\/Cases\/PayInsTest.php":"e0e55d551c5eb82aafc07d7e7b7abdbe","tests\/Cases\/WalletsTest.php":"79d8badbfe3a5144f152ba646ed42463","tests\/Cases\/EventsTest.php":"e3b6e2f9e108eb932b1cf409c6a52c2a","tests\/Cases\/TransfersTest.php":"21312ba55feb0e5be7cb607631a51c3a","tests\/Cases\/UsersTest.php":"1f2f8965536051da234f2c89e1fcf4c8","tests\/Cases\/ReportsTest.php":"cfe3c38e9a0d2494071c0979a6ae0be4","tests\/Cases\/RegulatoryTest.php":"2dc25d75013eda5f5922afa2d5ba671c","tests\/Cases\/KycDocumentsTest.php":"12f653c7e5cad23ff2d1a936b9f4ece8","tests\/Cases\/IdempotencyTest.php":"df94903a0bbd97fc15c33ce2950a5267","tests\/Cases\/PayOutsTest.php":"e3db81115a7f36862cf0e7c7511b3f61","tests\/Cases\/DepositTest.php":"d5dbc60f761283a508c1616e6cfc0508","tests\/Cases\/MandatesTest.php":"07f7ee8e40c876618decfe114ce5b74e","tests\/Cases\/CardRegistrationsTest.php":"bf212fa0cbfed9ff78babb0bc24f56ef","tests\/Cases\/ConversionsTest.php":"339926d76685b6e3a3989689bd1c4ea1","tests\/Cases\/BankAccountsTest.php":"6deab0b50fa61e54d747ab5538ea3014","tests\/Cases\/Constants.php":"f6e58873a03b5f02863e57411c4cd638","tests\/Cases\/UboDeclarationsTest.php":"0634a315ff5a1c4c3d4ead6de28f154f","tests\/Cases\/HooksTest.php":"a81aa42b18abb170adde6919db6f2621","tests\/Cases\/CardsTest.php":"e25f5ed34dad0b8541c52ce940d55265","tests\/Cases\/Base.php":"d0db664038da596e1b28dfa2a0e06674","tests\/Cases\/ConfigurationTest.php":"c184305eac6c7602b66172564219b300","tests\/Cases\/DisputesTest.php":"ac2b402bd072975b955463aa8412029b","tests\/Cases\/ErrorTests.php":"97f14579a7f9ddebc5899e475458cd79","tests\/Cases\/TokensTest.php":"f17c0817633983a79347b0c4774afea1","tests\/Cases\/BankingAliasTest.php":"49b4a44067fb5b838ad0821fc825e789","tests\/Cases\/RefundsTest.php":"96f896bc4f10d17c5dcbc59a67f1df80","tests\/Cases\/ClientTest.php":"ee475a64280fa5b0602dc5ef6b45da28"}} \ No newline at end of file From 596cca5362633e119c79bf735314ff3917369744 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Sat, 4 May 2024 15:17:55 +0600 Subject: [PATCH 23/37] update: property documentation for KYC Documentation --- MangoPay/KycDocument.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index da7dd020..a396d27d 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -8,9 +8,10 @@ class KycDocument extends Libraries\Document { /** - * The user ID who owns this document + * The type of the document for the user verification * @var string * @see \MangoPay\KycDocumentType + * @link https://mangopay.com/docs/endpoints/kyc-documents#kyc-document-object */ public $Type; @@ -34,14 +35,16 @@ class KycDocument extends Libraries\Document public $StatusLabel; /** - * The user Id + * The unique identifier of the user. * @var string */ public $UserId; /** - * More information regarding why the document has been rejected. + * The series of codes providing more precision regarding the reason why the identity proof document was refused. + * You can review the explanations for each code in the Flags list * @var array + * @see https://mangopay.com/docs/concepts/users/verification/document-process#flags-list */ public $Flags; } From cfe79c53ff409057c75812ea1771586b95a4ff08 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Sat, 4 May 2024 15:20:46 +0600 Subject: [PATCH 24/37] update: Kyc Document class --- MangoPay/KycDocument.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index a396d27d..5b1dc850 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -44,7 +44,8 @@ class KycDocument extends Libraries\Document * The series of codes providing more precision regarding the reason why the identity proof document was refused. * You can review the explanations for each code in the Flags list * @var array - * @see https://mangopay.com/docs/concepts/users/verification/document-process#flags-list + * @see \MangoPay\KycDocumentRefusedReasonType + * @link https://mangopay.com/docs/concepts/users/verification/document-process#flags-list */ public $Flags; } From d77e72bab3881906dfd44957f5efd920c6a47653 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 6 May 2024 14:11:28 +0600 Subject: [PATCH 25/37] remove: shell path from docker composer --- php_env/PHP_8.1/composer.sh | 2 -- php_env/PHP_8.2/composer.sh | 2 -- 2 files changed, 4 deletions(-) diff --git a/php_env/PHP_8.1/composer.sh b/php_env/PHP_8.1/composer.sh index a61aff80..6e0769f1 100644 --- a/php_env/PHP_8.1/composer.sh +++ b/php_env/PHP_8.1/composer.sh @@ -1,5 +1,3 @@ -#!/bin/sh - EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" diff --git a/php_env/PHP_8.2/composer.sh b/php_env/PHP_8.2/composer.sh index a61aff80..6e0769f1 100644 --- a/php_env/PHP_8.2/composer.sh +++ b/php_env/PHP_8.2/composer.sh @@ -1,5 +1,3 @@ -#!/bin/sh - EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" From 85d3080ed03c427c4689a755dc961d7052dad541 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 6 May 2024 17:18:48 +0600 Subject: [PATCH 26/37] fix: php cs fixer issue at KYC Document property alignment --- MangoPay/KycDocument.php | 47 ++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index 5b1dc850..5e8a0f1a 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -3,49 +3,58 @@ namespace MangoPay; /** - * KYC document entity + * KYC document entity. */ class KycDocument extends Libraries\Document { /** - * The type of the document for the user verification + * The type of the document for the user verification. + * * @var string - * @see \MangoPay\KycDocumentType - * @link https://mangopay.com/docs/endpoints/kyc-documents#kyc-document-object + * + * @see KycDocumentType + * @see https://mangopay.com/docs/endpoints/kyc-documents#kyc-document-object */ public $Type; - /** - * The label of KYC document type - * @var string - */ - public $TypeLabel; + /** + * The label of KYC document type. + * + * @var string + */ + public $TypeLabel; /** - * The status of the KYC document + * The status of the KYC document. + * * @var string - * @see \MangoPay\KycDocumentStatus + * + * @see KycDocumentStatus */ public $Status; - /** - * The label of KYC document status - * @var string - */ - public $StatusLabel; + /** + * The label of KYC document status. + * + * @var string + */ + public $StatusLabel; /** * The unique identifier of the user. + * * @var string */ public $UserId; /** * The series of codes providing more precision regarding the reason why the identity proof document was refused. - * You can review the explanations for each code in the Flags list + * You can review the explanations for each code in the Flags list. + * * @var array - * @see \MangoPay\KycDocumentRefusedReasonType - * @link https://mangopay.com/docs/concepts/users/verification/document-process#flags-list + * + * @see KycDocumentRefusedReasonType + * @see https://mangopay.com/docs/concepts/users/verification/document-process#flags-list */ public $Flags; } From 6dc14eadb3539bf9f1dae49ac20d3fda8bd7d437 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:03:51 +0600 Subject: [PATCH 27/37] rollback: `see` params for `$Type` in the `KycDocument` --- MangoPay/KycDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index 5e8a0f1a..264f59e8 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -12,7 +12,7 @@ class KycDocument extends Libraries\Document * * @var string * - * @see KycDocumentType + * @see \MangoPay\KycDocumentType * @see https://mangopay.com/docs/endpoints/kyc-documents#kyc-document-object */ public $Type; From 0149fb73e0f1c207bbb705d05e5f6fffbad552f7 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:06:50 +0600 Subject: [PATCH 28/37] refactor: indentation is wrong in `PayOut.php` --- MangoPay/PayOut.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index a16031ea..76559217 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -7,18 +7,20 @@ */ class PayOut extends Transaction { - /** - * The unique identifier of the bank account. - * @var string - */ - public $BankAccountId; + /** + * The unique identifier of the bank account. + * + * @var string + */ + public $BankAccountId; - /** - * Custom description to appear on the user’s bank statement along with the platform name. - * The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. - * @var string - */ - public $BankWireRef; + /** + * Custom description to appear on the user’s bank statement along with the platform name. + * The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. + * + * @var string + */ + public $BankWireRef; /** * Debited wallet Id From f2056677fd1f5cd777c2ced7fe63e11bffb1c486 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:12:47 +0600 Subject: [PATCH 29/37] refactor: indentation is wrong in `PayOut.php` --- MangoPay/PayOut.php | 1 - 1 file changed, 1 deletion(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index 76559217..07c49ae5 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -17,7 +17,6 @@ class PayOut extends Transaction /** * Custom description to appear on the user’s bank statement along with the platform name. * The recommended length is 12 characters – strings longer than this may be truncated depending on the bank. - * * @var string */ public $BankWireRef; From 275dfdad699ce69d4f19c863c2d03cff5aafc4cf Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:17:35 +0600 Subject: [PATCH 30/37] refactor: Change the `@var` type to `object` because of there is many different types --- MangoPay/PayOut.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index 07c49ae5..23b6aa0f 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -41,7 +41,7 @@ class PayOut extends Transaction /** * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var PayOutPaymentDetailsBankWire + * @var object */ public $MeanOfPaymentDetails; From 87f0929be371e7d7fe1a6ad76366515b1f2c2e8d Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:19:43 +0600 Subject: [PATCH 31/37] remove: `composer.sh` for php `8.1` and `8.2` --- php_env/PHP_8.1/composer.sh | 15 --------------- php_env/PHP_8.2/composer.sh | 15 --------------- 2 files changed, 30 deletions(-) delete mode 100644 php_env/PHP_8.1/composer.sh delete mode 100644 php_env/PHP_8.2/composer.sh diff --git a/php_env/PHP_8.1/composer.sh b/php_env/PHP_8.1/composer.sh deleted file mode 100644 index 6e0769f1..00000000 --- a/php_env/PHP_8.1/composer.sh +++ /dev/null @@ -1,15 +0,0 @@ -EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" -php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" -ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" - -if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] -then - >&2 echo 'ERROR: Invalid installer checksum' - rm composer-setup.php - exit 1 -fi - -php composer-setup.php --quiet -RESULT=$? -rm composer-setup.php -exit $RESULT diff --git a/php_env/PHP_8.2/composer.sh b/php_env/PHP_8.2/composer.sh deleted file mode 100644 index 6e0769f1..00000000 --- a/php_env/PHP_8.2/composer.sh +++ /dev/null @@ -1,15 +0,0 @@ -EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" -php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" -ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" - -if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] -then - >&2 echo 'ERROR: Invalid installer checksum' - rm composer-setup.php - exit 1 -fi - -php composer-setup.php --quiet -RESULT=$? -rm composer-setup.php -exit $RESULT From ed80f9f71a74bbe55d61855de6379c26c28ebe41 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:28:39 +0600 Subject: [PATCH 32/37] fix: line indents for `PayOut.php` --- MangoPay/PayOut.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index 23b6aa0f..a3d6c877 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -33,11 +33,11 @@ class PayOut extends Transaction */ public $PaymentType; - /** - * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var PayOutPaymentDetailsBankWire - */ - public $PayoutPaymentDetails; + /** + * One of PayOutPaymentDetails implementations, depending on $PaymentType + * @var PayOutPaymentDetailsBankWire + */ + public $PayoutPaymentDetails; /** * One of PayOutPaymentDetails implementations, depending on $PaymentType @@ -45,12 +45,12 @@ class PayOut extends Transaction */ public $MeanOfPaymentDetails; - /** - * Payout mode requested, default is 'STANDARD', Allowed values are - * 'STANDARD', 'INSTANT_PAYMENT', 'INSTANT_PAYMENT_ONLY' - * @var string - */ - public $PayoutModeRequested; + /** + * Payout mode requested, default is 'STANDARD', Allowed values are + * 'STANDARD', 'INSTANT_PAYMENT', 'INSTANT_PAYMENT_ONLY' + * @var string + */ + public $PayoutModeRequested; /** * Get array with mapping which property depends on other property From 6b9f10f886fd420be1662d311ce6cb376a353816 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:34:10 +0600 Subject: [PATCH 33/37] update: added docker config for `php 8.1` and `php 8.2` to `Makefile` --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Makefile b/Makefile index fa8f28da..277574a9 100644 --- a/Makefile +++ b/Makefile @@ -36,3 +36,21 @@ docker-test-php-80: ## Test on PHP 8.0 --user $(shell id -u):$(shell id -g) \ php-test-env:8.0 \ /bin/bash -c "composer update -no --no-progress --no-suggest --ignore-platform-reqs && vendor/bin/phpunit tests" + +.PHONY: docker-test-php-81 +docker-test-php-81: ## Test on PHP 8.1 + docker build -t php-test-env:8.1 php_env/PHP_8.1 + docker run -it -v "${PWD}":/usr/src/mangopay2-php-sdk \ + -w /usr/src/mangopay2-php-sdk \ + --user $(shell id -u):$(shell id -g) \ + php-test-env:8.1 \ + /bin/bash -c "composer update -no --no-progress --no-suggest --ignore-platform-reqs && vendor/bin/phpunit tests" + +.PHONY: docker-test-php-82 +docker-test-php-82: ## Test on PHP 8.2 + docker build -t php-test-env:8.2 php_env/PHP_8.2 + docker run -it -v "${PWD}":/usr/src/mangopay2-php-sdk \ + -w /usr/src/mangopay2-php-sdk \ + --user $(shell id -u):$(shell id -g) \ + php-test-env:8.2 \ + /bin/bash -c "composer update -no --no-progress --no-suggest --ignore-platform-reqs && vendor/bin/phpunit tests" From f5303e0985c10274494f6d62c06b4cffc3e5e38b Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:37:22 +0600 Subject: [PATCH 34/37] update: added php versions for `php 8.1` and `php 8.2` to `build.yaml` --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1738b386..79e38204 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["7.3", "7.4", "8.0"] + php-version: ["7.3", "7.4", "8.0", "8.1", "8.2"] os: [ubuntu-latest] experimental: [false] composer-options: [''] From 3f3e1351d870666dfd077330b07e0a4517aafcbe Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:27:56 +0600 Subject: [PATCH 35/37] refactor: property type for `PayOut.php` --- MangoPay/PayOut.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MangoPay/PayOut.php b/MangoPay/PayOut.php index a3d6c877..a8cc28f7 100644 --- a/MangoPay/PayOut.php +++ b/MangoPay/PayOut.php @@ -35,7 +35,7 @@ class PayOut extends Transaction /** * One of PayOutPaymentDetails implementations, depending on $PaymentType - * @var PayOutPaymentDetailsBankWire + * @var object */ public $PayoutPaymentDetails; From 91ca58a5fc2c2ff46ffba9d134055f80f185ebd2 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:29:35 +0600 Subject: [PATCH 36/37] refactor: property type for `PayOut.php` (phpstan) --- MangoPay/KycDocument.php | 1 + 1 file changed, 1 insertion(+) diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index 264f59e8..333f32b7 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -30,6 +30,7 @@ class KycDocument extends Libraries\Document * @var string * * @see KycDocumentStatus + * @phpstan-var \MangoPay\KycDocumentStatus::* */ public $Status; From 586b770ec40b7695dbaa8da5d5caca2380c66701 Mon Sep 17 00:00:00 2001 From: Al Amin Ahamed <34349365+mralaminahamed@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:33:02 +0600 Subject: [PATCH 37/37] refactor: property type for `PayOut.php` (phpstan) --- MangoPay/KycDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MangoPay/KycDocument.php b/MangoPay/KycDocument.php index 333f32b7..1970c81b 100644 --- a/MangoPay/KycDocument.php +++ b/MangoPay/KycDocument.php @@ -21,6 +21,7 @@ class KycDocument extends Libraries\Document * The label of KYC document type. * * @var string + * @phpstan-var \MangoPay\KycDocumentStatus::* */ public $TypeLabel; @@ -30,7 +31,6 @@ class KycDocument extends Libraries\Document * @var string * * @see KycDocumentStatus - * @phpstan-var \MangoPay\KycDocumentStatus::* */ public $Status;