From 05409104edd0c95199b918532e078a9101f7d3de Mon Sep 17 00:00:00 2001 From: Nabil Berhouche Date: Wed, 2 Dec 2020 13:14:27 +0100 Subject: [PATCH] [BOT] Migrate release 1.12.0 to GitHub. --- CHANGELOG.md | 13 + .../Payzen/Block/Adminhtml/Redirect.php | 2 +- .../System/Config/Field/CustgroupOptions.php | 2 +- .../Config/Field/Fullcb/PaymentOptions.php | 4 +- .../Adminhtml/System/Config/Field/Label.php | 1 - .../Config/Field/Multi/PaymentOptions.php | 14 +- .../System/Config/Field/NotifyUrl.php | 2 +- .../Config/Field/Oney3x4x/PaymentOptions.php | 10 +- .../System/Config/Field/ShipOptions.php | 2 +- .../Field/Standard/RestPlaceholders.php | 2 +- .../System/Config/Fieldset/Payment.php | 2 +- .../Payzen/Block/Customer/Index.php | 63 ++ .../Payzen/Block/Customer/Link.php | 0 .../Payzen/Block/Oneclick/Cart.php | 2 +- .../Payzen/Block/Oneclick/Product.php | 2 +- .../Lyranetwork/Payzen/Block/Rest/Head.php | 5 +- .../Lyranetwork/Payzen/Block/Review.php | 2 +- .../Lyranetwork/Payzen/Block/Standard.php | 2 +- .../Lyranetwork/Payzen/Helper/Data.php | 30 +- .../Lyranetwork/Payzen/Helper/Payment.php | 182 ++-- .../Lyranetwork/Payzen/Helper/Rest.php | 121 ++- .../Lyranetwork/Payzen/Helper/Util.php | 2 +- .../Api/Ws/AuthenticationRequestData.php | 153 ---- .../Model/Api/Ws/AuthenticationResultData.php | 222 ----- .../Model/Api/Ws/AuthorizationResponse.php | 188 ---- .../Model/Api/Ws/BillingDetailsRequest.php | 452 ---------- .../Model/Api/Ws/BillingDetailsResponse.php | 406 --------- .../Model/Api/Ws/CancelCapturedPayment.php | 61 -- .../Api/Ws/CancelCapturedPaymentResponse.php | 38 - .../Api/Ws/CancelCapturedPaymentResult.php | 38 - .../Payzen/Model/Api/Ws/CancelPayment.php | 61 -- .../Model/Api/Ws/CancelPaymentResponse.php | 38 - .../Model/Api/Ws/CancelPaymentResult.php | 38 - .../Payzen/Model/Api/Ws/CancelRefund.php | 61 -- .../Model/Api/Ws/CancelRefundResponse.php | 38 - .../Model/Api/Ws/CancelRefundResult.php | 38 - .../Model/Api/Ws/CancelSubscription.php | 61 -- .../Api/Ws/CancelSubscriptionResponse.php | 38 - .../Model/Api/Ws/CancelSubscriptionResult.php | 38 - .../Payzen/Model/Api/Ws/CancelToken.php | 61 -- .../Model/Api/Ws/CancelTokenResponse.php | 38 - .../Payzen/Model/Api/Ws/CancelTokenResult.php | 38 - .../Payzen/Model/Api/Ws/CapturePayment.php | 38 - .../Model/Api/Ws/CapturePaymentResponse.php | 38 - .../Model/Api/Ws/CapturePaymentResult.php | 38 - .../Payzen/Model/Api/Ws/CaptureResponse.php | 165 ---- .../Payzen/Model/Api/Ws/CardRequest.php | 280 ------ .../Payzen/Model/Api/Ws/CardResponse.php | 291 ------- .../Payzen/Model/Api/Ws/CartItemInfo.php | 176 ---- .../Api/Ws/CheckThreeDSAuthentication.php | 61 -- .../Ws/CheckThreeDSAuthenticationResponse.php | 38 - .../Ws/CheckThreeDSAuthenticationResult.php | 61 -- .../Payzen/Model/Api/Ws/CommonRequest.php | 119 --- .../Payzen/Model/Api/Ws/CommonResponse.php | 211 ----- .../Payzen/Model/Api/Ws/CreatePayment.php | 222 ----- .../Model/Api/Ws/CreatePaymentResponse.php | 38 - .../Model/Api/Ws/CreatePaymentResult.php | 314 ------- .../Model/Api/Ws/CreateSubscription.php | 107 --- .../Api/Ws/CreateSubscriptionResponse.php | 38 - .../Model/Api/Ws/CreateSubscriptionResult.php | 314 ------- .../Payzen/Model/Api/Ws/CreateToken.php | 107 --- .../Payzen/Model/Api/Ws/CreateTokenByIban.php | 84 -- .../Api/Ws/CreateTokenByIbanResponse.php | 38 - .../Model/Api/Ws/CreateTokenByIbanResult.php | 314 ------- .../Api/Ws/CreateTokenFromTransaction.php | 84 -- .../Ws/CreateTokenFromTransactionResponse.php | 38 - .../Ws/CreateTokenFromTransactionResult.php | 314 ------- .../Model/Api/Ws/CreateTokenResponse.php | 38 - .../Payzen/Model/Api/Ws/CreateTokenResult.php | 314 ------- .../Payzen/Model/Api/Ws/CustStatus.php | 18 - .../Payzen/Model/Api/Ws/CustomerRequest.php | 84 -- .../Payzen/Model/Api/Ws/CustomerResponse.php | 84 -- .../Payzen/Model/Api/Ws/DeliverySpeed.php | 19 - .../Payzen/Model/Api/Ws/DeliveryType.php | 21 - .../Payzen/Model/Api/Ws/DuplicatePayment.php | 107 --- .../Model/Api/Ws/DuplicatePaymentResponse.php | 38 - .../Model/Api/Ws/DuplicatePaymentResult.php | 268 ------ .../Payzen/Model/Api/Ws/ExtInfo.php | 61 -- .../Model/Api/Ws/ExtendedResponseRequest.php | 84 -- .../Model/Api/Ws/ExtraDetailsRequest.php | 61 -- .../Model/Api/Ws/ExtraDetailsResponse.php | 38 - .../Payzen/Model/Api/Ws/ExtraResponse.php | 84 -- .../Payzen/Model/Api/Ws/FindPayments.php | 38 - .../Model/Api/Ws/FindPaymentsResponse.php | 38 - .../Model/Api/Ws/FindPaymentsResult.php | 84 -- .../Model/Api/Ws/FraudManagementResponse.php | 84 -- .../Payzen/Model/Api/Ws/GetPaymentDetails.php | 61 -- .../Api/Ws/GetPaymentDetailsResponse.php | 38 - .../Model/Api/Ws/GetPaymentDetailsResult.php | 314 ------- .../Payzen/Model/Api/Ws/GetPaymentUuid.php | 38 - .../Model/Api/Ws/GetPaymentUuidResponse.php | 38 - .../Model/Api/Ws/GetSubscriptionDetails.php | 38 - .../Api/Ws/GetSubscriptionDetailsResponse.php | 38 - .../Api/Ws/GetSubscriptionDetailsResult.php | 314 ------- .../Payzen/Model/Api/Ws/GetTokenDetails.php | 38 - .../Model/Api/Ws/GetTokenDetailsResponse.php | 38 - .../Model/Api/Ws/GetTokenDetailsResult.php | 314 ------- .../Payzen/Model/Api/Ws/IbanRequest.php | 107 --- .../Api/Ws/LegacyTransactionKeyRequest.php | 96 --- .../Api/Ws/LegacyTransactionKeyResult.php | 61 -- .../Payzen/Model/Api/Ws/MarkResponse.php | 142 --- .../Model/Api/Ws/MpiExtensionRequest.php | 38 - .../Payzen/Model/Api/Ws/OrderRequest.php | 61 -- .../Payzen/Model/Api/Ws/OrderResponse.php | 61 -- .../Payzen/Model/Api/Ws/PaymentRequest.php | 303 ------- .../Payzen/Model/Api/Ws/PaymentResponse.php | 499 ----------- .../Payzen/Model/Api/Ws/PaymentType.php | 21 - .../Payzen/Model/Api/Ws/ProductType.php | 32 - .../Payzen/Model/Api/Ws/QueryRequest.php | 107 --- .../Payzen/Model/Api/Ws/ReactivateToken.php | 38 - .../Model/Api/Ws/ReactivateTokenResponse.php | 38 - .../Model/Api/Ws/ReactivateTokenResult.php | 38 - .../Payzen/Model/Api/Ws/RefundPayment.php | 84 -- .../Model/Api/Ws/RefundPaymentResponse.php | 38 - .../Model/Api/Ws/RefundPaymentResult.php | 268 ------ .../Payzen/Model/Api/Ws/ResultWrapper.php | 214 ----- .../Payzen/Model/Api/Ws/RiskAnalysis.php | 153 ---- .../Api/Ws/RiskAnalysisProcessingStatus.php | 23 - .../Payzen/Model/Api/Ws/RiskAssessments.php | 38 - .../Payzen/Model/Api/Ws/RiskControl.php | 61 -- .../Payzen/Model/Api/Ws/SettlementRequest.php | 96 --- .../Model/Api/Ws/ShippingDetailsRequest.php | 406 --------- .../Model/Api/Ws/ShippingDetailsResponse.php | 406 --------- .../Model/Api/Ws/ShoppingCartRequest.php | 107 --- .../Model/Api/Ws/ShoppingCartResponse.php | 38 - .../Model/Api/Ws/SubscriptionRequest.php | 211 ----- .../Model/Api/Ws/SubscriptionResponse.php | 292 ------- .../Payzen/Model/Api/Ws/TechRequest.php | 84 -- .../Payzen/Model/Api/Ws/ThreeDSMode.php | 20 - .../Payzen/Model/Api/Ws/ThreeDSRequest.php | 268 ------ .../Payzen/Model/Api/Ws/ThreeDSResponse.php | 61 -- .../Payzen/Model/Api/Ws/TokenRequest.php | 38 - .../Payzen/Model/Api/Ws/TokenResponse.php | 85 -- .../Payzen/Model/Api/Ws/TransactionItem.php | 142 --- .../Payzen/Model/Api/Ws/UpdatePayment.php | 84 -- .../Model/Api/Ws/UpdatePaymentDetails.php | 61 -- .../Api/Ws/UpdatePaymentDetailsResponse.php | 38 - .../Api/Ws/UpdatePaymentDetailsResult.php | 314 ------- .../Model/Api/Ws/UpdatePaymentResponse.php | 38 - .../Model/Api/Ws/UpdatePaymentResult.php | 291 ------- .../Payzen/Model/Api/Ws/UpdateRefund.php | 84 -- .../Model/Api/Ws/UpdateRefundResponse.php | 38 - .../Model/Api/Ws/UpdateRefundResult.php | 291 ------- .../Model/Api/Ws/UpdateSubscription.php | 84 -- .../Api/Ws/UpdateSubscriptionResponse.php | 38 - .../Model/Api/Ws/UpdateSubscriptionResult.php | 291 ------- .../Payzen/Model/Api/Ws/UpdateToken.php | 130 --- .../Model/Api/Ws/UpdateTokenResponse.php | 38 - .../Payzen/Model/Api/Ws/UpdateTokenResult.php | 291 ------- .../Payzen/Model/Api/Ws/ValidatePayment.php | 61 -- .../Model/Api/Ws/ValidatePaymentResponse.php | 38 - .../Model/Api/Ws/ValidatePaymentResult.php | 38 - .../Model/Api/Ws/VerifyThreeDSEnrollment.php | 130 --- .../Ws/VerifyThreeDSEnrollmentResponse.php | 38 - .../Api/Ws/VerifyThreeDSEnrollmentResult.php | 61 -- .../Lyranetwork/Payzen/Model/Api/Ws/WsApi.php | 575 ------------- .../Payzen/Model/Api/Ws/WsApiClassLoader.php | 55 -- .../Payzen/Model/Api/Ws/WsResponse.php | 38 - .../Lyranetwork/Payzen/Model/Field/Array.php | 30 + .../Model/Field/Choozeo/PaymentOptions.php | 7 +- .../Model/Field/Fullcb/PaymentOptions.php | 19 +- .../Model/Field/Multi/PaymentOptions.php | 23 +- .../Model/Field/Oney3x4x/PaymentOptions.php | 19 +- .../Payzen/Model/Field/Other/PaymentMeans.php | 36 +- .../Model/Field/Standard/CardInfoModes.php | 7 +- .../Lyranetwork/Payzen/Model/Observer.php | 7 +- .../Payzen/Model/Payment/Abstract.php | 811 ++++++++---------- .../Payzen/Model/Payment/Multi.php | 2 +- .../Payzen/Model/Payment/Standard.php | 309 +------ .../Payzen/Model/Source/Gift/GiftCards.php | 2 +- .../Model/Source/Multi/PaymentCards.php | 2 +- .../Payzen/Model/Source/PaymentCards.php | 2 +- .../Model/Source/Standard/CardInfoModes.php | 7 +- .../Lyranetwork/Payzen/Model/WsException.php | 14 - .../Adminhtml/Payzen/PaymentController.php | 2 +- .../Payzen/controllers/CustomerController.php | 52 ++ .../Payzen/controllers/PaymentController.php | 2 +- .../Lyranetwork/Payzen/etc/config.xml | 22 +- .../Lyranetwork/Payzen/etc/system.xml | 281 +++--- .../community/Lyranetwork/Payzen/etc/ws.ini | 9 - .../sql/payzen_setup/mysql4-install-1.6.0.php | 2 +- .../mysql4-upgrade-1.8.0-1.9.0.php | 2 +- .../frontend/base/default/layout/payzen.xml | 33 +- .../payzen/customer/payment_means.phtml | 69 ++ .../default/template/payzen/rest/head.phtml | 9 +- .../default/template/payzen/rest/review.phtml | 46 +- .../default/template/payzen/standard.phtml | 31 +- .../template/payzen/standard_rest.phtml | 69 +- app/locale/de_DE/Lyranetwork_Payzen.csv | 45 +- app/locale/en_US/Lyranetwork_Payzen.csv | 44 +- app/locale/es_ES/Lyranetwork_Payzen.csv | 46 +- app/locale/fr_FR/Lyranetwork_Payzen.csv | 43 +- skin/frontend/base/default/css/payzen.css | 4 + 193 files changed, 1365 insertions(+), 17594 deletions(-) create mode 100644 app/code/community/Lyranetwork/Payzen/Block/Customer/Index.php create mode 100644 app/code/community/Lyranetwork/Payzen/Block/Customer/Link.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthenticationRequestData.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthenticationResultData.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthorizationResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/BillingDetailsRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/BillingDetailsResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPayment.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPaymentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPaymentResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPayment.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPaymentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPaymentResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefund.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefundResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefundResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscription.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscriptionResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscriptionResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelToken.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelTokenResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelTokenResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePayment.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePaymentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePaymentResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CaptureResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CardRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CardResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CartItemInfo.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthentication.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthenticationResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthenticationResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CommonRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CommonResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePayment.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePaymentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePaymentResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscription.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscriptionResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscriptionResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateToken.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIban.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIbanResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIbanResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransaction.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransactionResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransactionResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CustStatus.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CustomerRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CustomerResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DeliverySpeed.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DeliveryType.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DuplicatePayment.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DuplicatePaymentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DuplicatePaymentResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtInfo.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtendedResponseRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraDetailsRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraDetailsResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPayments.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPaymentsResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPaymentsResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FraudManagementResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetails.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetailsResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetailsResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentUuid.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentUuidResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetails.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetailsResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetailsResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetails.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetailsResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetailsResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/IbanRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/LegacyTransactionKeyRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/LegacyTransactionKeyResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/MarkResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/MpiExtensionRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/OrderRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/OrderResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentType.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ProductType.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/QueryRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateToken.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateTokenResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateTokenResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPayment.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPaymentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPaymentResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ResultWrapper.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskAnalysis.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskAnalysisProcessingStatus.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskAssessments.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskControl.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SettlementRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShippingDetailsRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShippingDetailsResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShoppingCartRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShoppingCartResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SubscriptionRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SubscriptionResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TechRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ThreeDSMode.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ThreeDSRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ThreeDSResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TokenRequest.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TokenResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TransactionItem.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePayment.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetails.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetailsResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetailsResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefund.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefundResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefundResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscription.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscriptionResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscriptionResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateToken.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateTokenResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateTokenResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePayment.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePaymentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePaymentResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollment.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollmentResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollmentResult.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/WsApi.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/WsApiClassLoader.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/Api/Ws/WsResponse.php delete mode 100644 app/code/community/Lyranetwork/Payzen/Model/WsException.php create mode 100644 app/code/community/Lyranetwork/Payzen/controllers/CustomerController.php delete mode 100644 app/code/community/Lyranetwork/Payzen/etc/ws.ini create mode 100644 app/design/frontend/base/default/template/payzen/customer/payment_means.phtml diff --git a/CHANGELOG.md b/CHANGELOG.md index 26f46dff..d2687ff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +1.12.0, 2020-12-02: +- Reorganize backend (REST API keys moved to general configuration section). +- Do payment from backend by redirection in all cases. +- Refund payment using REST API. +- Payment validation using REST API. +- Accept and deny payment using REST API. +- [embedded] Possibility to display embedded payment fields in a popin. +- Do not use vads_order_info* gateway parameter. +- [alias] Display the brand of the registered means of payment in payment by alias. +- [alias] Check registred alias Validity before proposing it for payment. +- [alias] Added possibility to delete registered payment means. + 1.11.4, 2020-11-06: - [embedded] Bug fix: Force redirection when there is an error in payment form token creation. - [embedded] Bug fix: Display 3DS results for REST API payments. @@ -22,6 +34,7 @@ 1.11.1, 2020-04-29: - [embedded] Bugfix: Payment fields error relative to new JavaScript client library. - [embedded] Disable 1-Click payment buttons when using payment with embedded fields. +- [sofort] Bug fix: do not cancel order on buyer return if transaction status is NOT_CREATED. - Improve some plugin translations. 1.11.0, 2020-03-04: diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/Redirect.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/Redirect.php index cd6f60e3..27a515ed 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/Redirect.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/Redirect.php @@ -11,7 +11,7 @@ class Lyranetwork_Payzen_Block_Adminhtml_Redirect extends Lyranetwork_Payzen_Block_Redirect { /** - * Get checkout session namespace + * Get checkout session namespace. * * @return Mage_Adminhtml_Model_Session_Quote */ diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/CustgroupOptions.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/CustgroupOptions.php index 8c86c95b..6062b43d 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/CustgroupOptions.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/CustgroupOptions.php @@ -51,7 +51,7 @@ public function __construct() /** * Obtain existing data from form element. * - * Each row will be instance of Varien_Object + * Each row will be instance of Varien_Object. * * @return array */ diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Fullcb/PaymentOptions.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Fullcb/PaymentOptions.php index 6c0d0bb4..628b3d79 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Fullcb/PaymentOptions.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Fullcb/PaymentOptions.php @@ -45,7 +45,7 @@ public function __construct() 'rate', array( 'label' => Mage::helper('payzen')->__('Rate'), - 'style' => 'width: 100px;', + 'style' => 'width: 100px;' ) ); @@ -53,7 +53,7 @@ public function __construct() 'cap', array( 'label' => Mage::helper('payzen')->__('Cap'), - 'style' => 'width: 100px;', + 'style' => 'width: 100px;' ) ); diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Label.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Label.php index bb0e47b5..2af0bc74 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Label.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Label.php @@ -13,7 +13,6 @@ */ class Lyranetwork_Payzen_Block_Adminhtml_System_Config_Field_Label extends Mage_Adminhtml_Block_System_Config_Form_Field { - /** * Unset some non-related element parameters. * diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Multi/PaymentOptions.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Multi/PaymentOptions.php index a49180d0..d734959e 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Multi/PaymentOptions.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Multi/PaymentOptions.php @@ -20,21 +20,21 @@ public function __construct() 'label', array( 'label' => Mage::helper('payzen')->__('Label'), - 'style' => 'width: 150px;', + 'style' => 'width: 150px;' ) ); $this->addColumn( 'minimum', array( 'label' => Mage::helper('payzen')->__('Min. amount'), - 'style' => 'width: 80px;', + 'style' => 'width: 80px;' ) ); $this->addColumn( 'maximum', array( 'label' => Mage::helper('payzen')->__('Max. amount'), - 'style' => 'width: 80px;', + 'style' => 'width: 80px;' ) ); @@ -45,7 +45,7 @@ public function __construct() 'contract', array( 'label' => Mage::helper('payzen')->__('Contract'), - 'style' => 'width: 65px;', + 'style' => 'width: 65px;' ) ); } @@ -54,21 +54,21 @@ public function __construct() 'count', array( 'label' => Mage::helper('payzen')->__('Count'), - 'style' => 'width: 65px;', + 'style' => 'width: 65px;' ) ); $this->addColumn( 'period', array( 'label' => Mage::helper('payzen')->__('Period'), - 'style' => 'width: 65px;', + 'style' => 'width: 65px;' ) ); $this->addColumn( 'first', array( 'label' => Mage::helper('payzen')->__('1st installment'), - 'style' => 'width: 70px;', + 'style' => 'width: 70px;' ) ); diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/NotifyUrl.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/NotifyUrl.php index f3eda4f3..154742e5 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/NotifyUrl.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/NotifyUrl.php @@ -38,7 +38,7 @@ public function render(Varien_Data_Form_Element_Abstract $element) protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { - $html = ''; + $html = ''; $html .= $element->getElementHtml(); return $html; diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Oney3x4x/PaymentOptions.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Oney3x4x/PaymentOptions.php index 476cd49b..0522c6a7 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Oney3x4x/PaymentOptions.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Oney3x4x/PaymentOptions.php @@ -20,7 +20,7 @@ public function __construct() 'label', array( 'label' => Mage::helper('payzen')->__('Label'), - 'style' => 'width: 150px;', + 'style' => 'width: 150px;' ) ); $this->addColumn( @@ -34,28 +34,28 @@ public function __construct() 'minimum', array( 'label' => Mage::helper('payzen')->__('Min. amount'), - 'style' => 'width: 80px;', + 'style' => 'width: 80px;' ) ); $this->addColumn( 'maximum', array( 'label' => Mage::helper('payzen')->__('Max. amount'), - 'style' => 'width: 80px;', + 'style' => 'width: 80px;' ) ); $this->addColumn( 'count', array( 'label' => Mage::helper('payzen')->__('Count'), - 'style' => 'width: 65px;', + 'style' => 'width: 65px;' ) ); $this->addColumn( 'rate', array( 'label' => Mage::helper('payzen')->__('Rate'), - 'style' => 'width: 65px;', + 'style' => 'width: 65px;' ) ); diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/ShipOptions.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/ShipOptions.php index 2cd40332..b4889709 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/ShipOptions.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/ShipOptions.php @@ -92,7 +92,7 @@ public function __construct() /** * Obtain existing data from form element. * - * Each row will be instance of Varien_Object + * Each row will be instance of Varien_Object. * * @return array */ diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Standard/RestPlaceholders.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Standard/RestPlaceholders.php index f9ffe86f..7512bdbc 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Standard/RestPlaceholders.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/Standard/RestPlaceholders.php @@ -55,7 +55,7 @@ public function getArrayRows() $options = array( 'pan' => Mage::helper('payzen')->__('Card Number'), 'expiry' => Mage::helper('payzen')->__('Expiration Date'), - 'cvv' => Mage::helper('payzen')->__('CVV'), + 'cvv' => Mage::helper('payzen')->__('CVV') ); $savedOptions = $this->getElement()->getValue(); diff --git a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Fieldset/Payment.php b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Fieldset/Payment.php index 0d1f8581..8933acff 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Fieldset/Payment.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Fieldset/Payment.php @@ -15,7 +15,7 @@ class Lyranetwork_Payzen_Block_Adminhtml_System_Config_Fieldset_Payment extends Mage_Adminhtml_Block_System_Config_Form_Fieldset { /** - * Render fieldset html + * Render fieldset html. * * @param Varien_Data_Form_Element_Abstract $element * @return string diff --git a/app/code/community/Lyranetwork/Payzen/Block/Customer/Index.php b/app/code/community/Lyranetwork/Payzen/Block/Customer/Index.php new file mode 100644 index 00000000..b1d4febe --- /dev/null +++ b/app/code/community/Lyranetwork/Payzen/Block/Customer/Index.php @@ -0,0 +1,63 @@ +getCustomer(); + if (! $customer || ! $session->isLoggedIn()) { + return $means; + } + + $aliasIds = array( + 'payzen_identifier' => 'payzen_masked_card', + 'payzen_sepa_identifier' => 'payzen_sepa_iban' + ); + + foreach ($aliasIds as $aliasId => $maskedId) { + // Check if there is a saved alias. + if (! Mage::helper('payzen/payment')->getCustomerAttribute($customer, $aliasId)) { + continue; + } + + $card = array(); + $card['alias'] = $aliasId; + $card['pm'] = $maskedId; + + $maskedPan = Mage::helper('payzen/payment')->getCustomerAttribute($customer,$maskedId); + $pos = strpos($maskedPan, '|'); + + if ($pos !== false) { + $card['brand'] = substr($maskedPan, 0, $pos); + $card['number'] = substr($maskedPan, $pos + 1); + } else { + $card['brand'] = ''; + $card['number'] = $maskedPan; + } + + $means[] = $card; + } + + return $means; + } + + public function getCcTypeImageSrc($card) + { + return Mage::getBlockSingleton('payzen/standard')->getCcTypeImageSrc($card); + } +} + diff --git a/app/code/community/Lyranetwork/Payzen/Block/Customer/Link.php b/app/code/community/Lyranetwork/Payzen/Block/Customer/Link.php new file mode 100644 index 00000000..e69de29b diff --git a/app/code/community/Lyranetwork/Payzen/Block/Oneclick/Cart.php b/app/code/community/Lyranetwork/Payzen/Block/Oneclick/Cart.php index 7fdc4052..ba14454f 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Oneclick/Cart.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Oneclick/Cart.php @@ -14,7 +14,7 @@ public function isOneclickAvailable() { $model = Mage::getModel('payzen/payment_standard'); - // 1-Click is not available in current context + // 1-Click is not available in current context. $configContext = $model->getConfigData('one_click_location'); if ($configContext !== Lyranetwork_Payzen_Helper_Payment::ONECLICK_LOCATION_CART && $configContext !== Lyranetwork_Payzen_Helper_Payment::ONECLICK_LOCATION_BOTH diff --git a/app/code/community/Lyranetwork/Payzen/Block/Oneclick/Product.php b/app/code/community/Lyranetwork/Payzen/Block/Oneclick/Product.php index e4f82308..3023bc99 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Oneclick/Product.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Oneclick/Product.php @@ -14,7 +14,7 @@ public function isOneclickAvailable() { $model = Mage::getModel('payzen/payment_standard'); - // 1-Click is not available in current context + // 1-Click is not available in current context. $configContext = $model->getConfigData('one_click_location'); if ($configContext !== Lyranetwork_Payzen_Helper_Payment::ONECLICK_LOCATION_PRODUCT && $configContext !== Lyranetwork_Payzen_Helper_Payment::ONECLICK_LOCATION_BOTH diff --git a/app/code/community/Lyranetwork/Payzen/Block/Rest/Head.php b/app/code/community/Lyranetwork/Payzen/Block/Rest/Head.php index 9ff2b494..514d9ee3 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Rest/Head.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Rest/Head.php @@ -10,7 +10,6 @@ class Lyranetwork_Payzen_Block_Rest_Head extends Mage_Core_Block_Template { - protected function _construct() { parent::_construct(); @@ -20,7 +19,7 @@ protected function _construct() public function getPublicKey() { $test = $this->_getHelper()->getCommonConfigData('ctx_mode') === 'TEST'; - return $this->getConfigData($test ? 'rest_public_key_test' : 'rest_public_key_prod'); + return $this->_getHelper()->getCommonConfigData($test ? 'rest_public_key_test' : 'rest_public_key_prod'); } public function getPlaceholder($name) @@ -75,7 +74,7 @@ public function getConfigData($name) */ protected function _toHtml() { - if (! $this->getConfigData('active') || $this->getConfigData('card_info_mode') != 4) { + if (! $this->getConfigData('active') || ! Mage::getModel('payzen/payment_standard')->isEmbedded()) { return ''; } diff --git a/app/code/community/Lyranetwork/Payzen/Block/Review.php b/app/code/community/Lyranetwork/Payzen/Block/Review.php index c85cce52..0745e573 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Review.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Review.php @@ -75,7 +75,7 @@ protected function _isIframeMode() protected function _isRestMode() { $check = ($this->_getMethodInstance() instanceof Lyranetwork_Payzen_Model_Payment_Standard) - && ($this->_getMethodInstance()->getConfigData('card_info_mode') == '4') + && $this->_getMethodInstance()->isEmbedded() && $this->_getMethodInstance()->getFormToken(false); return $check; diff --git a/app/code/community/Lyranetwork/Payzen/Block/Standard.php b/app/code/community/Lyranetwork/Payzen/Block/Standard.php index ab414f7b..8580ee5f 100644 --- a/app/code/community/Lyranetwork/Payzen/Block/Standard.php +++ b/app/code/community/Lyranetwork/Payzen/Block/Standard.php @@ -33,7 +33,7 @@ protected function _construct() { parent::_construct(); - if (($this->getConfigData('card_info_mode') == '4') && $this->getFormToken()) { + if ($this->_getModel()->isEmbedded() && $this->getFormToken()) { $this->setTemplate('payzen/standard_rest.phtml'); } else { $this->setTemplate('payzen/standard.phtml'); diff --git a/app/code/community/Lyranetwork/Payzen/Helper/Data.php b/app/code/community/Lyranetwork/Payzen/Helper/Data.php index 1c238bea..bd0483a9 100644 --- a/app/code/community/Lyranetwork/Payzen/Helper/Data.php +++ b/app/code/community/Lyranetwork/Payzen/Helper/Data.php @@ -10,6 +10,11 @@ class Lyranetwork_Payzen_Helper_Data extends Mage_Core_Helper_Abstract { + const MODE_FORM = 1; + const MODE_LOCAL_TYPE = 2; + const MODE_IFRAME = 3; + const MODE_EMBEDDED = 4; + const MODE_POPIN = 5; /** * @var array a global var to easily enable/disable features */ @@ -47,7 +52,8 @@ public function getCommonConfigData($field, $storeId = null) $storeId = Mage::getSingleton('adminhtml/session_quote')->getStoreId(); } - return Mage::getStoreConfig('payment/payzen/' . $field, $storeId); + $value = Mage::getStoreConfig('payment/payzen/' . $field, $storeId); + return is_string($value) ? trim($value) : $value; } /** @@ -60,7 +66,7 @@ public function getConfigArray($name = '') { $result = array(); - $xmlNode = 'global/payment/payzen/'.$name; + $xmlNode = 'global/payment/payzen/' . $name; foreach (Mage::getConfig()->getNode($xmlNode)->asArray() as $xmlData) { $result[$xmlData['code']] = $xmlData['name']; } @@ -210,26 +216,6 @@ public function getReviewState() } } - /** - * Check if server has requirements to do WS operations. - * - * @throws Lyranetwork_Payzen_Model_WsException - */ - public function checkWsRequirements() - { - if (! extension_loaded('soap')) { - throw new Lyranetwork_Payzen_Model_WsException( - 'SOAP extension for PHP must be enabled on the server in order to use gateway web services.' - ); - } - - if (! extension_loaded('openssl')) { - throw new Lyranetwork_Payzen_Model_WsException( - 'OPENSSL extension for PHP must be enabled on the server in order to use gateway web services.' - ); - } - } - /** * Log function. Uses Mage::log() with built-in extra data (module version, method called...). * diff --git a/app/code/community/Lyranetwork/Payzen/Helper/Payment.php b/app/code/community/Lyranetwork/Payzen/Helper/Payment.php index c6d3daa9..cde981fa 100644 --- a/app/code/community/Lyranetwork/Payzen/Helper/Payment.php +++ b/app/code/community/Lyranetwork/Payzen/Helper/Payment.php @@ -160,6 +160,11 @@ public function doPaymentReturn($controller) // Display success page. $controller->redirectResponse($order, self::SUCCESS, true /* IPN URL warn in TEST mode */); + } elseif ($this->isSofort($response) && $response->getTransStatus() == 'NOT_CREATED') { + // Case of Sofort payment, display only success page. + $this->_getHelper()->log("Payment for order #{$order->getIncrementId()} has not been processed yet."); + + $controller->redirectResponse($order, self::SUCCESS, true); } else { $this->_getHelper()->log("Payment for order #{$order->getIncrementId()} has been refused/cancelled."); @@ -372,21 +377,6 @@ public function doPaymentRestReturn($controller) return; } - $test = $this->_getHelper()->getCommonConfigData('ctx_mode') === 'TEST'; - $returnKey = $this->_getRestHelper()->getReturnKey($test); - - if (! $this->_getRestHelper()->checkResponseHash($rawData, $returnKey)) { - // authentication failed - $ip = $this->_getHelper()->getIpAddress(); - - $this->_getHelper()->log( - "{$ip} tries to access payzen/payment/restReturn page without valid signature.", - Zend_Log::ERR - ); - $controller->getResponse()->setRedirect(Mage::getBaseUrl()); - return; - } - $answer = json_decode($rawData['kr-answer'], true); if (! is_array($answer)) { $this->_getHelper()->log( @@ -413,6 +403,23 @@ public function doPaymentRestReturn($controller) return; } + // Get store id from quote. + $storeId = $quote->getStore()->getId(); + $returnKey = $this->_getRestHelper()->getReturnKey($storeId); + + if (! $this->_getRestHelper()->checkResponseHash($rawData, $returnKey)) { + // authentication failed + $ip = $this->_getHelper()->getIpAddress(); + + $this->_getHelper()->log( + + "{$ip} tries to access payzen/payment/restReturn page without valid signature with parameters: " . print_r($rawData, true), + Zend_Log::ERR + ); + $controller->getResponse()->setRedirect(Mage::getBaseUrl()); + return; + } + // Clear quote data. $quote->getPayment()->unsAdditionalInformation(self::TOKEN_DATA); $quote->getPayment()->unsAdditionalInformation(self::TOKEN); @@ -436,9 +443,6 @@ public function doPaymentRestReturn($controller) $this->_getHelper()->log("Found order #{$order->getIncrementId()} for quote #{$quoteId}."); } - // Get store id from order. - $storeId = $order->getStore()->getId(); - if ($order->getStatus() === 'pending_payment') { // Order waiting for payment. $this->_getHelper()->log("Order #{$order->getIncrementId()} is waiting for payment."); @@ -455,6 +459,11 @@ public function doPaymentRestReturn($controller) // Display success page. $controller->redirectResponse($order, self::SUCCESS, true /* IPN URL warn in TEST mode */); + } elseif ($this->isSofort($response) && $response->getTransStatus() == 'NOT_CREATED') { + // Case of Sofort payment, display only success page. + $this->_getHelper()->log("Payment for order #{$order->getIncrementId()} has not been processed yet."); + + $controller->redirectResponse($order, self::SUCCESS, true); } else { $this->_getHelper()->log("Payment for order #{$order->getIncrementId()} has been refused/cancelled."); @@ -521,21 +530,6 @@ public function doPaymentRestCheck($controller) return; } - $test = $this->_getHelper()->getCommonConfigData('ctx_mode') === 'TEST'; - $privateKey = $this->_getPassword($test); - - if (! $this->_getRestHelper()->checkResponseHash($post, $privateKey)) { - // Authentication failed. - $ip = $this->_getHelper()->getIpAddress(); - - $this->_getHelper()->log( - "{$ip} tries to access payzen/payment/restCheck page without valid signature.", - Zend_Log::ERR - ); - $controller->getResponse()->setBody('KO-An error occurred while computing the signature.'."\n".''); - return; - } - // Wrap payment result to use traditional order creation tunnel. $data = $this->_getRestHelper()->convertRestResult($answer); $response = new Lyranetwork_Payzen_Model_Api_Response($data, null, null, null); @@ -550,6 +544,22 @@ public function doPaymentRestCheck($controller) return; } + // Get store id from quote. + $storeId = $quote->getStore()->getId(); + $privateKey = $this->_getRestHelper()->getPassword($storeId); + + if (! $this->_getRestHelper()->checkResponseHash($post, $privateKey)) { + // Authentication failed. + $ip = $this->_getHelper()->getIpAddress(); + + $this->_getHelper()->log( + "{$ip} tries to access payzen/payment/restCheck page without valid signature with parameters: " . print_r($post, true), + Zend_Log::ERR + ); + $controller->getResponse()->setBody('KO-An error occurred while computing the signature.'."\n".''); + return; + } + // Case of failure when retries are enabled, do nothing before last attempt. if (! $response->isAcceptedPayment() && ($answer['orderCycle'] !== 'CLOSED')) { $msg = 'Payment is not accepted but buyer can try to re-order. Do not create order at this time.'; @@ -565,9 +575,6 @@ public function doPaymentRestCheck($controller) $quote->getPayment()->unsAdditionalInformation(self::TOKEN_DATA . '_identifier'); $quote->getPayment()->unsAdditionalInformation(self::TOKEN . '_identifier'); - // Get store id from quote. - $storeId = $quote->getStore()->getId(); - // Init app with correct store ID. Mage::app()->init($storeId, 'store'); @@ -647,6 +654,83 @@ public function doPaymentRestCheck($controller) } } + public function getCustomerAttribute($customer, $propertyName) + { + $propertyNameArray = explode('_', substr($propertyName, strlen('payzen') + 1)); + $propertyNameArray = array_map('ucfirst', $propertyNameArray); + $functionName = 'getPayzen' . implode($propertyNameArray,''); + + return $customer->$functionName(); + } + + public function deleteIdentifier($attribute, $maskedAttribute) + { + $session = Mage::getSingleton('customer/session'); + $customer = $session->getCustomer(); + + if (! $identifier= $this->getCustomerAttribute($customer, $attribute)) { + $this->_getHelper()->log("Customer {$customer->getEmail()} doesn't have a saved {$attribute} attribute."); + return false; + } + + try { + if ($this->_getRestHelper()->getPassword()) { + $requestData = array( + 'paymentMethodToken' => $identifier + ); + + // Perform REST request to cancel identifier. + $client = new Lyranetwork_Payzen_Model_Api_Rest( + $this->_getHelper()->getCommonConfigData('rest_url'), + $this->_getHelper()->getCommonConfigData('site_id'), + $this->_getRestHelper()->getPassword() + ); + + $cancelIdentifierResponse = $client->post('V4/Token/Cancel', json_encode($requestData)); + $this->_getRestHelper()->checkResult($cancelIdentifierResponse); + } else { + // Client has not configured private key in module backend. + $this->_getHelper()->log("Identifier for customer {$customer->getEmail()} cannot be deleted on gateway: private key is not configured. Let's just delete it from Magento."); + } + + // Delete identifier from Magento. + $this->deleteIdentifierAttribute($customer, $attribute, $maskedAttribute); + + return true; + } catch (\Exception $e) { + $invalidIdentCodes = array('PSP_030', 'PSP_031', 'SP_561', 'PSP_607'); + + if (in_array($e->getCode(), $invalidIdentCodes)) { + // The identifier is invalid or doesn't exist. + $this->_getHelper()->log( + "Identifier for customer {$customer->getEmail()} is invalid or doesn't exist. Let's delete it from Magento", + Zend_Log::WARN + ); + + // Delete identifier from Magento. + $this->deleteIdentifierAttribute($customer, $attribute, $maskedAttribute); + + return true; + } else { + $this->_getHelper()->log( + "Identifier for customer {$customer->getEmail()} couldn't be deleted on gateway. Error occurred: {$e->getMessage()}", + Zend_Log::ERR + ); + + return false; + } + } + } + + private function deleteIdentifierAttribute($customer, $attribute, $maskedAttribute) + { + $customer->setData($attribute, null); + $customer->setData($maskedAttribute, null); + + $customer->save(); + $this->_getHelper()->log("Identifier for customer {$customer->getEmail()} successfully deleted."); + } + private function _isPaymentSuccessfullyProcessed(Lyranetwork_Payzen_Model_Api_Response $response) { if ($response->isAcceptedPayment()) { @@ -702,11 +786,7 @@ protected function _registerOrder(Mage_Sales_Model_Order $order, Lyranetwork_Pay $this->_getHelper()->log("Saving confirmed order #{$order->getIncrementId()} and sending e-mail if not disabled."); $order->save(); - $sendEmail = true; - if ($info = $response->get('order_info')) { - $sendEmail = (bool) substr($info, strlen('send_confirmation=')); - } - + $sendEmail = ($response->getExtInfo('send_confirmation') ? (bool) $response->getExtInfo('send_confirmation') : true); if ($sendEmail) { $order->sendNewOrderEmail(); } @@ -716,7 +796,7 @@ protected function _registerOrder(Mage_Sales_Model_Order $order, Lyranetwork_Pay * Update order payment information. * * @param Mage_Sales_Model_Order $order - * @param Lyranetwork_Payzen_Model_Api_Response|Lyranetwork_Payzen_Model_Api_Ws_ResultWrapper $response + * @param Lyranetwork_Payzen_Model_Api_Response $response */ public function updatePaymentInfo(Mage_Sales_Model_Order $order, $response) { @@ -994,7 +1074,7 @@ private function _saveIdentifier(Mage_Sales_Model_Order $order, Lyranetwork_Payz $matches = array(); if (preg_match('#^([A-Z]{2}[0-9]{2}[A-Z0-9]{10,30})(_[A-Z0-9]{8,11})?$#i', $number, $matches)) { // IBAN(_BIC). - $masked .= isset($matches[2]) ? str_replace('_', '', $matches[2]) . '/' : ''; // BIC + $masked .= isset($matches[2]) ? str_replace('_', '', $matches[2]) . '/' : ''; // BIC. $iban = $matches[1]; $masked .= substr($iban, 0, 4) . str_repeat('X', strlen($iban) - 8) . substr($iban, -4); @@ -1010,7 +1090,7 @@ private function _saveIdentifier(Mage_Sales_Model_Order $order, Lyranetwork_Payz } } - $customer->setData('payzen_masked_card', $masked); + $customer->setData('payzen_masked_card', $response->get('card_brand') . '|' . $masked); $customer->save(); @@ -1044,13 +1124,13 @@ private function _saveSepaIdentifier(Mage_Sales_Model_Order $order, Lyranetwork_ $matches = array(); if (preg_match('#^([A-Z]{2}[0-9]{2}[A-Z0-9]{10,30})(_[A-Z0-9]{8,11})?$#i', $number, $matches)) { // IBAN(_BIC). - $masked .= isset($matches[2]) ? str_replace('_', '', $matches[2]) . '/' : ''; // BIC + $masked .= isset($matches[2]) ? str_replace('_', '', $matches[2]) . '/' : ''; // BIC. $iban = $matches[1]; $masked .= substr($iban, 0, 4) . str_repeat('X', strlen($iban) - 8) . substr($iban, -4); } - $customer->setData('payzen_sepa_iban', $masked); + $customer->setData('payzen_sepa_iban', $response->get('card_brand') . '|' . $masked); $customer->save(); @@ -1203,7 +1283,7 @@ public function addTransaction($payment, $type, $transactionId, $additionalInfo, /** * Get new order state and status according to the gateway response. * - * @param Lyranetwork_Payzen_Model_Api_Response|Lyranetwork_Payzen_Model_Api_Ws_ResultWrapper $response + * @param Lyranetwork_Payzen_Model_Api_Response $response * @param Mage_Sales_Model_Order $order * @param boolean $ignoreFraud * @return Varien_Object @@ -1339,12 +1419,4 @@ protected function _getOnepageForQuote($quote) return $onePage; } - - private function _getPassword($isTest = true) - { - $standard = Mage::getModel('payzen/payment_standard'); - $crypted = $standard->getConfigData($isTest ? 'rest_private_key_test' : 'rest_private_key_prod'); - - return Mage::helper('core')->decrypt($crypted); - } } diff --git a/app/code/community/Lyranetwork/Payzen/Helper/Rest.php b/app/code/community/Lyranetwork/Payzen/Helper/Rest.php index 087f37a3..bd88fbe2 100644 --- a/app/code/community/Lyranetwork/Payzen/Helper/Rest.php +++ b/app/code/community/Lyranetwork/Payzen/Helper/Rest.php @@ -10,19 +10,23 @@ class Lyranetwork_Payzen_Helper_Rest extends Mage_Core_Helper_Abstract { - public function convertRestResult($answer) + public function convertRestResult($answer, $isTransaction = false) { if (! is_array($answer) || empty($answer)) { return array(); } - $transactions = $this->getProperty($answer, 'transactions'); + if ($isTransaction){ + $transaction = $answer; + } else{ + $transactions = $this->getProperty($answer, 'transactions'); - if (! is_array($transactions) || empty($transactions)) { - return array(); - } + if (! is_array($transactions) || empty($transactions)) { + return array(); + } - $transaction = $transactions[0]; + $transaction = $transactions[0]; + } $response = array(); @@ -40,7 +44,9 @@ public function convertRestResult($answer) } $response['vads_amount'] = $this->getProperty($transaction, 'amount'); - $response['vads_currency'] = Lyranetwork_Payzen_Model_Api_Api::getCurrencyNumCode($this->getProperty($transaction, 'currency')); + + $currency = Lyranetwork_Payzen_Model_Api_Api::findCurrency($this->getProperty($transaction, 'currency')); + $response['vads_currency'] = Lyranetwork_Payzen_Model_Api_Api::getCurrencyNumCode($currency->getAlpha3()); if ($paymentToken = $this->getProperty($transaction, 'paymentMethodToken')) { $response['vads_identifier'] = $paymentToken; @@ -74,7 +80,7 @@ public function convertRestResult($answer) $response['vads_warranty_result'] = $this->getProperty($transactionDetails, 'liabilityShift'); if ($cardDetails = $this->getProperty($transactionDetails, 'cardDetails')) { - $response['vads_trans_id'] = $this->getProperty($cardDetails, 'legacyTransId'); // deprecated + $response['vads_trans_id'] = $this->getProperty($cardDetails, 'legacyTransId'); // Deprecated. $response['vads_presentation_date'] = $this->getProperty($cardDetails, 'expectedCaptureDate'); $response['vads_card_brand'] = $this->getProperty($cardDetails, 'effectiveBrand'); @@ -119,6 +125,25 @@ public function convertRestResult($answer) return $response; } + public function checkResult($response, $expectedStatuses = array()) + { + $answer = $response['answer']; + + if ($response['status'] != 'SUCCESS') { + $errorMessage = $answer['errorCode']; + + if (isset($answer['detailedErrorMessage']) && ! empty($answer['detailedErrorMessage'])) { + $errorMessage .= ' : ' . $answer['detailedErrorMessage']; + } + + throw new Exception( "({$errorMessage})."); + } elseif (! empty($expectedStatuses) && ! in_array($answer['detailedStatus'], $expectedStatuses)) { + throw new UnexpectedValueException( + "Unexpected transaction status returned ({$answer['detailedStatus']})." + ); + } + } + private function getProperty($paymentResult, $key) { if (isset($paymentResult[$key])) { @@ -137,25 +162,25 @@ public function checkResponseHash($data, $key) { $supportedSignAlgos = array('sha256_hmac'); - // check if the hash algorithm is supported + // Check if the hash algorithm is supported. if (! in_array($data['kr-hash-algorithm'], $supportedSignAlgos)) { - $this->_getHelper->log('Hash algorithm is not supported: ' . $data['kr-hash-algorithm'], \Psr\Log\LogLevel::ERROR); + $this->_getHelper()->log('Hash algorithm is not supported: ' . $data['kr-hash-algorithm'], \Psr\Log\LogLevel::ERROR); return false; } - // on some servers, / can be escaped + // On some servers, / can be escaped. $krAnswer = str_replace('\/', '/', $data['kr-answer']); $hash = hash_hmac('sha256', $krAnswer, $key); - // return true if calculated hash and sent hash are the same + // Return true if calculated hash and sent hash are the same. return ($hash === $data['kr-hash']); } - private function _getPassword($isTest = true) + public function getPassword($storeId = null) { - $standard = Mage::getModel('payzen/payment_standard'); - $crypted = $standard->getConfigData($isTest ? 'rest_private_key_test' : 'rest_private_key_prod'); + $isTest = $this->_getHelper()->getCommonConfigData('ctx_mode', $storeId) === 'TEST'; + $crypted = $this->_getHelper()->getCommonConfigData($isTest ? 'rest_private_key_test' : 'rest_private_key_prod', $storeId); return Mage::helper('core')->decrypt($crypted); } @@ -166,14 +191,74 @@ private function _getPassword($isTest = true) * @param boolean $isTest * @return string */ - public function getReturnKey($isTest = true) + public function getReturnKey($storeId = null) { - $standard = Mage::getModel('payzen/payment_standard'); - $crypted = $standard->getConfigData($isTest ? 'rest_return_key_test' : 'rest_return_key_prod'); + $isTest = $this->_getHelper()->getCommonConfigData('ctx_mode', $storeId) === 'TEST'; + $crypted = $this->_getHelper()->getCommonConfigData($isTest ? 'rest_return_key_test' : 'rest_return_key_prod', $storeId); return Mage::helper('core')->decrypt($crypted); } + public function checkIdentifier($identifier, $customerEmail) + { + try { + $requestData = array( + 'paymentMethodToken' => $identifier + ); + + // Perform REST request to check identifier. + $client = new Lyranetwork_Payzen_Model_Api_Rest( + $this->_getHelper()->getCommonConfigData('rest_url'), + $this->_getHelper()->getCommonConfigData('site_id'), + $this->getPassword() + ); + + $checkIdentifierResponse = $client->post('V4/Token/Get', json_encode($requestData)); + $this->checkResult($checkIdentifierResponse); + + $cancellationDate = $this->getProperty($checkIdentifierResponse['answer'], 'cancellationDate'); + if ($cancellationDate && (strtotime($cancellationDate) <= time())) { + $this->_getHelper()->log( + "Saved identifier for customer {$customerEmail} is expired on payment gateway in date of: {$cancellationDate}.", + Zend_Log::WARN + ); + return false; + } + + return true; + } catch (\Exception $e) { + $invalidIdentCodes = array('PSP_030', 'PSP_031', 'PSP_561', 'PSP_607'); + + if (in_array($e->getCode(), $invalidIdentCodes)) { + // The identifier is invalid or doesn't exist. + $this->_getHelper()->log( + "Identifier for customer {$customerEmail} is invalid or doesn't exist: {$e->getMessage()}.", + Zend_Log::WARN + ); + return false; + } else { + throw $e; + } + } + } + + public function setSessionValidPaymentByToken($customer) + { + try { + $isValidIdentifier = $this->checkIdentifier($customer->getPayzenIdentifier(), $customer->getEmail()); + } catch (\Exception $e) { + $this->_getHelper()->log( + "Saved identifier for customer {$customer->getEmail()} couldn't be verified on gateway. Error occurred: {$e->getMessage()}", + Zend_Log::ERR + ); + + // Unable to validate alias online, we cannot disable feature. + $isValidIdentifier = true; + } + + Mage::getSingleton('checkout/session')->setValidAlias($isValidIdentifier); + } + protected function _getHelper() { return Mage::helper('payzen'); diff --git a/app/code/community/Lyranetwork/Payzen/Helper/Util.php b/app/code/community/Lyranetwork/Payzen/Helper/Util.php index 915ee41e..9908543a 100644 --- a/app/code/community/Lyranetwork/Payzen/Helper/Util.php +++ b/app/code/community/Lyranetwork/Payzen/Helper/Util.php @@ -140,7 +140,7 @@ protected function _checkOrderId($orderId) public function checkProducts($scope, $scopeId) { - // Check products' IDs and labels. + // Check products IDs and labels. $collection = Mage::getModel('catalog/product')->getCollection(); $collection->addAttributeToSelect('name'); diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthenticationRequestData.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthenticationRequestData.php deleted file mode 100644 index ebb4cd9d..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthenticationRequestData.php +++ /dev/null @@ -1,153 +0,0 @@ -threeDSAcctId; - } - - /** - * @param string $threeDSAcctId - * @return AuthenticationRequestData - */ - public function setThreeDSAcctId($threeDSAcctId) - { - $this->threeDSAcctId = $threeDSAcctId; - return $this; - } - - /** - * @return string - */ - public function getThreeDSAcsUrl() - { - return $this->threeDSAcsUrl; - } - - /** - * @param string $threeDSAcsUrl - * @return AuthenticationRequestData - */ - public function setThreeDSAcsUrl($threeDSAcsUrl) - { - $this->threeDSAcsUrl = $threeDSAcsUrl; - return $this; - } - - /** - * @return string - */ - public function getThreeDSBrand() - { - return $this->threeDSBrand; - } - - /** - * @param string $threeDSBrand - * @return AuthenticationRequestData - */ - public function setThreeDSBrand($threeDSBrand) - { - $this->threeDSBrand = $threeDSBrand; - return $this; - } - - /** - * @return string - */ - public function getThreeDSEncodedPareq() - { - return $this->threeDSEncodedPareq; - } - - /** - * @param string $threeDSEncodedPareq - * @return AuthenticationRequestData - */ - public function setThreeDSEncodedPareq($threeDSEncodedPareq) - { - $this->threeDSEncodedPareq = $threeDSEncodedPareq; - return $this; - } - - /** - * @return string - */ - public function getThreeDSEnrolled() - { - return $this->threeDSEnrolled; - } - - /** - * @param string $threeDSEnrolled - * @return AuthenticationRequestData - */ - public function setThreeDSEnrolled($threeDSEnrolled) - { - $this->threeDSEnrolled = $threeDSEnrolled; - return $this; - } - - /** - * @return string - */ - public function getThreeDSRequestId() - { - return $this->threeDSRequestId; - } - - /** - * @param string $threeDSRequestId - * @return AuthenticationRequestData - */ - public function setThreeDSRequestId($threeDSRequestId) - { - $this->threeDSRequestId = $threeDSRequestId; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthenticationResultData.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthenticationResultData.php deleted file mode 100644 index a9aa2d91..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthenticationResultData.php +++ /dev/null @@ -1,222 +0,0 @@ -brand; - } - - /** - * @param string $brand - * @return AuthenticationResultData - */ - public function setBrand($brand) - { - $this->brand = $brand; - return $this; - } - - /** - * @return string - */ - public function getEnrolled() - { - return $this->enrolled; - } - - /** - * @param string $enrolled - * @return AuthenticationResultData - */ - public function setEnrolled($enrolled) - { - $this->enrolled = $enrolled; - return $this; - } - - /** - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * @param string $status - * @return AuthenticationResultData - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * @return string - */ - public function getEci() - { - return $this->eci; - } - - /** - * @param string $eci - * @return AuthenticationResultData - */ - public function setEci($eci) - { - $this->eci = $eci; - return $this; - } - - /** - * @return string - */ - public function getXid() - { - return $this->xid; - } - - /** - * @param string $xid - * @return AuthenticationResultData - */ - public function setXid($xid) - { - $this->xid = $xid; - return $this; - } - - /** - * @return string - */ - public function getCavv() - { - return $this->cavv; - } - - /** - * @param string $cavv - * @return AuthenticationResultData - */ - public function setCavv($cavv) - { - $this->cavv = $cavv; - return $this; - } - - /** - * @return string - */ - public function getCavvAlgorithm() - { - return $this->cavvAlgorithm; - } - - /** - * @param string $cavvAlgorithm - * @return AuthenticationResultData - */ - public function setCavvAlgorithm($cavvAlgorithm) - { - $this->cavvAlgorithm = $cavvAlgorithm; - return $this; - } - - /** - * @return string - */ - public function getSignValid() - { - return $this->signValid; - } - - /** - * @param string $signValid - * @return AuthenticationResultData - */ - public function setSignValid($signValid) - { - $this->signValid = $signValid; - return $this; - } - - /** - * @return string - */ - public function getTransactionCondition() - { - return $this->transactionCondition; - } - - /** - * @param string $transactionCondition - * @return AuthenticationResultData - */ - public function setTransactionCondition($transactionCondition) - { - $this->transactionCondition = $transactionCondition; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthorizationResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthorizationResponse.php deleted file mode 100644 index 4f9911e9..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/AuthorizationResponse.php +++ /dev/null @@ -1,188 +0,0 @@ -mode; - } - - /** - * @param string $mode - * @return AuthorizationResponse - */ - public function setMode($mode) - { - $this->mode = $mode; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return AuthorizationResponse - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return AuthorizationResponse - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return \DateTime - */ - public function getDate() - { - if ($this->date == null) { - return null; - } else { - try { - return new \DateTime($this->date); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $date - * @return AuthorizationResponse - */ - public function setDate(\DateTime $date = null) - { - if ($date == null) { - $this->date = null; - } else { - $this->date = $date->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getNumber() - { - return $this->number; - } - - /** - * @param string $number - * @return AuthorizationResponse - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * @param int $result - * @return AuthorizationResponse - */ - public function setResult($result) - { - $this->result = $result; - return $this; - } - - /** - * @return string - */ - public function getCardBalanceInfo() - { - return $this->cardBalanceInfo; - } - - /** - * @param string $cardBalanceInfo - * @return AuthorizationResponse - */ - public function setCardBalanceInfo($cardBalanceInfo) - { - $this->cardBalanceInfo = $cardBalanceInfo; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/BillingDetailsRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/BillingDetailsRequest.php deleted file mode 100644 index 5ef2834c..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/BillingDetailsRequest.php +++ /dev/null @@ -1,452 +0,0 @@ -reference; - } - - /** - * @param string $reference - * @return BillingDetailsRequest - */ - public function setReference($reference) - { - $this->reference = $reference; - return $this; - } - - /** - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * @param string $title - * @return BillingDetailsRequest - */ - public function setTitle($title) - { - $this->title = $title; - return $this; - } - - /** - * @return CustStatus - */ - public function getType() - { - return $this->type; - } - - /** - * @param CustStatus $type - * @return BillingDetailsRequest - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * @param string $firstName - * @return BillingDetailsRequest - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return BillingDetailsRequest - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getPhoneNumber() - { - return $this->phoneNumber; - } - - /** - * @param string $phoneNumber - * @return BillingDetailsRequest - */ - public function setPhoneNumber($phoneNumber) - { - $this->phoneNumber = $phoneNumber; - return $this; - } - - /** - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param string $email - * @return BillingDetailsRequest - */ - public function setEmail($email) - { - $this->email = $email; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return BillingDetailsRequest - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * @param string $address - * @return BillingDetailsRequest - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * @return string - */ - public function getAddress2() - { - return $this->address2; - } - - /** - * @param string $address2 - * @return BillingDetailsRequest - */ - public function setAddress2($address2) - { - $this->address2 = $address2; - return $this; - } - - /** - * @return string - */ - public function getDistrict() - { - return $this->district; - } - - /** - * @param string $district - * @return BillingDetailsRequest - */ - public function setDistrict($district) - { - $this->district = $district; - return $this; - } - - /** - * @return string - */ - public function getZipCode() - { - return $this->zipCode; - } - - /** - * @param string $zipCode - * @return BillingDetailsRequest - */ - public function setZipCode($zipCode) - { - $this->zipCode = $zipCode; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return BillingDetailsRequest - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * @return BillingDetailsRequest - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return BillingDetailsRequest - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * @param string $language - * @return BillingDetailsRequest - */ - public function setLanguage($language) - { - $this->language = $language; - return $this; - } - - /** - * @return string - */ - public function getCellPhoneNumber() - { - return $this->cellPhoneNumber; - } - - /** - * @param string $cellPhoneNumber - * @return BillingDetailsRequest - */ - public function setCellPhoneNumber($cellPhoneNumber) - { - $this->cellPhoneNumber = $cellPhoneNumber; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return BillingDetailsRequest - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } - - /** - * @return string - */ - public function getIdentityCode() - { - return $this->identityCode; - } - - /** - * @param string $identityCode - * @return BillingDetailsRequest - */ - public function setIdentityCode($identityCode) - { - $this->identityCode = $identityCode; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/BillingDetailsResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/BillingDetailsResponse.php deleted file mode 100644 index 1baeda7d..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/BillingDetailsResponse.php +++ /dev/null @@ -1,406 +0,0 @@ -reference; - } - - /** - * @param string $reference - * @return BillingDetailsResponse - */ - public function setReference($reference) - { - $this->reference = $reference; - return $this; - } - - /** - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * @param string $title - * @return BillingDetailsResponse - */ - public function setTitle($title) - { - $this->title = $title; - return $this; - } - - /** - * @return CustStatus - */ - public function getType() - { - return $this->type; - } - - /** - * @param CustStatus $type - * @return BillingDetailsResponse - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * @param string $firstName - * @return BillingDetailsResponse - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return BillingDetailsResponse - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getPhoneNumber() - { - return $this->phoneNumber; - } - - /** - * @param string $phoneNumber - * @return BillingDetailsResponse - */ - public function setPhoneNumber($phoneNumber) - { - $this->phoneNumber = $phoneNumber; - return $this; - } - - /** - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param string $email - * @return BillingDetailsResponse - */ - public function setEmail($email) - { - $this->email = $email; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return BillingDetailsResponse - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * @param string $address - * @return BillingDetailsResponse - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * @return string - */ - public function getDistrict() - { - return $this->district; - } - - /** - * @param string $district - * @return BillingDetailsResponse - */ - public function setDistrict($district) - { - $this->district = $district; - return $this; - } - - /** - * @return string - */ - public function getZipCode() - { - return $this->zipCode; - } - - /** - * @param string $zipCode - * @return BillingDetailsResponse - */ - public function setZipCode($zipCode) - { - $this->zipCode = $zipCode; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return BillingDetailsResponse - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * @return BillingDetailsResponse - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return BillingDetailsResponse - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * @param string $language - * @return BillingDetailsResponse - */ - public function setLanguage($language) - { - $this->language = $language; - return $this; - } - - /** - * @return string - */ - public function getCellPhoneNumber() - { - return $this->cellPhoneNumber; - } - - /** - * @param string $cellPhoneNumber - * @return BillingDetailsResponse - */ - public function setCellPhoneNumber($cellPhoneNumber) - { - $this->cellPhoneNumber = $cellPhoneNumber; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return BillingDetailsResponse - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPayment.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPayment.php deleted file mode 100644 index e0ec5766..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPayment.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelCapturedPayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelCapturedPayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPaymentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPaymentResponse.php deleted file mode 100644 index 911b55d8..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelCapturedPaymentResult; - } - - /** - * @param CancelCapturedPaymentResult $cancelCapturedPaymentResult - * @return CancelCapturedPaymentResponse - */ - public function setCancelCapturedPaymentResult($cancelCapturedPaymentResult) - { - $this->cancelCapturedPaymentResult = $cancelCapturedPaymentResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPaymentResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPaymentResult.php deleted file mode 100644 index 846eadd1..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelCapturedPaymentResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelCapturedPaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPayment.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPayment.php deleted file mode 100644 index 1f8ea5e2..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPayment.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelPayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelPayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPaymentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPaymentResponse.php deleted file mode 100644 index 5ccca5f4..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelPaymentResult; - } - - /** - * @param CancelPaymentResult $cancelPaymentResult - * @return CancelPaymentResponse - */ - public function setCancelPaymentResult($cancelPaymentResult) - { - $this->cancelPaymentResult = $cancelPaymentResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPaymentResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPaymentResult.php deleted file mode 100644 index 1e7a11af..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelPaymentResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelPaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefund.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefund.php deleted file mode 100644 index f33a1582..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefund.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelRefund - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelRefund - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefundResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefundResponse.php deleted file mode 100644 index 4c789b80..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefundResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelRefundResult; - } - - /** - * @param CancelRefundResult $cancelRefundResult - * @return CancelRefundResponse - */ - public function setCancelRefundResult($cancelRefundResult) - { - $this->cancelRefundResult = $cancelRefundResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefundResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefundResult.php deleted file mode 100644 index 269e74e9..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelRefundResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelRefundResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscription.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscription.php deleted file mode 100644 index 8d82bd50..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscription.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelSubscription - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelSubscription - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscriptionResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscriptionResponse.php deleted file mode 100644 index 88cbbea7..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscriptionResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelSubscriptionResult; - } - - /** - * @param CancelSubscriptionResult $cancelSubscriptionResult - * @return CancelSubscriptionResponse - */ - public function setCancelSubscriptionResult($cancelSubscriptionResult) - { - $this->cancelSubscriptionResult = $cancelSubscriptionResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscriptionResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscriptionResult.php deleted file mode 100644 index 7924d3d1..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelSubscriptionResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelSubscriptionResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelToken.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelToken.php deleted file mode 100644 index 7d1b333e..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelToken.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelToken - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelToken - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelTokenResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelTokenResponse.php deleted file mode 100644 index 6c17572c..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelTokenResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelTokenResult; - } - - /** - * @param CancelTokenResult $cancelTokenResult - * @return CancelTokenResponse - */ - public function setCancelTokenResult($cancelTokenResult) - { - $this->cancelTokenResult = $cancelTokenResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelTokenResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelTokenResult.php deleted file mode 100644 index 8a796a3a..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CancelTokenResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelTokenResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePayment.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePayment.php deleted file mode 100644 index f4dfeb30..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePayment.php +++ /dev/null @@ -1,38 +0,0 @@ -settlementRequest; - } - - /** - * @param SettlementRequest $settlementRequest - * @return CapturePayment - */ - public function setSettlementRequest($settlementRequest) - { - $this->settlementRequest = $settlementRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePaymentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePaymentResponse.php deleted file mode 100644 index 2071dd70..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -capturePaymentResult; - } - - /** - * @param CapturePaymentResult $capturePaymentResult - * @return CapturePaymentResponse - */ - public function setCapturePaymentResult($capturePaymentResult) - { - $this->capturePaymentResult = $capturePaymentResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePaymentResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePaymentResult.php deleted file mode 100644 index c96087a7..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CapturePaymentResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CapturePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CaptureResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CaptureResponse.php deleted file mode 100644 index d7e021ec..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CaptureResponse.php +++ /dev/null @@ -1,165 +0,0 @@ -date == null) { - return null; - } else { - try { - return new \DateTime($this->date); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $date - * @return CaptureResponse - */ - public function setDate(\DateTime $date = null) - { - if ($date == null) { - $this->date = null; - } else { - $this->date = $date->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getNumber() - { - return $this->number; - } - - /** - * @param int $number - * @return CaptureResponse - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return int - */ - public function getReconciliationStatus() - { - return $this->reconciliationStatus; - } - - /** - * @param int $reconciliationStatus - * @return CaptureResponse - */ - public function setReconciliationStatus($reconciliationStatus) - { - $this->reconciliationStatus = $reconciliationStatus; - return $this; - } - - /** - * @return int - */ - public function getRefundAmount() - { - return $this->refundAmount; - } - - /** - * @param int $refundAmount - * @return CaptureResponse - */ - public function setRefundAmount($refundAmount) - { - $this->refundAmount = $refundAmount; - return $this; - } - - /** - * @return int - */ - public function getRefundCurrency() - { - return $this->refundCurrency; - } - - /** - * @param int $refundCurrency - * @return CaptureResponse - */ - public function setRefundCurrency($refundCurrency) - { - $this->refundCurrency = $refundCurrency; - return $this; - } - - /** - * @return boolean - */ - public function getChargeback() - { - return $this->chargeback; - } - - /** - * @param boolean $chargeback - * @return CaptureResponse - */ - public function setChargeback($chargeback) - { - $this->chargeback = $chargeback; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CardRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CardRequest.php deleted file mode 100644 index ea9e7897..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CardRequest.php +++ /dev/null @@ -1,280 +0,0 @@ -number; - } - - /** - * @param string $number - * @return CardRequest - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * @param string $scheme - * @return CardRequest - */ - public function setScheme($scheme) - { - $this->scheme = $scheme; - return $this; - } - - /** - * @return int - */ - public function getExpiryMonth() - { - return $this->expiryMonth; - } - - /** - * @param int $expiryMonth - * @return CardRequest - */ - public function setExpiryMonth($expiryMonth) - { - $this->expiryMonth = $expiryMonth; - return $this; - } - - /** - * @return int - */ - public function getExpiryYear() - { - return $this->expiryYear; - } - - /** - * @param int $expiryYear - * @return CardRequest - */ - public function setExpiryYear($expiryYear) - { - $this->expiryYear = $expiryYear; - return $this; - } - - /** - * @return string - */ - public function getCardSecurityCode() - { - return $this->cardSecurityCode; - } - - /** - * @param string $cardSecurityCode - * @return CardRequest - */ - public function setCardSecurityCode($cardSecurityCode) - { - $this->cardSecurityCode = $cardSecurityCode; - return $this; - } - - /** - * @return \DateTime - */ - public function getCardHolderBirthDay() - { - if ($this->cardHolderBirthDay == null) { - return null; - } else { - try { - return new \DateTime($this->cardHolderBirthDay); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $cardHolderBirthDay - * @return CardRequest - */ - public function setCardHolderBirthDay(\DateTime $cardHolderBirthDay = null) - { - if ($cardHolderBirthDay == null) { - $this->cardHolderBirthDay = null; - } else { - $this->cardHolderBirthDay = $cardHolderBirthDay->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getPaymentToken() - { - return $this->paymentToken; - } - - /** - * @param string $paymentToken - * @return CardRequest - */ - public function setPaymentToken($paymentToken) - { - $this->paymentToken = $paymentToken; - return $this; - } - - /** - * @return string - */ - public function getCardHolderName() - { - return $this->cardHolderName; - } - - /** - * @param string $cardHolderName - * @return CardRequest - */ - public function setCardHolderName($cardHolderName) - { - $this->cardHolderName = $cardHolderName; - return $this; - } - - /** - * @return string - */ - public function getProofOfIdType() - { - return $this->proofOfIdType; - } - - /** - * @param string $proofOfIdType - * @return CardRequest - */ - public function setProofOfIdType($proofOfIdType) - { - $this->proofOfIdType = $proofOfIdType; - return $this; - } - - /** - * @return string - */ - public function getProofOfIdNumber() - { - return $this->proofOfIdNumber; - } - - /** - * @param string $proofOfIdNumber - * @return CardRequest - */ - public function setProofOfIdNumber($proofOfIdNumber) - { - $this->proofOfIdNumber = $proofOfIdNumber; - return $this; - } - - /** - * @return string - */ - public function getWalletPayload() - { - return $this->walletPayload; - } - - /** - * @param string $walletPayload - * @return CardRequest - */ - public function setWalletPayload($walletPayload) - { - $this->walletPayload = $walletPayload; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CardResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CardResponse.php deleted file mode 100644 index 0e5bf011..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CardResponse.php +++ /dev/null @@ -1,291 +0,0 @@ -number; - } - - /** - * @param string $number - * @return CardResponse - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * @param string $scheme - * @return CardResponse - */ - public function setScheme($scheme) - { - $this->scheme = $scheme; - return $this; - } - - /** - * @return string - */ - public function getBrand() - { - return $this->brand; - } - - /** - * @param string $brand - * @return CardResponse - */ - public function setBrand($brand) - { - $this->brand = $brand; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return CardResponse - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getProductCode() - { - return $this->productCode; - } - - /** - * @param string $productCode - * @return CardResponse - */ - public function setProductCode($productCode) - { - $this->productCode = $productCode; - return $this; - } - - /** - * @return string - */ - public function getBankCode() - { - return $this->bankCode; - } - - /** - * @param string $bankCode - * @return CardResponse - */ - public function setBankCode($bankCode) - { - $this->bankCode = $bankCode; - return $this; - } - - /** - * @return string - */ - public function getBankLabel() - { - return $this->bankLabel; - } - - /** - * @param string $bankLabel - * @return CardResponse - */ - public function setBankLabel($bankLabel) - { - $this->bankLabel = $bankLabel; - return $this; - } - - /** - * @return int - */ - public function getExpiryMonth() - { - return $this->expiryMonth; - } - - /** - * @param int $expiryMonth - * @return CardResponse - */ - public function setExpiryMonth($expiryMonth) - { - $this->expiryMonth = $expiryMonth; - return $this; - } - - /** - * @return int - */ - public function getExpiryYear() - { - return $this->expiryYear; - } - - /** - * @param int $expiryYear - * @return CardResponse - */ - public function setExpiryYear($expiryYear) - { - $this->expiryYear = $expiryYear; - return $this; - } - - /** - * @return string - */ - public function getCardHolderName() - { - return $this->cardHolderName; - } - - /** - * @param string $cardHolderName - * @return CardResponse - */ - public function setCardHolderName($cardHolderName) - { - $this->cardHolderName = $cardHolderName; - return $this; - } - - /** - * @return string - */ - public function getProofOfIdType() - { - return $this->proofOfIdType; - } - - /** - * @param string $proofOfIdType - * @return CardResponse - */ - public function setProofOfIdType($proofOfIdType) - { - $this->proofOfIdType = $proofOfIdType; - return $this; - } - - /** - * @return string - */ - public function getProofOfIdNumber() - { - return $this->proofOfIdNumber; - } - - /** - * @param string $proofOfIdNumber - * @return CardResponse - */ - public function setProofOfIdNumber($proofOfIdNumber) - { - $this->proofOfIdNumber = $proofOfIdNumber; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CartItemInfo.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CartItemInfo.php deleted file mode 100644 index 291c2498..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CartItemInfo.php +++ /dev/null @@ -1,176 +0,0 @@ -productLabel; - } - - /** - * @param string $productLabel - * @return CartItemInfo - */ - public function setProductLabel($productLabel) - { - $this->productLabel = $productLabel; - return $this; - } - - /** - * @return ProductType - */ - public function getProductType() - { - return $this->productType; - } - - /** - * @param ProductType $productType - * @return CartItemInfo - */ - public function setProductType($productType) - { - $this->productType = $productType; - return $this; - } - - /** - * @return string - */ - public function getProductRef() - { - return $this->productRef; - } - - /** - * @param string $productRef - * @return CartItemInfo - */ - public function setProductRef($productRef) - { - $this->productRef = $productRef; - return $this; - } - - /** - * @return int - */ - public function getProductQty() - { - return $this->productQty; - } - - /** - * @param int $productQty - * @return CartItemInfo - */ - public function setProductQty($productQty) - { - $this->productQty = $productQty; - return $this; - } - - /** - * @return string - */ - public function getProductAmount() - { - return $this->productAmount; - } - - /** - * @param string $productAmount - * @return CartItemInfo - */ - public function setProductAmount($productAmount) - { - $this->productAmount = $productAmount; - return $this; - } - - /** - * @return string - */ - public function getProductVat() - { - return $this->productVat; - } - - /** - * @param string $productVat - * @return CartItemInfo - */ - public function setProductVat($productVat) - { - $this->productVat = $productVat; - return $this; - } - - /** - * @return string - */ - public function getProductExtId() - { - return $this->productExtId; - } - - /** - * @param string $productExtId - * @return CartItemInfo - */ - public function setProductExtId($productExtId) - { - $this->productExtId = $productExtId; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthentication.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthentication.php deleted file mode 100644 index 7e1ff3b1..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthentication.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CheckThreeDSAuthentication - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return ThreeDSRequest - */ - public function getThreeDSRequest() - { - return $this->threeDSRequest; - } - - /** - * @param ThreeDSRequest $threeDSRequest - * @return CheckThreeDSAuthentication - */ - public function setThreeDSRequest($threeDSRequest) - { - $this->threeDSRequest = $threeDSRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthenticationResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthenticationResponse.php deleted file mode 100644 index d49e762f..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthenticationResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -checkThreeDSAuthenticationResult; - } - - /** - * @param CheckThreeDSAuthenticationResult $checkThreeDSAuthenticationResult - * @return CheckThreeDSAuthenticationResponse - */ - public function setCheckThreeDSAuthenticationResult($checkThreeDSAuthenticationResult) - { - $this->checkThreeDSAuthenticationResult = $checkThreeDSAuthenticationResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthenticationResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthenticationResult.php deleted file mode 100644 index 8bce6d40..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CheckThreeDSAuthenticationResult.php +++ /dev/null @@ -1,61 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CheckThreeDSAuthenticationResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CheckThreeDSAuthenticationResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CommonRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CommonRequest.php deleted file mode 100644 index ac828e40..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CommonRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -paymentSource; - } - - /** - * @param string $paymentSource - * @return CommonRequest - */ - public function setPaymentSource($paymentSource) - { - $this->paymentSource = $paymentSource; - return $this; - } - - /** - * @return \DateTime - */ - public function getSubmissionDate() - { - if ($this->submissionDate == null) { - return null; - } else { - try { - return new \DateTime($this->submissionDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $submissionDate - * @return CommonRequest - */ - public function setSubmissionDate(\DateTime $submissionDate = null) - { - if ($submissionDate == null) { - $this->submissionDate = null; - } else { - $this->submissionDate = $submissionDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getContractNumber() - { - return $this->contractNumber; - } - - /** - * @param string $contractNumber - * @return CommonRequest - */ - public function setContractNumber($contractNumber) - { - $this->contractNumber = $contractNumber; - return $this; - } - - /** - * @return string - */ - public function getComment() - { - return $this->comment; - } - - /** - * @param string $comment - * @return CommonRequest - */ - public function setComment($comment) - { - $this->comment = $comment; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CommonResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CommonResponse.php deleted file mode 100644 index 3def5eb2..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CommonResponse.php +++ /dev/null @@ -1,211 +0,0 @@ -responseCode; - } - - /** - * @param int $responseCode - * @return CommonResponse - */ - public function setResponseCode($responseCode) - { - $this->responseCode = $responseCode; - return $this; - } - - /** - * @return string - */ - public function getResponseCodeDetail() - { - return $this->responseCodeDetail; - } - - /** - * @param string $responseCodeDetail - * @return CommonResponse - */ - public function setResponseCodeDetail($responseCodeDetail) - { - $this->responseCodeDetail = $responseCodeDetail; - return $this; - } - - /** - * @return string - */ - public function getTransactionStatusLabel() - { - return $this->transactionStatusLabel; - } - - /** - * @param string $transactionStatusLabel - * @return CommonResponse - */ - public function setTransactionStatusLabel($transactionStatusLabel) - { - $this->transactionStatusLabel = $transactionStatusLabel; - return $this; - } - - /** - * @return string - */ - public function getShopId() - { - return $this->shopId; - } - - /** - * @param string $shopId - * @return CommonResponse - */ - public function setShopId($shopId) - { - $this->shopId = $shopId; - return $this; - } - - /** - * @return string - */ - public function getPaymentSource() - { - return $this->paymentSource; - } - - /** - * @param string $paymentSource - * @return CommonResponse - */ - public function setPaymentSource($paymentSource) - { - $this->paymentSource = $paymentSource; - return $this; - } - - /** - * @return \DateTime - */ - public function getSubmissionDate() - { - if ($this->submissionDate == null) { - return null; - } else { - try { - return new \DateTime($this->submissionDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $submissionDate - * @return CommonResponse - */ - public function setSubmissionDate(\DateTime $submissionDate = null) - { - if ($submissionDate == null) { - $this->submissionDate = null; - } else { - $this->submissionDate = $submissionDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getContractNumber() - { - return $this->contractNumber; - } - - /** - * @param string $contractNumber - * @return CommonResponse - */ - public function setContractNumber($contractNumber) - { - $this->contractNumber = $contractNumber; - return $this; - } - - /** - * @return string - */ - public function getPaymentToken() - { - return $this->paymentToken; - } - - /** - * @param string $paymentToken - * @return CommonResponse - */ - public function setPaymentToken($paymentToken) - { - $this->paymentToken = $paymentToken; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePayment.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePayment.php deleted file mode 100644 index 966002e4..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePayment.php +++ /dev/null @@ -1,222 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreatePayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return ThreeDSRequest - */ - public function getThreeDSRequest() - { - return $this->threeDSRequest; - } - - /** - * @param ThreeDSRequest $threeDSRequest - * @return CreatePayment - */ - public function setThreeDSRequest($threeDSRequest) - { - $this->threeDSRequest = $threeDSRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return CreatePayment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } - - /** - * @return OrderRequest - */ - public function getOrderRequest() - { - return $this->orderRequest; - } - - /** - * @param OrderRequest $orderRequest - * @return CreatePayment - */ - public function setOrderRequest($orderRequest) - { - $this->orderRequest = $orderRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return CreatePayment - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return CustomerRequest - */ - public function getCustomerRequest() - { - return $this->customerRequest; - } - - /** - * @param CustomerRequest $customerRequest - * @return CreatePayment - */ - public function setCustomerRequest($customerRequest) - { - $this->customerRequest = $customerRequest; - return $this; - } - - /** - * @return TechRequest - */ - public function getTechRequest() - { - return $this->techRequest; - } - - /** - * @param TechRequest $techRequest - * @return CreatePayment - */ - public function setTechRequest($techRequest) - { - $this->techRequest = $techRequest; - return $this; - } - - /** - * @return ShoppingCartRequest - */ - public function getShoppingCartRequest() - { - return $this->shoppingCartRequest; - } - - /** - * @param ShoppingCartRequest $shoppingCartRequest - * @return CreatePayment - */ - public function setShoppingCartRequest($shoppingCartRequest) - { - $this->shoppingCartRequest = $shoppingCartRequest; - return $this; - } - - /** - * @return ExtendedResponseRequest - */ - public function getExtendedResponseRequest() - { - return $this->extendedResponseRequest; - } - - /** - * @param ExtendedResponseRequest $extendedResponseRequest - * @return CreatePayment - */ - public function setExtendedResponseRequest($extendedResponseRequest) - { - $this->extendedResponseRequest = $extendedResponseRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePaymentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePaymentResponse.php deleted file mode 100644 index 38b565fb..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createPaymentResult; - } - - /** - * @param CreatePaymentResult $createPaymentResult - * @return CreatePaymentResponse - */ - public function setCreatePaymentResult($createPaymentResult) - { - $this->createPaymentResult = $createPaymentResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePaymentResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePaymentResult.php deleted file mode 100644 index 3feff044..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreatePaymentResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreatePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreatePaymentResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreatePaymentResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreatePaymentResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreatePaymentResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreatePaymentResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreatePaymentResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreatePaymentResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreatePaymentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreatePaymentResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreatePaymentResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreatePaymentResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreatePaymentResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscription.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscription.php deleted file mode 100644 index 40326a09..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscription.php +++ /dev/null @@ -1,107 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreateSubscription - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return OrderRequest - */ - public function getOrderRequest() - { - return $this->orderRequest; - } - - /** - * @param OrderRequest $orderRequest - * @return CreateSubscription - */ - public function setOrderRequest($orderRequest) - { - $this->orderRequest = $orderRequest; - return $this; - } - - /** - * @return SubscriptionRequest - */ - public function getSubscriptionRequest() - { - return $this->subscriptionRequest; - } - - /** - * @param SubscriptionRequest $subscriptionRequest - * @return CreateSubscription - */ - public function setSubscriptionRequest($subscriptionRequest) - { - $this->subscriptionRequest = $subscriptionRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return CreateSubscription - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscriptionResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscriptionResponse.php deleted file mode 100644 index 2010ae7b..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscriptionResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createSubscriptionResult; - } - - /** - * @param CreateSubscriptionResult $createSubscriptionResult - * @return CreateSubscriptionResponse - */ - public function setCreateSubscriptionResult($createSubscriptionResult) - { - $this->createSubscriptionResult = $createSubscriptionResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscriptionResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscriptionResult.php deleted file mode 100644 index 9ea68a9d..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateSubscriptionResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreateSubscriptionResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreateSubscriptionResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreateSubscriptionResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreateSubscriptionResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreateSubscriptionResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreateSubscriptionResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreateSubscriptionResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreateSubscriptionResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreateSubscriptionResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreateSubscriptionResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreateSubscriptionResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreateSubscriptionResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreateSubscriptionResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateToken.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateToken.php deleted file mode 100644 index a9a17dea..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateToken.php +++ /dev/null @@ -1,107 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreateToken - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return CreateToken - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return CustomerRequest - */ - public function getCustomerRequest() - { - return $this->customerRequest; - } - - /** - * @param CustomerRequest $customerRequest - * @return CreateToken - */ - public function setCustomerRequest($customerRequest) - { - $this->customerRequest = $customerRequest; - return $this; - } - - /** - * @return TokenRequest - */ - public function getTokenRequest() - { - return $this->tokenRequest; - } - - /** - * @param TokenRequest $tokenRequest - * @return CreateToken - */ - public function setTokenRequest($tokenRequest) - { - $this->tokenRequest = $tokenRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIban.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIban.php deleted file mode 100644 index ec84fcf8..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIban.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreateTokenByIban - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return IbanRequest - */ - public function getIbanRequest() - { - return $this->ibanRequest; - } - - /** - * @param IbanRequest $ibanRequest - * @return CreateTokenByIban - */ - public function setIbanRequest($ibanRequest) - { - $this->ibanRequest = $ibanRequest; - return $this; - } - - /** - * @return CustomerRequest - */ - public function getCustomerRequest() - { - return $this->customerRequest; - } - - /** - * @param CustomerRequest $customerRequest - * @return CreateTokenByIban - */ - public function setCustomerRequest($customerRequest) - { - $this->customerRequest = $customerRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIbanResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIbanResponse.php deleted file mode 100644 index d72261cd..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIbanResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createTokenByIbanResult; - } - - /** - * @param CreateTokenByIbanResult $createTokenByIbanResult - * @return CreateTokenByIbanResponse - */ - public function setCreateTokenByIbanResult($createTokenByIbanResult) - { - $this->createTokenByIbanResult = $createTokenByIbanResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIbanResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIbanResult.php deleted file mode 100644 index 8d5e4f34..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenByIbanResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreateTokenByIbanResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreateTokenByIbanResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreateTokenByIbanResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreateTokenByIbanResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreateTokenByIbanResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreateTokenByIbanResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreateTokenByIbanResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreateTokenByIbanResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreateTokenByIbanResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreateTokenByIbanResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreateTokenByIbanResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreateTokenByIbanResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreateTokenByIbanResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransaction.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransaction.php deleted file mode 100644 index 4a3f1cea..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransaction.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreateTokenFromTransaction - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return CreateTokenFromTransaction - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CreateTokenFromTransaction - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransactionResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransactionResponse.php deleted file mode 100644 index c1e58533..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransactionResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createTokenFromTransactionResult; - } - - /** - * @param CreateTokenFromTransactionResult $createTokenFromTransactionResult - * @return CreateTokenFromTransactionResponse - */ - public function setCreateTokenFromTransactionResult($createTokenFromTransactionResult) - { - $this->createTokenFromTransactionResult = $createTokenFromTransactionResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransactionResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransactionResult.php deleted file mode 100644 index 64ab7379..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenFromTransactionResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreateTokenFromTransactionResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreateTokenFromTransactionResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreateTokenFromTransactionResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreateTokenFromTransactionResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreateTokenFromTransactionResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreateTokenFromTransactionResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreateTokenFromTransactionResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreateTokenFromTransactionResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreateTokenFromTransactionResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreateTokenFromTransactionResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreateTokenFromTransactionResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreateTokenFromTransactionResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreateTokenFromTransactionResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenResponse.php deleted file mode 100644 index a9ecb751..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createTokenResult; - } - - /** - * @param CreateTokenResult $createTokenResult - * @return CreateTokenResponse - */ - public function setCreateTokenResult($createTokenResult) - { - $this->createTokenResult = $createTokenResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenResult.php deleted file mode 100644 index 2216968e..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CreateTokenResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreateTokenResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreateTokenResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreateTokenResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreateTokenResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreateTokenResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreateTokenResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreateTokenResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreateTokenResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreateTokenResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreateTokenResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreateTokenResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreateTokenResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreateTokenResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CustStatus.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CustStatus.php deleted file mode 100644 index 30399c48..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CustStatus.php +++ /dev/null @@ -1,18 +0,0 @@ -billingDetails; - } - - /** - * @param BillingDetailsRequest $billingDetails - * @return CustomerRequest - */ - public function setBillingDetails($billingDetails) - { - $this->billingDetails = $billingDetails; - return $this; - } - - /** - * @return ShippingDetailsRequest - */ - public function getShippingDetails() - { - return $this->shippingDetails; - } - - /** - * @param ShippingDetailsRequest $shippingDetails - * @return CustomerRequest - */ - public function setShippingDetails($shippingDetails) - { - $this->shippingDetails = $shippingDetails; - return $this; - } - - /** - * @return ExtraDetailsRequest - */ - public function getExtraDetails() - { - return $this->extraDetails; - } - - /** - * @param ExtraDetailsRequest $extraDetails - * @return CustomerRequest - */ - public function setExtraDetails($extraDetails) - { - $this->extraDetails = $extraDetails; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CustomerResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CustomerResponse.php deleted file mode 100644 index c1acd1e8..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/CustomerResponse.php +++ /dev/null @@ -1,84 +0,0 @@ -billingDetails; - } - - /** - * @param BillingDetailsResponse $billingDetails - * @return CustomerResponse - */ - public function setBillingDetails($billingDetails) - { - $this->billingDetails = $billingDetails; - return $this; - } - - /** - * @return ShippingDetailsResponse - */ - public function getShippingDetails() - { - return $this->shippingDetails; - } - - /** - * @param ShippingDetailsResponse $shippingDetails - * @return CustomerResponse - */ - public function setShippingDetails($shippingDetails) - { - $this->shippingDetails = $shippingDetails; - return $this; - } - - /** - * @return ExtraDetailsResponse - */ - public function getExtraDetails() - { - return $this->extraDetails; - } - - /** - * @param ExtraDetailsResponse $extraDetails - * @return CustomerResponse - */ - public function setExtraDetails($extraDetails) - { - $this->extraDetails = $extraDetails; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DeliverySpeed.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DeliverySpeed.php deleted file mode 100644 index 2b759b04..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DeliverySpeed.php +++ /dev/null @@ -1,19 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return DuplicatePayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return DuplicatePayment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } - - /** - * @return OrderRequest - */ - public function getOrderRequest() - { - return $this->orderRequest; - } - - /** - * @param OrderRequest $orderRequest - * @return DuplicatePayment - */ - public function setOrderRequest($orderRequest) - { - $this->orderRequest = $orderRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return DuplicatePayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DuplicatePaymentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DuplicatePaymentResponse.php deleted file mode 100644 index e05d53f1..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DuplicatePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -duplicatePaymentResult; - } - - /** - * @param DuplicatePaymentResult $duplicatePaymentResult - * @return DuplicatePaymentResponse - */ - public function setDuplicatePaymentResult($duplicatePaymentResult) - { - $this->duplicatePaymentResult = $duplicatePaymentResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DuplicatePaymentResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DuplicatePaymentResult.php deleted file mode 100644 index 78020fa2..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/DuplicatePaymentResult.php +++ /dev/null @@ -1,268 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return DuplicatePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return DuplicatePaymentResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return DuplicatePaymentResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return DuplicatePaymentResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return DuplicatePaymentResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return DuplicatePaymentResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return DuplicatePaymentResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return DuplicatePaymentResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return DuplicatePaymentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return DuplicatePaymentResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return DuplicatePaymentResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtInfo.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtInfo.php deleted file mode 100644 index 070678de..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtInfo.php +++ /dev/null @@ -1,61 +0,0 @@ -key; - } - - /** - * @param string $key - * @return ExtInfo - */ - public function setKey($key) - { - $this->key = $key; - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * @param string $value - * @return ExtInfo - */ - public function setValue($value) - { - $this->value = $value; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtendedResponseRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtendedResponseRequest.php deleted file mode 100644 index c807cd87..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtendedResponseRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -isNsuRequested; - } - - /** - * @param boolean $isNsuRequested - * @return ExtendedResponseRequest - */ - public function setIsNsuRequested($isNsuRequested) - { - $this->isNsuRequested = $isNsuRequested; - return $this; - } - - /** - * @return boolean - */ - public function getIsWalletRequested() - { - return $this->isWalletRequested; - } - - /** - * @param boolean $isWalletRequested - * @return ExtendedResponseRequest - */ - public function setIsWalletRequested($isWalletRequested) - { - $this->isWalletRequested = $isWalletRequested; - return $this; - } - - /** - * @return boolean - */ - public function getIsBankLabelRequested() - { - return $this->isBankLabelRequested; - } - - /** - * @param boolean $isBankLabelRequested - * @return ExtendedResponseRequest - */ - public function setIsBankLabelRequested($isBankLabelRequested) - { - $this->isBankLabelRequested = $isBankLabelRequested; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraDetailsRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraDetailsRequest.php deleted file mode 100644 index 56265d59..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraDetailsRequest.php +++ /dev/null @@ -1,61 +0,0 @@ -ipAddress; - } - - /** - * @param string $ipAddress - * @return ExtraDetailsRequest - */ - public function setIpAddress($ipAddress) - { - $this->ipAddress = $ipAddress; - return $this; - } - - /** - * @return string - */ - public function getFingerPrintId() - { - return $this->fingerPrintId; - } - - /** - * @param string $fingerPrintId - * @return ExtraDetailsRequest - */ - public function setFingerPrintId($fingerPrintId) - { - $this->fingerPrintId = $fingerPrintId; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraDetailsResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraDetailsResponse.php deleted file mode 100644 index a70d0ca2..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -ipAddress; - } - - /** - * @param string $ipAddress - * @return ExtraDetailsResponse - */ - public function setIpAddress($ipAddress) - { - $this->ipAddress = $ipAddress; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraResponse.php deleted file mode 100644 index 4b6223f8..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ExtraResponse.php +++ /dev/null @@ -1,84 +0,0 @@ -paymentOptionCode; - } - - /** - * @param string $paymentOptionCode - * @return ExtraResponse - */ - public function setPaymentOptionCode($paymentOptionCode) - { - $this->paymentOptionCode = $paymentOptionCode; - return $this; - } - - /** - * @return int - */ - public function getPaymentOptionOccNumber() - { - return $this->paymentOptionOccNumber; - } - - /** - * @param int $paymentOptionOccNumber - * @return ExtraResponse - */ - public function setPaymentOptionOccNumber($paymentOptionOccNumber) - { - $this->paymentOptionOccNumber = $paymentOptionOccNumber; - return $this; - } - - /** - * @return string - */ - public function getBoletoPdfUrl() - { - return $this->boletoPdfUrl; - } - - /** - * @param string $boletoPdfUrl - * @return ExtraResponse - */ - public function setBoletoPdfUrl($boletoPdfUrl) - { - $this->boletoPdfUrl = $boletoPdfUrl; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPayments.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPayments.php deleted file mode 100644 index 4547798c..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPayments.php +++ /dev/null @@ -1,38 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return FindPayments - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPaymentsResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPaymentsResponse.php deleted file mode 100644 index 434a07a9..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPaymentsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -findPaymentsResult; - } - - /** - * @param FindPaymentsResult $findPaymentsResult - * @return FindPaymentsResponse - */ - public function setFindPaymentsResult($findPaymentsResult) - { - $this->findPaymentsResult = $findPaymentsResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPaymentsResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPaymentsResult.php deleted file mode 100644 index 45b7934b..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FindPaymentsResult.php +++ /dev/null @@ -1,84 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return FindPaymentsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return FindPaymentsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return TransactionItem - */ - public function getTransactionItem() - { - return $this->transactionItem; - } - - /** - * @param TransactionItem $transactionItem - * @return FindPaymentsResult - */ - public function setTransactionItem($transactionItem) - { - $this->transactionItem = $transactionItem; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FraudManagementResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FraudManagementResponse.php deleted file mode 100644 index a15b4d77..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/FraudManagementResponse.php +++ /dev/null @@ -1,84 +0,0 @@ -riskControl; - } - - /** - * @param RiskControl[] $riskControl - * @return FraudManagementResponse - */ - public function setRiskControl(array $riskControl = null) - { - $this->riskControl = $riskControl; - return $this; - } - - /** - * @return RiskAnalysis[] - */ - public function getRiskAnalysis() - { - return $this->riskAnalysis; - } - - /** - * @param RiskAnalysis[] $riskAnalysis - * @return FraudManagementResponse - */ - public function setRiskAnalysis(array $riskAnalysis = null) - { - $this->riskAnalysis = $riskAnalysis; - return $this; - } - - /** - * @return RiskAssessments - */ - public function getRiskAssessments() - { - return $this->riskAssessments; - } - - /** - * @param RiskAssessments $riskAssessments - * @return FraudManagementResponse - */ - public function setRiskAssessments($riskAssessments) - { - $this->riskAssessments = $riskAssessments; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetails.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetails.php deleted file mode 100644 index 439d9a81..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetails.php +++ /dev/null @@ -1,61 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return GetPaymentDetails - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return ExtendedResponseRequest - */ - public function getExtendedResponseRequest() - { - return $this->extendedResponseRequest; - } - - /** - * @param ExtendedResponseRequest $extendedResponseRequest - * @return GetPaymentDetails - */ - public function setExtendedResponseRequest($extendedResponseRequest) - { - $this->extendedResponseRequest = $extendedResponseRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetailsResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetailsResponse.php deleted file mode 100644 index 7b61a74f..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -getPaymentDetailsResult; - } - - /** - * @param GetPaymentDetailsResult $getPaymentDetailsResult - * @return GetPaymentDetailsResponse - */ - public function setGetPaymentDetailsResult($getPaymentDetailsResult) - { - $this->getPaymentDetailsResult = $getPaymentDetailsResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetailsResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetailsResult.php deleted file mode 100644 index 6c100323..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentDetailsResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return GetPaymentDetailsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return GetPaymentDetailsResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return GetPaymentDetailsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return GetPaymentDetailsResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return GetPaymentDetailsResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return GetPaymentDetailsResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return GetPaymentDetailsResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return GetPaymentDetailsResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return GetPaymentDetailsResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return GetPaymentDetailsResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return GetPaymentDetailsResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return GetPaymentDetailsResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return TokenResponse - */ - public function getTokenResponse() - { - return $this->tokenResponse; - } - - /** - * @param TokenResponse $tokenResponse - * @return GetPaymentDetailsResult - */ - public function setTokenResponse($tokenResponse) - { - $this->tokenResponse = $tokenResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentUuid.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentUuid.php deleted file mode 100644 index d0cb8bbf..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentUuid.php +++ /dev/null @@ -1,38 +0,0 @@ -legacyTransactionKeyRequest; - } - - /** - * @param LegacyTransactionKeyRequest $legacyTransactionKeyRequest - * @return GetPaymentUuid - */ - public function setLegacyTransactionKeyRequest($legacyTransactionKeyRequest) - { - $this->legacyTransactionKeyRequest = $legacyTransactionKeyRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentUuidResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentUuidResponse.php deleted file mode 100644 index 22f5e066..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetPaymentUuidResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -legacyTransactionKeyResult; - } - - /** - * @param LegacyTransactionKeyResult $legacyTransactionKeyResult - * @return GetPaymentUuidResponse - */ - public function setLegacyTransactionKeyResult($legacyTransactionKeyResult) - { - $this->legacyTransactionKeyResult = $legacyTransactionKeyResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetails.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetails.php deleted file mode 100644 index 77f1c1f9..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetails.php +++ /dev/null @@ -1,38 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return GetSubscriptionDetails - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetailsResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetailsResponse.php deleted file mode 100644 index d40c273b..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -getSubscriptionDetailsResult; - } - - /** - * @param GetSubscriptionDetailsResult $getSubscriptionDetailsResult - * @return GetSubscriptionDetailsResponse - */ - public function setGetSubscriptionDetailsResult($getSubscriptionDetailsResult) - { - $this->getSubscriptionDetailsResult = $getSubscriptionDetailsResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetailsResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetailsResult.php deleted file mode 100644 index 91f2f04f..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetSubscriptionDetailsResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return GetSubscriptionDetailsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return GetSubscriptionDetailsResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return GetSubscriptionDetailsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return GetSubscriptionDetailsResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return GetSubscriptionDetailsResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return GetSubscriptionDetailsResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return GetSubscriptionDetailsResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return GetSubscriptionDetailsResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return GetSubscriptionDetailsResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return GetSubscriptionDetailsResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return GetSubscriptionDetailsResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return GetSubscriptionDetailsResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return TokenResponse - */ - public function getTokenResponse() - { - return $this->tokenResponse; - } - - /** - * @param TokenResponse $tokenResponse - * @return GetSubscriptionDetailsResult - */ - public function setTokenResponse($tokenResponse) - { - $this->tokenResponse = $tokenResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetails.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetails.php deleted file mode 100644 index f5c0ad04..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetails.php +++ /dev/null @@ -1,38 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return GetTokenDetails - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetailsResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetailsResponse.php deleted file mode 100644 index 65f97086..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -getTokenDetailsResult; - } - - /** - * @param GetTokenDetailsResult $getTokenDetailsResult - * @return GetTokenDetailsResponse - */ - public function setGetTokenDetailsResult($getTokenDetailsResult) - { - $this->getTokenDetailsResult = $getTokenDetailsResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetailsResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetailsResult.php deleted file mode 100644 index 39b92894..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/GetTokenDetailsResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return GetTokenDetailsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return GetTokenDetailsResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return GetTokenDetailsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return GetTokenDetailsResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return GetTokenDetailsResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return GetTokenDetailsResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return GetTokenDetailsResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return GetTokenDetailsResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return GetTokenDetailsResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return GetTokenDetailsResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return GetTokenDetailsResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return GetTokenDetailsResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return TokenResponse - */ - public function getTokenResponse() - { - return $this->tokenResponse; - } - - /** - * @param TokenResponse $tokenResponse - * @return GetTokenDetailsResult - */ - public function setTokenResponse($tokenResponse) - { - $this->tokenResponse = $tokenResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/IbanRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/IbanRequest.php deleted file mode 100644 index f29243d2..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/IbanRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -firstName; - } - - /** - * @param string $firstName - * @return IbanRequest - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return IbanRequest - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getIban() - { - return $this->iban; - } - - /** - * @param string $iban - * @return IbanRequest - */ - public function setIban($iban) - { - $this->iban = $iban; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return IbanRequest - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/LegacyTransactionKeyRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/LegacyTransactionKeyRequest.php deleted file mode 100644 index a8980a58..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/LegacyTransactionKeyRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -transactionId; - } - - /** - * @param string $transactionId - * @return LegacyTransactionKeyRequest - */ - public function setTransactionId($transactionId) - { - $this->transactionId = $transactionId; - return $this; - } - - /** - * @return int - */ - public function getSequenceNumber() - { - return $this->sequenceNumber; - } - - /** - * @param int $sequenceNumber - * @return LegacyTransactionKeyRequest - */ - public function setSequenceNumber($sequenceNumber) - { - $this->sequenceNumber = $sequenceNumber; - return $this; - } - - /** - * @return \DateTime - */ - public function getCreationDate() - { - if ($this->creationDate == null) { - return null; - } else { - try { - return new \DateTime($this->creationDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $creationDate - * @return LegacyTransactionKeyRequest - */ - public function setCreationDate(\DateTime $creationDate = null) - { - if ($creationDate == null) { - $this->creationDate = null; - } else { - $this->creationDate = $creationDate->format(\DateTime::ATOM); - } - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/LegacyTransactionKeyResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/LegacyTransactionKeyResult.php deleted file mode 100644 index b452590f..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/LegacyTransactionKeyResult.php +++ /dev/null @@ -1,61 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return LegacyTransactionKeyResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return LegacyTransactionKeyResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/MarkResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/MarkResponse.php deleted file mode 100644 index fa4c88ca..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/MarkResponse.php +++ /dev/null @@ -1,142 +0,0 @@ -amount; - } - - /** - * @param int $amount - * @return MarkResponse - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return MarkResponse - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return \DateTime - */ - public function getDate() - { - if ($this->date == null) { - return null; - } else { - try { - return new \DateTime($this->date); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $date - * @return MarkResponse - */ - public function setDate(\DateTime $date = null) - { - if ($date == null) { - $this->date = null; - } else { - $this->date = $date->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getNumber() - { - return $this->number; - } - - /** - * @param string $number - * @return MarkResponse - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * @param int $result - * @return MarkResponse - */ - public function setResult($result) - { - $this->result = $result; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/MpiExtensionRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/MpiExtensionRequest.php deleted file mode 100644 index b6d10f61..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/MpiExtensionRequest.php +++ /dev/null @@ -1,38 +0,0 @@ -extensionData; - } - - /** - * @param ExtInfo[] $extensionData - * @return MpiExtensionRequest - */ - public function setExtensionData(array $extensionData = null) - { - $this->extensionData = $extensionData; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/OrderRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/OrderRequest.php deleted file mode 100644 index dd0cdab6..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/OrderRequest.php +++ /dev/null @@ -1,61 +0,0 @@ -orderId; - } - - /** - * @param string $orderId - * @return OrderRequest - */ - public function setOrderId($orderId) - { - $this->orderId = $orderId; - return $this; - } - - /** - * @return ExtInfo[] - */ - public function getExtInfo() - { - return $this->extInfo; - } - - /** - * @param ExtInfo[] $extInfo - * @return OrderRequest - */ - public function setExtInfo(array $extInfo = null) - { - $this->extInfo = $extInfo; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/OrderResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/OrderResponse.php deleted file mode 100644 index 6f0dec90..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/OrderResponse.php +++ /dev/null @@ -1,61 +0,0 @@ -orderId; - } - - /** - * @param string $orderId - * @return OrderResponse - */ - public function setOrderId($orderId) - { - $this->orderId = $orderId; - return $this; - } - - /** - * @return ExtInfo[] - */ - public function getExtInfo() - { - return $this->extInfo; - } - - /** - * @param ExtInfo[] $extInfo - * @return OrderResponse - */ - public function setExtInfo(array $extInfo = null) - { - $this->extInfo = $extInfo; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentRequest.php deleted file mode 100644 index d16f1755..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentRequest.php +++ /dev/null @@ -1,303 +0,0 @@ -transactionId; - } - - /** - * @param string $transactionId - * @return PaymentRequest - */ - public function setTransactionId($transactionId) - { - $this->transactionId = $transactionId; - return $this; - } - - /** - * @return string - */ - public function getRetryUuid() - { - return $this->retryUuid; - } - - /** - * @param string $retryUuid - * @return PaymentRequest - */ - public function setRetryUuid($retryUuid) - { - $this->retryUuid = $retryUuid; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return PaymentRequest - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return PaymentRequest - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return \DateTime - */ - public function getExpectedCaptureDate() - { - if ($this->expectedCaptureDate == null) { - return null; - } else { - try { - return new \DateTime($this->expectedCaptureDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $expectedCaptureDate - * @return PaymentRequest - */ - public function setExpectedCaptureDate(\DateTime $expectedCaptureDate = null) - { - if ($expectedCaptureDate == null) { - $this->expectedCaptureDate = null; - } else { - $this->expectedCaptureDate = $expectedCaptureDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getManualValidation() - { - return $this->manualValidation; - } - - /** - * @param int $manualValidation - * @return PaymentRequest - */ - public function setManualValidation($manualValidation) - { - $this->manualValidation = $manualValidation; - return $this; - } - - /** - * @return string - */ - public function getPaymentOptionCode() - { - return $this->paymentOptionCode; - } - - /** - * @param string $paymentOptionCode - * @return PaymentRequest - */ - public function setPaymentOptionCode($paymentOptionCode) - { - $this->paymentOptionCode = $paymentOptionCode; - return $this; - } - - /** - * @return string - */ - public function getAcquirerTransientData() - { - return $this->acquirerTransientData; - } - - /** - * @param string $acquirerTransientData - * @return PaymentRequest - */ - public function setAcquirerTransientData($acquirerTransientData) - { - $this->acquirerTransientData = $acquirerTransientData; - return $this; - } - - /** - * @return int - */ - public function getFirstInstallmentDelay() - { - return $this->firstInstallmentDelay; - } - - /** - * @param int $firstInstallmentDelay - * @return PaymentRequest - */ - public function setFirstInstallmentDelay($firstInstallmentDelay) - { - $this->firstInstallmentDelay = $firstInstallmentDelay; - return $this; - } - - /** - * @return string - */ - public function getOverridePaymentCinematic() - { - return $this->overridePaymentCinematic; - } - - /** - * @param string $overridePaymentCinematic - * @return PaymentRequest - */ - public function setOverridePaymentCinematic($overridePaymentCinematic) - { - $this->overridePaymentCinematic = $overridePaymentCinematic; - return $this; - } - - /** - * @return string - */ - public function getTaxRate() - { - return $this->taxRate; - } - - /** - * @param string $taxRate - * @return PaymentRequest - */ - public function setTaxRate($taxRate) - { - $this->taxRate = $taxRate; - return $this; - } - - /** - * @return int - */ - public function getTaxAmount() - { - return $this->taxAmount; - } - - /** - * @param int $taxAmount - * @return PaymentRequest - */ - public function setTaxAmount($taxAmount) - { - $this->taxAmount = $taxAmount; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentResponse.php deleted file mode 100644 index 8207f48c..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentResponse.php +++ /dev/null @@ -1,499 +0,0 @@ -transactionId; - } - - /** - * @param string $transactionId - * @return PaymentResponse - */ - public function setTransactionId($transactionId) - { - $this->transactionId = $transactionId; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return PaymentResponse - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return PaymentResponse - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return int - */ - public function getEffectiveAmount() - { - return $this->effectiveAmount; - } - - /** - * @param int $effectiveAmount - * @return PaymentResponse - */ - public function setEffectiveAmount($effectiveAmount) - { - $this->effectiveAmount = $effectiveAmount; - return $this; - } - - /** - * @return int - */ - public function getEffectiveCurrency() - { - return $this->effectiveCurrency; - } - - /** - * @param int $effectiveCurrency - * @return PaymentResponse - */ - public function setEffectiveCurrency($effectiveCurrency) - { - $this->effectiveCurrency = $effectiveCurrency; - return $this; - } - - /** - * @return \DateTime - */ - public function getExpectedCaptureDate() - { - if ($this->expectedCaptureDate == null) { - return null; - } else { - try { - return new \DateTime($this->expectedCaptureDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $expectedCaptureDate - * @return PaymentResponse - */ - public function setExpectedCaptureDate(\DateTime $expectedCaptureDate = null) - { - if ($expectedCaptureDate == null) { - $this->expectedCaptureDate = null; - } else { - $this->expectedCaptureDate = $expectedCaptureDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getManualValidation() - { - return $this->manualValidation; - } - - /** - * @param int $manualValidation - * @return PaymentResponse - */ - public function setManualValidation($manualValidation) - { - $this->manualValidation = $manualValidation; - return $this; - } - - /** - * @return int - */ - public function getOperationType() - { - return $this->operationType; - } - - /** - * @param int $operationType - * @return PaymentResponse - */ - public function setOperationType($operationType) - { - $this->operationType = $operationType; - return $this; - } - - /** - * @return \DateTime - */ - public function getCreationDate() - { - if ($this->creationDate == null) { - return null; - } else { - try { - return new \DateTime($this->creationDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $creationDate - * @return PaymentResponse - */ - public function setCreationDate(\DateTime $creationDate = null) - { - if ($creationDate == null) { - $this->creationDate = null; - } else { - $this->creationDate = $creationDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getExternalTransactionId() - { - return $this->externalTransactionId; - } - - /** - * @param string $externalTransactionId - * @return PaymentResponse - */ - public function setExternalTransactionId($externalTransactionId) - { - $this->externalTransactionId = $externalTransactionId; - return $this; - } - - /** - * @return string - */ - public function getLiabilityShift() - { - return $this->liabilityShift; - } - - /** - * @param string $liabilityShift - * @return PaymentResponse - */ - public function setLiabilityShift($liabilityShift) - { - $this->liabilityShift = $liabilityShift; - return $this; - } - - /** - * @return string - */ - public function getTransactionUuid() - { - return $this->transactionUuid; - } - - /** - * @param string $transactionUuid - * @return PaymentResponse - */ - public function setTransactionUuid($transactionUuid) - { - $this->transactionUuid = $transactionUuid; - return $this; - } - - /** - * @return int - */ - public function getSequenceNumber() - { - return $this->sequenceNumber; - } - - /** - * @param int $sequenceNumber - * @return PaymentResponse - */ - public function setSequenceNumber($sequenceNumber) - { - $this->sequenceNumber = $sequenceNumber; - return $this; - } - - /** - * @return PaymentType - */ - public function getPaymentType() - { - return $this->paymentType; - } - - /** - * @param PaymentType $paymentType - * @return PaymentResponse - */ - public function setPaymentType($paymentType) - { - $this->paymentType = $paymentType; - return $this; - } - - /** - * @return string - */ - public function getNsu() - { - return $this->nsu; - } - - /** - * @param string $nsu - * @return PaymentResponse - */ - public function setNsu($nsu) - { - $this->nsu = $nsu; - return $this; - } - - /** - * @return int - */ - public function getPaymentError() - { - return $this->paymentError; - } - - /** - * @param int $paymentError - * @return PaymentResponse - */ - public function setPaymentError($paymentError) - { - $this->paymentError = $paymentError; - return $this; - } - - /** - * @return string - */ - public function getWallet() - { - return $this->wallet; - } - - /** - * @param string $wallet - * @return PaymentResponse - */ - public function setWallet($wallet) - { - $this->wallet = $wallet; - return $this; - } - - /** - * @return int - */ - public function getPreTaxAmount() - { - return $this->preTaxAmount; - } - - /** - * @param int $preTaxAmount - * @return PaymentResponse - */ - public function setPreTaxAmount($preTaxAmount) - { - $this->preTaxAmount = $preTaxAmount; - return $this; - } - - /** - * @return string - */ - public function getTaxRate() - { - return $this->taxRate; - } - - /** - * @param string $taxRate - * @return PaymentResponse - */ - public function setTaxRate($taxRate) - { - $this->taxRate = $taxRate; - return $this; - } - - /** - * @return int - */ - public function getTaxAmount() - { - return $this->taxAmount; - } - - /** - * @param int $taxAmount - * @return PaymentResponse - */ - public function setTaxAmount($taxAmount) - { - $this->taxAmount = $taxAmount; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentType.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentType.php deleted file mode 100644 index 3c598a4f..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/PaymentType.php +++ /dev/null @@ -1,21 +0,0 @@ -uuid; - } - - /** - * @param string $uuid - * @return QueryRequest - */ - public function setUuid($uuid) - { - $this->uuid = $uuid; - return $this; - } - - /** - * @return string - */ - public function getOrderId() - { - return $this->orderId; - } - - /** - * @param string $orderId - * @return QueryRequest - */ - public function setOrderId($orderId) - { - $this->orderId = $orderId; - return $this; - } - - /** - * @return string - */ - public function getSubscriptionId() - { - return $this->subscriptionId; - } - - /** - * @param string $subscriptionId - * @return QueryRequest - */ - public function setSubscriptionId($subscriptionId) - { - $this->subscriptionId = $subscriptionId; - return $this; - } - - /** - * @return string - */ - public function getPaymentToken() - { - return $this->paymentToken; - } - - /** - * @param string $paymentToken - * @return QueryRequest - */ - public function setPaymentToken($paymentToken) - { - $this->paymentToken = $paymentToken; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateToken.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateToken.php deleted file mode 100644 index d803fe44..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateToken.php +++ /dev/null @@ -1,38 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return ReactivateToken - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateTokenResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateTokenResponse.php deleted file mode 100644 index 23575a9a..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateTokenResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -reactivateTokenResult; - } - - /** - * @param ReactivateTokenResult $reactivateTokenResult - * @return ReactivateTokenResponse - */ - public function setReactivateTokenResult($reactivateTokenResult) - { - $this->reactivateTokenResult = $reactivateTokenResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateTokenResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateTokenResult.php deleted file mode 100644 index a2445fdd..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ReactivateTokenResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return ReactivateTokenResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPayment.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPayment.php deleted file mode 100644 index 1f949e8a..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPayment.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return RefundPayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return RefundPayment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return RefundPayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPaymentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPaymentResponse.php deleted file mode 100644 index fd5f56d4..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -refundPaymentResult; - } - - /** - * @param RefundPaymentResult $refundPaymentResult - * @return RefundPaymentResponse - */ - public function setRefundPaymentResult($refundPaymentResult) - { - $this->refundPaymentResult = $refundPaymentResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPaymentResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPaymentResult.php deleted file mode 100644 index 53ae7ecc..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RefundPaymentResult.php +++ /dev/null @@ -1,268 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return RefundPaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return RefundPaymentResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return RefundPaymentResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return RefundPaymentResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return RefundPaymentResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return RefundPaymentResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return RefundPaymentResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return RefundPaymentResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return RefundPaymentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return RefundPaymentResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return RefundPaymentResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ResultWrapper.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ResultWrapper.php deleted file mode 100644 index 3a7ec372..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ResultWrapper.php +++ /dev/null @@ -1,214 +0,0 @@ -response['result'] = sprintf('%02d', $commonResponse->getResponseCode()); - $this->response['extra_result'] = ''; // It is directly returned in responseCodeDetail. - $this->response['message'] = $commonResponse->getResponseCodeDetail(); - $this->response['trans_status'] = $commonResponse->getTransactionStatusLabel(); - - if ($paymentResponse) { - $this->response['warranty_result'] = $paymentResponse->getLiabilityShift(); - $this->response['trans_id'] = $paymentResponse->getTransactionId(); - $this->response['trans_uuid'] = $paymentResponse->getTransactionUuid(); - $this->response['sequence_number'] = $paymentResponse->getSequenceNumber(); - $this->response['operation_type'] = $paymentResponse->getOperationType() == 1 ? 'CREDIT' : 'DEBIT'; - - $this->response['currency'] = $paymentResponse->getCurrency(); - $this->response['amount'] = $paymentResponse->getAmount(); - $this->response['effective_amount'] = $paymentResponse->getEffectiveAmount(); - - $date = $paymentResponse->getExpectedCaptureDate() ? - $paymentResponse->getExpectedCaptureDate()->getTimestamp() : time(); - $this->response['presentation_date'] = date('YmdHis', $date); - } - - if ($authorizationResponse) { - $this->response['auth_result'] = sprintf('%02d', $authorizationResponse->getResult()); - } - - if ($cardResponse) { - $this->response['card_brand'] = $cardResponse->getBrand(); - $this->response['card_number'] = $cardResponse->getNumber(); - $this->response['expiry_month'] = $cardResponse->getExpiryMonth(); - $this->response['expiry_year'] = $cardResponse->getExpiryYear(); - } - - if ($threeDSResponse) { - $this->response['threeds_status'] = $threeDSResponse->getAuthenticationResultData()->getStatus(); - $this->response['threeds_cavv'] = $threeDSResponse->getAuthenticationResultData()->getCavv(); - } - - if ($fraudManagementResponse) { - $this->response['risk_control'] = $fraudManagementResponse->getRiskControl(); - $this->response['risk_assessment_result'] = $fraudManagementResponse->getRiskAssessments() ? - $fraudManagementResponse->getRiskAssessments()->getResults() : ''; - } - } - - /** - * Check if the payment was successful (authorized or captured). - * - * @return boolean - */ - public function isAcceptedPayment() - { - return in_array($this->getTransStatus(), Lyranetwork_Payzen_Model_Api_Api::getSuccessStatuses()) - || $this->isPendingPayment(); - } - - /** - * Check if the payment is waiting confirmation (successful but the amount has not - * been transfered and is not yet guaranteed). - * - * @return boolean - */ - public function isPendingPayment() - { - return in_array($this->getTransStatus(), Lyranetwork_Payzen_Model_Api_Api::getPendingStatuses()); - } - - /** - * Check if the payment process was interrupted by the client. - * - * @return bool - */ - public function isCancelledPayment() - { - return in_array($this->getTransStatus(), Lyranetwork_Payzen_Model_Api_Api::getCancelledStatuses()); - } - - /** - * Check if the payment is to validate manually in the PayZen Back Office. - * - * @return boolean - */ - public function isToValidatePayment() - { - return in_array($this->getTransStatus(), Lyranetwork_Payzen_Model_Api_Api::getToValidateStatuses()); - } - - /** - * Check if the payment is suspected to be fraudulent. - * - * @return boolean - */ - public function isSuspectedFraud() - { - $riskControl = $this->getRiskControl(); - - // At least one control failed. - return in_array('WARNING', $riskControl) || in_array('ERROR', $riskControl); - } - - /** - * Return the risk control result. - * - * @return boolean - */ - public function getRiskControl() - { - $controls = $this->get('risk_control'); - if (! is_array($controls)) { - return array(); - } - - $results = array(); - foreach ($controls as $control) { - $results[$control->getName()] = $control->getResult(); - } - return $results; - } - - /** - * Return the risk assessment result. - * - * @return array[string] - */ - public function getRiskAssessment() - { - $riskAssessment = $this->get('risk_assessment_result'); - if (! isset($riskAssessment) || ! trim($riskAssessment)) { - return array(); - } - - return explode(';', $riskAssessment); - } - - /** - * Return the value of a response parameter. - * - * @param string $name - * @return string - */ - public function get($key) - { - return @$this->response[$key]; - } - - /** - * Return the payment response result. - * - * @return string - */ - public function getResult() - { - return $this->get('result'); - } - - /** - * Return all the payment response results as array. - * - * @return array[string][string] - */ - public function getAllResults() - { - return array( - 'result' => $this->get('result'), - 'extra_result' => $this->get('extra_result'), - 'auth_result' => $this->get('auth_result'), - 'warranty_result' => $this->get('warranty_result') - ); - } - - /** - * Return the payment transaction status. - * - * @return string - */ - public function getTransStatus() - { - return $this->get('trans_status'); - } - - /** - * Return the payment response message. - * - * @return string - */ - public function getMessage() - { - return $this->get('message') . '.'; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskAnalysis.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskAnalysis.php deleted file mode 100644 index f6012c38..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskAnalysis.php +++ /dev/null @@ -1,153 +0,0 @@ -score; - } - - /** - * @param string $score - * @return RiskAnalysis - */ - public function setScore($score) - { - $this->score = $score; - return $this; - } - - /** - * @return string - */ - public function getResultCode() - { - return $this->resultCode; - } - - /** - * @param string $resultCode - * @return RiskAnalysis - */ - public function setResultCode($resultCode) - { - $this->resultCode = $resultCode; - return $this; - } - - /** - * @return RiskAnalysisProcessingStatus - */ - public function getStatus() - { - return $this->status; - } - - /** - * @param RiskAnalysisProcessingStatus $status - * @return RiskAnalysis - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * @return string - */ - public function getRequestId() - { - return $this->requestId; - } - - /** - * @param string $requestId - * @return RiskAnalysis - */ - public function setRequestId($requestId) - { - $this->requestId = $requestId; - return $this; - } - - /** - * @return ExtInfo[] - */ - public function getExtraInfo() - { - return $this->extraInfo; - } - - /** - * @param ExtInfo[] $extraInfo - * @return RiskAnalysis - */ - public function setExtraInfo(array $extraInfo = null) - { - $this->extraInfo = $extraInfo; - return $this; - } - - /** - * @return string - */ - public function getFingerPrintId() - { - return $this->fingerPrintId; - } - - /** - * @param string $fingerPrintId - * @return RiskAnalysis - */ - public function setFingerPrintId($fingerPrintId) - { - $this->fingerPrintId = $fingerPrintId; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskAnalysisProcessingStatus.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskAnalysisProcessingStatus.php deleted file mode 100644 index 579b095a..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskAnalysisProcessingStatus.php +++ /dev/null @@ -1,23 +0,0 @@ -results; - } - - /** - * @param string $results - * @return RiskAssessments - */ - public function setResults($results) - { - $this->results = $results; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskControl.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskControl.php deleted file mode 100644 index b69dc9aa..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/RiskControl.php +++ /dev/null @@ -1,61 +0,0 @@ -name; - } - - /** - * @param string $name - * @return RiskControl - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->result; - } - - /** - * @param string $result - * @return RiskControl - */ - public function setResult($result) - { - $this->result = $result; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SettlementRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SettlementRequest.php deleted file mode 100644 index e16d5440..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SettlementRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -transactionUuids; - } - - /** - * @param string[] $transactionUuids - * @return SettlementRequest - */ - public function setTransactionUuids(array $transactionUuids = null) - { - $this->transactionUuids = $transactionUuids; - return $this; - } - - /** - * @return float - */ - public function getCommission() - { - return $this->commission; - } - - /** - * @param float $commission - * @return SettlementRequest - */ - public function setCommission($commission) - { - $this->commission = $commission; - return $this; - } - - /** - * @return \DateTime - */ - public function getDate() - { - if ($this->date == null) { - return null; - } else { - try { - return new \DateTime($this->date); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $date - * @return SettlementRequest - */ - public function setDate(\DateTime $date = null) - { - if ($date == null) { - $this->date = null; - } else { - $this->date = $date->format(\DateTime::ATOM); - } - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShippingDetailsRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShippingDetailsRequest.php deleted file mode 100644 index 981f44d5..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShippingDetailsRequest.php +++ /dev/null @@ -1,406 +0,0 @@ -type; - } - - /** - * @param CustStatus $type - * @return ShippingDetailsRequest - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * @param string $firstName - * @return ShippingDetailsRequest - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return ShippingDetailsRequest - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getPhoneNumber() - { - return $this->phoneNumber; - } - - /** - * @param string $phoneNumber - * @return ShippingDetailsRequest - */ - public function setPhoneNumber($phoneNumber) - { - $this->phoneNumber = $phoneNumber; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return ShippingDetailsRequest - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * @param string $address - * @return ShippingDetailsRequest - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * @return string - */ - public function getAddress2() - { - return $this->address2; - } - - /** - * @param string $address2 - * @return ShippingDetailsRequest - */ - public function setAddress2($address2) - { - $this->address2 = $address2; - return $this; - } - - /** - * @return string - */ - public function getDistrict() - { - return $this->district; - } - - /** - * @param string $district - * @return ShippingDetailsRequest - */ - public function setDistrict($district) - { - $this->district = $district; - return $this; - } - - /** - * @return string - */ - public function getZipCode() - { - return $this->zipCode; - } - - /** - * @param string $zipCode - * @return ShippingDetailsRequest - */ - public function setZipCode($zipCode) - { - $this->zipCode = $zipCode; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return ShippingDetailsRequest - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * @return ShippingDetailsRequest - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return ShippingDetailsRequest - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getDeliveryCompanyName() - { - return $this->deliveryCompanyName; - } - - /** - * @param string $deliveryCompanyName - * @return ShippingDetailsRequest - */ - public function setDeliveryCompanyName($deliveryCompanyName) - { - $this->deliveryCompanyName = $deliveryCompanyName; - return $this; - } - - /** - * @return DeliverySpeed - */ - public function getShippingSpeed() - { - return $this->shippingSpeed; - } - - /** - * @param DeliverySpeed $shippingSpeed - * @return ShippingDetailsRequest - */ - public function setShippingSpeed($shippingSpeed) - { - $this->shippingSpeed = $shippingSpeed; - return $this; - } - - /** - * @return DeliveryType - */ - public function getShippingMethod() - { - return $this->shippingMethod; - } - - /** - * @param DeliveryType $shippingMethod - * @return ShippingDetailsRequest - */ - public function setShippingMethod($shippingMethod) - { - $this->shippingMethod = $shippingMethod; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return ShippingDetailsRequest - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } - - /** - * @return string - */ - public function getIdentityCode() - { - return $this->identityCode; - } - - /** - * @param string $identityCode - * @return ShippingDetailsRequest - */ - public function setIdentityCode($identityCode) - { - $this->identityCode = $identityCode; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShippingDetailsResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShippingDetailsResponse.php deleted file mode 100644 index 923a3e16..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShippingDetailsResponse.php +++ /dev/null @@ -1,406 +0,0 @@ -type; - } - - /** - * @param CustStatus $type - * @return ShippingDetailsResponse - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * @param string $firstName - * @return ShippingDetailsResponse - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return ShippingDetailsResponse - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getPhoneNumber() - { - return $this->phoneNumber; - } - - /** - * @param string $phoneNumber - * @return ShippingDetailsResponse - */ - public function setPhoneNumber($phoneNumber) - { - $this->phoneNumber = $phoneNumber; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return ShippingDetailsResponse - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * @param string $address - * @return ShippingDetailsResponse - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * @return string - */ - public function getAddress2() - { - return $this->address2; - } - - /** - * @param string $address2 - * @return ShippingDetailsResponse - */ - public function setAddress2($address2) - { - $this->address2 = $address2; - return $this; - } - - /** - * @return string - */ - public function getDistrict() - { - return $this->district; - } - - /** - * @param string $district - * @return ShippingDetailsResponse - */ - public function setDistrict($district) - { - $this->district = $district; - return $this; - } - - /** - * @return string - */ - public function getZipCode() - { - return $this->zipCode; - } - - /** - * @param string $zipCode - * @return ShippingDetailsResponse - */ - public function setZipCode($zipCode) - { - $this->zipCode = $zipCode; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return ShippingDetailsResponse - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * @return ShippingDetailsResponse - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return ShippingDetailsResponse - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getDeliveryCompanyName() - { - return $this->deliveryCompanyName; - } - - /** - * @param string $deliveryCompanyName - * @return ShippingDetailsResponse - */ - public function setDeliveryCompanyName($deliveryCompanyName) - { - $this->deliveryCompanyName = $deliveryCompanyName; - return $this; - } - - /** - * @return DeliverySpeed - */ - public function getShippingSpeed() - { - return $this->shippingSpeed; - } - - /** - * @param DeliverySpeed $shippingSpeed - * @return ShippingDetailsResponse - */ - public function setShippingSpeed($shippingSpeed) - { - $this->shippingSpeed = $shippingSpeed; - return $this; - } - - /** - * @return DeliveryType - */ - public function getShippingMethod() - { - return $this->shippingMethod; - } - - /** - * @param DeliveryType $shippingMethod - * @return ShippingDetailsResponse - */ - public function setShippingMethod($shippingMethod) - { - $this->shippingMethod = $shippingMethod; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return ShippingDetailsResponse - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } - - /** - * @return string - */ - public function getIdentityCode() - { - return $this->identityCode; - } - - /** - * @param string $identityCode - * @return ShippingDetailsResponse - */ - public function setIdentityCode($identityCode) - { - $this->identityCode = $identityCode; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShoppingCartRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShoppingCartRequest.php deleted file mode 100644 index 6f04cd93..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShoppingCartRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -insuranceAmount; - } - - /** - * @param int $insuranceAmount - * @return ShoppingCartRequest - */ - public function setInsuranceAmount($insuranceAmount) - { - $this->insuranceAmount = $insuranceAmount; - return $this; - } - - /** - * @return int - */ - public function getShippingAmount() - { - return $this->shippingAmount; - } - - /** - * @param int $shippingAmount - * @return ShoppingCartRequest - */ - public function setShippingAmount($shippingAmount) - { - $this->shippingAmount = $shippingAmount; - return $this; - } - - /** - * @return int - */ - public function getTaxAmount() - { - return $this->taxAmount; - } - - /** - * @param int $taxAmount - * @return ShoppingCartRequest - */ - public function setTaxAmount($taxAmount) - { - $this->taxAmount = $taxAmount; - return $this; - } - - /** - * @return CartItemInfo[] - */ - public function getCartItemInfo() - { - return $this->cartItemInfo; - } - - /** - * @param CartItemInfo[] $cartItemInfo - * @return ShoppingCartRequest - */ - public function setCartItemInfo(array $cartItemInfo) - { - $this->cartItemInfo = $cartItemInfo; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShoppingCartResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShoppingCartResponse.php deleted file mode 100644 index db845f3e..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ShoppingCartResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cartItemInfo; - } - - /** - * @param CartItemInfo[] $cartItemInfo - * @return ShoppingCartResponse - */ - public function setCartItemInfo(array $cartItemInfo = null) - { - $this->cartItemInfo = $cartItemInfo; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SubscriptionRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SubscriptionRequest.php deleted file mode 100644 index a2e560aa..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SubscriptionRequest.php +++ /dev/null @@ -1,211 +0,0 @@ -subscriptionId; - } - - /** - * @param string $subscriptionId - * @return SubscriptionRequest - */ - public function setSubscriptionId($subscriptionId) - { - $this->subscriptionId = $subscriptionId; - return $this; - } - - /** - * @return \DateTime - */ - public function getEffectDate() - { - if ($this->effectDate == null) { - return null; - } else { - try { - return new \DateTime($this->effectDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $effectDate - * @return SubscriptionRequest - */ - public function setEffectDate(\DateTime $effectDate = null) - { - if ($effectDate == null) { - $this->effectDate = null; - } else { - $this->effectDate = $effectDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return SubscriptionRequest - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return SubscriptionRequest - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return int - */ - public function getInitialAmount() - { - return $this->initialAmount; - } - - /** - * @param int $initialAmount - * @return SubscriptionRequest - */ - public function setInitialAmount($initialAmount) - { - $this->initialAmount = $initialAmount; - return $this; - } - - /** - * @return int - */ - public function getInitialAmountNumber() - { - return $this->initialAmountNumber; - } - - /** - * @param int $initialAmountNumber - * @return SubscriptionRequest - */ - public function setInitialAmountNumber($initialAmountNumber) - { - $this->initialAmountNumber = $initialAmountNumber; - return $this; - } - - /** - * @return string - */ - public function getRrule() - { - return $this->rrule; - } - - /** - * @param string $rrule - * @return SubscriptionRequest - */ - public function setRrule($rrule) - { - $this->rrule = $rrule; - return $this; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * @param string $description - * @return SubscriptionRequest - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SubscriptionResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SubscriptionResponse.php deleted file mode 100644 index 7d37be9b..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/SubscriptionResponse.php +++ /dev/null @@ -1,292 +0,0 @@ -subscriptionId; - } - - /** - * @param string $subscriptionId - * @return SubscriptionResponse - */ - public function setSubscriptionId($subscriptionId) - { - $this->subscriptionId = $subscriptionId; - return $this; - } - - /** - * @return \DateTime - */ - public function getEffectDate() - { - if ($this->effectDate == null) { - return null; - } else { - try { - return new \DateTime($this->effectDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $effectDate - * @return SubscriptionResponse - */ - public function setEffectDate(\DateTime $effectDate = null) - { - if ($effectDate == null) { - $this->effectDate = null; - } else { - $this->effectDate = $effectDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return \DateTime - */ - public function getCancelDate() - { - if ($this->cancelDate == null) { - return null; - } else { - try { - return new \DateTime($this->cancelDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $cancelDate - * @return SubscriptionResponse - */ - public function setCancelDate(\DateTime $cancelDate = null) - { - if ($cancelDate == null) { - $this->cancelDate = null; - } else { - $this->cancelDate = $cancelDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getInitialAmount() - { - return $this->initialAmount; - } - - /** - * @param int $initialAmount - * @return SubscriptionResponse - */ - public function setInitialAmount($initialAmount) - { - $this->initialAmount = $initialAmount; - return $this; - } - - /** - * @return string - */ - public function getRrule() - { - return $this->rrule; - } - - /** - * @param string $rrule - * @return SubscriptionResponse - */ - public function setRrule($rrule) - { - $this->rrule = $rrule; - return $this; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * @param string $description - * @return SubscriptionResponse - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * @return int - */ - public function getInitialAmountNumber() - { - return $this->initialAmountNumber; - } - - /** - * @param int $initialAmountNumber - * @return SubscriptionResponse - */ - public function setInitialAmountNumber($initialAmountNumber) - { - $this->initialAmountNumber = $initialAmountNumber; - return $this; - } - - /** - * @return int - */ - public function getPastPaymentNumber() - { - return $this->pastPaymentNumber; - } - - /** - * @param int $pastPaymentNumber - * @return SubscriptionResponse - */ - public function setPastPaymentNumber($pastPaymentNumber) - { - $this->pastPaymentNumber = $pastPaymentNumber; - return $this; - } - - /** - * @return int - */ - public function getTotalPaymentNumber() - { - return $this->totalPaymentNumber; - } - - /** - * @param int $totalPaymentNumber - * @return SubscriptionResponse - */ - public function setTotalPaymentNumber($totalPaymentNumber) - { - $this->totalPaymentNumber = $totalPaymentNumber; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return SubscriptionResponse - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return SubscriptionResponse - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TechRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TechRequest.php deleted file mode 100644 index 0e3ff181..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TechRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -browserUserAgent; - } - - /** - * @param string $browserUserAgent - * @return TechRequest - */ - public function setBrowserUserAgent($browserUserAgent) - { - $this->browserUserAgent = $browserUserAgent; - return $this; - } - - /** - * @return string - */ - public function getBrowserAccept() - { - return $this->browserAccept; - } - - /** - * @param string $browserAccept - * @return TechRequest - */ - public function setBrowserAccept($browserAccept) - { - $this->browserAccept = $browserAccept; - return $this; - } - - /** - * @return string - */ - public function getIntegrationType() - { - return $this->integrationType; - } - - /** - * @param string $integrationType - * @return TechRequest - */ - public function setIntegrationType($integrationType) - { - $this->integrationType = $integrationType; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ThreeDSMode.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ThreeDSMode.php deleted file mode 100644 index 1a157882..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ThreeDSMode.php +++ /dev/null @@ -1,20 +0,0 @@ -mode; - } - - /** - * @param ThreeDSMode $mode - * @return ThreeDSRequest - */ - public function setMode($mode) - { - $this->mode = $mode; - return $this; - } - - /** - * @return string - */ - public function getRequestId() - { - return $this->requestId; - } - - /** - * @param string $requestId - * @return ThreeDSRequest - */ - public function setRequestId($requestId) - { - $this->requestId = $requestId; - return $this; - } - - /** - * @return string - */ - public function getPares() - { - return $this->pares; - } - - /** - * @param string $pares - * @return ThreeDSRequest - */ - public function setPares($pares) - { - $this->pares = $pares; - return $this; - } - - /** - * @return string - */ - public function getBrand() - { - return $this->brand; - } - - /** - * @param string $brand - * @return ThreeDSRequest - */ - public function setBrand($brand) - { - $this->brand = $brand; - return $this; - } - - /** - * @return string - */ - public function getEnrolled() - { - return $this->enrolled; - } - - /** - * @param string $enrolled - * @return ThreeDSRequest - */ - public function setEnrolled($enrolled) - { - $this->enrolled = $enrolled; - return $this; - } - - /** - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * @param string $status - * @return ThreeDSRequest - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * @return string - */ - public function getEci() - { - return $this->eci; - } - - /** - * @param string $eci - * @return ThreeDSRequest - */ - public function setEci($eci) - { - $this->eci = $eci; - return $this; - } - - /** - * @return string - */ - public function getXid() - { - return $this->xid; - } - - /** - * @param string $xid - * @return ThreeDSRequest - */ - public function setXid($xid) - { - $this->xid = $xid; - return $this; - } - - /** - * @return string - */ - public function getCavv() - { - return $this->cavv; - } - - /** - * @param string $cavv - * @return ThreeDSRequest - */ - public function setCavv($cavv) - { - $this->cavv = $cavv; - return $this; - } - - /** - * @return string - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * @param string $algorithm - * @return ThreeDSRequest - */ - public function setAlgorithm($algorithm) - { - $this->algorithm = $algorithm; - return $this; - } - - /** - * @return MpiExtensionRequest - */ - public function getMpiExtension() - { - return $this->mpiExtension; - } - - /** - * @param MpiExtensionRequest $mpiExtension - * @return ThreeDSRequest - */ - public function setMpiExtension($mpiExtension) - { - $this->mpiExtension = $mpiExtension; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ThreeDSResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ThreeDSResponse.php deleted file mode 100644 index f788012c..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ThreeDSResponse.php +++ /dev/null @@ -1,61 +0,0 @@ -authenticationRequestData; - } - - /** - * @param AuthenticationRequestData $authenticationRequestData - * @return ThreeDSResponse - */ - public function setAuthenticationRequestData($authenticationRequestData) - { - $this->authenticationRequestData = $authenticationRequestData; - return $this; - } - - /** - * @return AuthenticationResultData - */ - public function getAuthenticationResultData() - { - return $this->authenticationResultData; - } - - /** - * @param AuthenticationResultData $authenticationResultData - * @return ThreeDSResponse - */ - public function setAuthenticationResultData($authenticationResultData) - { - $this->authenticationResultData = $authenticationResultData; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TokenRequest.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TokenRequest.php deleted file mode 100644 index 56101668..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TokenRequest.php +++ /dev/null @@ -1,38 +0,0 @@ -currency; - } - - /** - * @param string $currency - * @return TokenRequest - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TokenResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TokenResponse.php deleted file mode 100644 index fc5d0c55..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TokenResponse.php +++ /dev/null @@ -1,85 +0,0 @@ -creationDate == null) { - return null; - } else { - try { - return new \DateTime($this->creationDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $creationDate - * @return TokenResponse - */ - public function setCreationDate(\DateTime $creationDate = null) - { - if ($creationDate == null) { - $this->creationDate = null; - } else { - $this->creationDate = $creationDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return \DateTime - */ - public function getCancellationDate() - { - if ($this->cancellationDate == null) { - return null; - } else { - try { - return new \DateTime($this->cancellationDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $cancellationDate - * @return TokenResponse - */ - public function setCancellationDate(\DateTime $cancellationDate = null) - { - if ($cancellationDate == null) { - $this->cancellationDate = null; - } else { - $this->cancellationDate = $cancellationDate->format(\DateTime::ATOM); - } - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TransactionItem.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TransactionItem.php deleted file mode 100644 index 8c72d549..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/TransactionItem.php +++ /dev/null @@ -1,142 +0,0 @@ -transactionUuid; - } - - /** - * @param string $transactionUuid - * @return TransactionItem - */ - public function setTransactionUuid($transactionUuid) - { - $this->transactionUuid = $transactionUuid; - return $this; - } - - /** - * @return string - */ - public function getTransactionStatusLabel() - { - return $this->transactionStatusLabel; - } - - /** - * @param string $transactionStatusLabel - * @return TransactionItem - */ - public function setTransactionStatusLabel($transactionStatusLabel) - { - $this->transactionStatusLabel = $transactionStatusLabel; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return TransactionItem - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return TransactionItem - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return \DateTime - */ - public function getExpectedCaptureDate() - { - if ($this->expectedCaptureDate == null) { - return null; - } else { - try { - return new \DateTime($this->expectedCaptureDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $expectedCaptureDate - * @return TransactionItem - */ - public function setExpectedCaptureDate(\DateTime $expectedCaptureDate = null) - { - if ($expectedCaptureDate == null) { - $this->expectedCaptureDate = null; - } else { - $this->expectedCaptureDate = $expectedCaptureDate->format(\DateTime::ATOM); - } - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePayment.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePayment.php deleted file mode 100644 index cdf0023e..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePayment.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return UpdatePayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdatePayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return UpdatePayment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetails.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetails.php deleted file mode 100644 index 440f8a03..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetails.php +++ /dev/null @@ -1,61 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdatePaymentDetails - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return ShoppingCartRequest - */ - public function getShoppingCartRequest() - { - return $this->shoppingCartRequest; - } - - /** - * @param ShoppingCartRequest $shoppingCartRequest - * @return UpdatePaymentDetails - */ - public function setShoppingCartRequest($shoppingCartRequest) - { - $this->shoppingCartRequest = $shoppingCartRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetailsResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetailsResponse.php deleted file mode 100644 index ec407a22..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updatePaymentDetailsResult; - } - - /** - * @param UpdatePaymentDetailsResult $updatePaymentDetailsResult - * @return UpdatePaymentDetailsResponse - */ - public function setUpdatePaymentDetailsResult($updatePaymentDetailsResult) - { - $this->updatePaymentDetailsResult = $updatePaymentDetailsResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetailsResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetailsResult.php deleted file mode 100644 index 9f1af32b..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentDetailsResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdatePaymentDetailsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdatePaymentDetailsResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdatePaymentDetailsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdatePaymentDetailsResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdatePaymentDetailsResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdatePaymentDetailsResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdatePaymentDetailsResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdatePaymentDetailsResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdatePaymentDetailsResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdatePaymentDetailsResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdatePaymentDetailsResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdatePaymentDetailsResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return UpdatePaymentDetailsResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentResponse.php deleted file mode 100644 index 8f2ba7e2..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updatePaymentResult; - } - - /** - * @param UpdatePaymentResult $updatePaymentResult - * @return UpdatePaymentResponse - */ - public function setUpdatePaymentResult($updatePaymentResult) - { - $this->updatePaymentResult = $updatePaymentResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentResult.php deleted file mode 100644 index ce86856d..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdatePaymentResult.php +++ /dev/null @@ -1,291 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdatePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdatePaymentResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdatePaymentResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdatePaymentResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdatePaymentResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdatePaymentResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdatePaymentResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdatePaymentResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdatePaymentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdatePaymentResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdatePaymentResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdatePaymentResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefund.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefund.php deleted file mode 100644 index b0293d68..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefund.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return UpdateRefund - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdateRefund - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return UpdateRefund - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefundResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefundResponse.php deleted file mode 100644 index e1520f96..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefundResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updateRefundResult; - } - - /** - * @param UpdateRefundResult $updateRefundResult - * @return UpdateRefundResponse - */ - public function setUpdateRefundResult($updateRefundResult) - { - $this->updateRefundResult = $updateRefundResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefundResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefundResult.php deleted file mode 100644 index e474fe1a..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateRefundResult.php +++ /dev/null @@ -1,291 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdateRefundResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdateRefundResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdateRefundResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdateRefundResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdateRefundResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdateRefundResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdateRefundResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdateRefundResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdateRefundResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdateRefundResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdateRefundResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdateRefundResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscription.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscription.php deleted file mode 100644 index 802d41c2..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscription.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return UpdateSubscription - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdateSubscription - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return SubscriptionRequest - */ - public function getSubscriptionRequest() - { - return $this->subscriptionRequest; - } - - /** - * @param SubscriptionRequest $subscriptionRequest - * @return UpdateSubscription - */ - public function setSubscriptionRequest($subscriptionRequest) - { - $this->subscriptionRequest = $subscriptionRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscriptionResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscriptionResponse.php deleted file mode 100644 index 162c7908..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscriptionResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updateSubscriptionResult; - } - - /** - * @param UpdateSubscriptionResult $updateSubscriptionResult - * @return UpdateSubscriptionResponse - */ - public function setUpdateSubscriptionResult($updateSubscriptionResult) - { - $this->updateSubscriptionResult = $updateSubscriptionResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscriptionResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscriptionResult.php deleted file mode 100644 index 0a55c24a..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateSubscriptionResult.php +++ /dev/null @@ -1,291 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdateSubscriptionResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdateSubscriptionResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdateSubscriptionResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdateSubscriptionResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdateSubscriptionResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdateSubscriptionResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdateSubscriptionResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdateSubscriptionResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdateSubscriptionResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdateSubscriptionResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdateSubscriptionResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdateSubscriptionResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateToken.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateToken.php deleted file mode 100644 index 4292acfa..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateToken.php +++ /dev/null @@ -1,130 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return UpdateToken - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdateToken - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return UpdateToken - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return CustomerRequest - */ - public function getCustomerRequest() - { - return $this->customerRequest; - } - - /** - * @param CustomerRequest $customerRequest - * @return UpdateToken - */ - public function setCustomerRequest($customerRequest) - { - $this->customerRequest = $customerRequest; - return $this; - } - - /** - * @return TokenRequest - */ - public function getTokenRequest() - { - return $this->tokenRequest; - } - - /** - * @param TokenRequest $tokenRequest - * @return UpdateToken - */ - public function setTokenRequest($tokenRequest) - { - $this->tokenRequest = $tokenRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateTokenResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateTokenResponse.php deleted file mode 100644 index 20d3c6ce..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateTokenResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updateTokenResult; - } - - /** - * @param UpdateTokenResult $updateTokenResult - * @return UpdateTokenResponse - */ - public function setUpdateTokenResult($updateTokenResult) - { - $this->updateTokenResult = $updateTokenResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateTokenResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateTokenResult.php deleted file mode 100644 index 113244f2..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/UpdateTokenResult.php +++ /dev/null @@ -1,291 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdateTokenResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdateTokenResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdateTokenResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdateTokenResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdateTokenResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdateTokenResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdateTokenResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdateTokenResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdateTokenResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdateTokenResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdateTokenResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdateTokenResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePayment.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePayment.php deleted file mode 100644 index 454fdb66..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePayment.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return ValidatePayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return ValidatePayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePaymentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePaymentResponse.php deleted file mode 100644 index 2f43926e..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -validatePaymentResult; - } - - /** - * @param ValidatePaymentResult $validatePaymentResult - * @return ValidatePaymentResponse - */ - public function setValidatePaymentResult($validatePaymentResult) - { - $this->validatePaymentResult = $validatePaymentResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePaymentResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePaymentResult.php deleted file mode 100644 index f23980b2..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/ValidatePaymentResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return ValidatePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollment.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollment.php deleted file mode 100644 index fcea8a48..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollment.php +++ /dev/null @@ -1,130 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return VerifyThreeDSEnrollment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return VerifyThreeDSEnrollment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return VerifyThreeDSEnrollment - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return TechRequest - */ - public function getTechRequest() - { - return $this->techRequest; - } - - /** - * @param TechRequest $techRequest - * @return VerifyThreeDSEnrollment - */ - public function setTechRequest($techRequest) - { - $this->techRequest = $techRequest; - return $this; - } - - /** - * @return ThreeDSRequest - */ - public function getThreeDSRequest() - { - return $this->threeDSRequest; - } - - /** - * @param ThreeDSRequest $threeDSRequest - * @return VerifyThreeDSEnrollment - */ - public function setThreeDSRequest($threeDSRequest) - { - $this->threeDSRequest = $threeDSRequest; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollmentResponse.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollmentResponse.php deleted file mode 100644 index 3eff9f3a..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollmentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -verifyThreeDSEnrollmentResult; - } - - /** - * @param VerifyThreeDSEnrollmentResult $verifyThreeDSEnrollmentResult - * @return VerifyThreeDSEnrollmentResponse - */ - public function setVerifyThreeDSEnrollmentResult($verifyThreeDSEnrollmentResult) - { - $this->verifyThreeDSEnrollmentResult = $verifyThreeDSEnrollmentResult; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollmentResult.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollmentResult.php deleted file mode 100644 index 6cde5109..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/VerifyThreeDSEnrollmentResult.php +++ /dev/null @@ -1,61 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return VerifyThreeDSEnrollmentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return VerifyThreeDSEnrollmentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/WsApi.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/WsApi.php deleted file mode 100644 index 6bf59b06..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/WsApi.php +++ /dev/null @@ -1,575 +0,0 @@ - true, 'SNI_server_name' => $url['host']); - - unset($options['sni.enabled']); - } - - $options = array_merge(array( - 'trace' => true, - 'exceptions' => true, - 'soapaction' => '', - 'cache_wsdl' => WSDL_CACHE_NONE, - 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, - 'connection_timeout' => self::TIMEOUT, - 'encoding' => 'UTF-8', - 'soap_version' => SOAP_1_2, - 'stream_context' => stream_context_create( - array('ssl' => $ssl, 'http' => array('user_agent' => 'PHPSoapClient')) - ) - ), $options); - - parent::__construct($wsdl, $options); - } - - public function init($shopId, $mode, $keyTest, $keyProd) - { - $this->mode = $mode; - $this->shopId = $shopId; - $this->key = ($mode === 'PRODUCTION') ? $keyProd : $keyTest; - } - - public function getAuthToken($data1, $data2) - { - $authToken = base64_encode(hash_hmac('sha256', $data1 . $data2, $this->key, true)); - return $authToken; - } - - public function genUuid() - { - if ($data = $this->genRandomBytes()) { - $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // Set version to 100. - $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // Set bits 6 & 7 to 10. - - return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); - } else { - return sprintf( - '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', - mt_rand(0, 0xffff), - mt_rand(0, 0xffff), - mt_rand(0, 0xffff), - mt_rand(0, 0x0fff) | 0x4000, - mt_rand(0, 0x3fff) | 0x8000, - mt_rand(0, 0xffff), - mt_rand(0, 0xffff), - mt_rand(0, 0xffff) - ); - } - } - - private function genRandomBytes() - { - if (function_exists('random_bytes')) { - // PHP 7 code. - try { - return random_bytes(16); - } catch(\Exception $e) { - // Try something else below. - } - } - - if (function_exists('openssl_random_pseudo_bytes')) { - // PHP 5.3 code but needs OpenSSL library. - return openssl_random_pseudo_bytes(16); - } - - return null; - } - - public function setHeaders() - { - $this->__setSoapHeaders(null); - - $requestId = $this->genUuid(); - $timestamp = gmdate(self::DATE_FORMAT); - $authToken = $this->getAuthToken($requestId, $timestamp); - - // Create headers for shopId, requestId, timestamp, mode and authToken. - $headers = array(); - - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'shopId', $this->shopId); - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'requestId', $requestId); - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'timestamp', $timestamp); - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'mode', $this->mode); - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'authToken', $authToken); - - // Set headers to soap client. - $this->__setSoapHeaders($headers); - - return $requestId; - } - - public function getJsessionId() - { - // Retrieve header of the last response. - $header = $this->__getLastResponseHeaders(); - - $matches = array(); - if (!preg_match('#JSESSIONID=([A-Za-z0-9\._]+)#', $header, $matches)) { - // No session created by gateway. - throw new \SoapFault('PayzenSID', 'No session ID returned by gateway.' . $header); - } - - return $matches[1]; - } - - public function setJsessionId($sid) - { - $this->__setCookie('JSESSIONID', $sid); - } - - public function checkAuthenticity() - { - // Retrieve SOAP header to check response authenticity. - $dom = new \DOMDocument(); - $dom->loadXML($this->__getLastResponse(), LIBXML_NOWARNING); - - $path = new \DOMXPath($dom); - $xmlHeaders = $path->query('//*[local-name()="Header"]/*'); - - $headers = array(); - foreach ($xmlHeaders as $xmlHeader) { - $headers[$xmlHeader->nodeName] = $xmlHeader->nodeValue; - } - - if ($this->shopId !== $headers['shopId']) { - throw new \UnexpectedValueException("Inconsistent returned shopId {$headers['shopId']}.", -1); - } - - if ($this->mode !== $headers['mode']) { - throw new \UnexpectedValueException("Inconsistent returned mode {$headers['mode']}.", -1); - } - - $authToken = $this->getAuthToken($headers['timestamp'], $headers['requestId']); - if ($authToken !== $headers['authToken']) { - throw new \UnexpectedValueException('Authentication failed.', -1); - } - } - - public function checkResult(CommonResponse $commonResponse, array $expectedStatuses = array()) - { - if ($commonResponse->getResponseCode() !== 0) { - throw new \UnexpectedValueException( - $commonResponse->getResponseCodeDetail(), - $commonResponse->getResponseCode() - ); - } - - if (!empty($expectedStatuses) && !in_array($commonResponse->getTransactionStatusLabel(), $expectedStatuses)) { - throw new \UnexpectedValueException( - "Unexpected transaction status returned ({$commonResponse->getTransactionStatusLabel()})." - ); - } - } - - /** - * @param CancelCapturedPayment $parameters - * @return CancelCapturedPaymentResponse - */ - public function cancelCapturedPayment(CancelCapturedPayment $parameters) - { - return $this->__soapCall('cancelCapturedPayment', array($parameters)); - } - - /** - * @param CapturePayment $parameters - * @return CapturePaymentResponse - */ - public function capturePayment(CapturePayment $parameters) - { - return $this->__soapCall('capturePayment', array($parameters)); - } - - /** - * @param CreateTokenByIban $parameters - * @return CreateTokenByIbanResponse - */ - public function createTokenByIban(CreateTokenByIban $parameters) - { - return $this->__soapCall('createTokenByIban', array($parameters)); - } - - /** - * @param ReactivateToken $parameters - * @return ReactivateTokenResponse - */ - public function reactivateToken(ReactivateToken $parameters) - { - return $this->__soapCall('reactivateToken', array($parameters)); - } - - /** - * @param DuplicatePayment $parameters - * @return DuplicatePaymentResponse - */ - public function duplicatePayment(DuplicatePayment $parameters) - { - return $this->__soapCall('duplicatePayment', array($parameters)); - } - - /** - * @param CancelPayment $parameters - * @return CancelPaymentResponse - */ - public function cancelPayment(CancelPayment $parameters) - { - return $this->__soapCall('cancelPayment', array($parameters)); - } - - /** - * @param CancelRefund $parameters - * @return CancelRefundResponse - */ - public function cancelRefund(CancelRefund $parameters) - { - return $this->__soapCall('cancelRefund', array($parameters)); - } - - /** - * @param CheckThreeDSAuthentication $parameters - * @return CheckThreeDSAuthenticationResponse - */ - public function checkThreeDSAuthentication(CheckThreeDSAuthentication $parameters) - { - return $this->__soapCall('checkThreeDSAuthentication', array($parameters)); - } - - /** - * @param UpdatePayment $parameters - * @return UpdatePaymentResponse - */ - public function updatePayment(UpdatePayment $parameters) - { - return $this->__soapCall('updatePayment', array($parameters)); - } - - /** - * @param UpdatePaymentDetails $parameters - * @return UpdatePaymentDetailsResponse - */ - public function updatePaymentDetails(UpdatePaymentDetails $parameters) - { - return $this->__soapCall('updatePaymentDetails', array($parameters)); - } - - /** - * @param GetPaymentDetails $parameters - * @return GetPaymentDetailsResponse - */ - public function getPaymentDetails(GetPaymentDetails $parameters) - { - return $this->__soapCall('getPaymentDetails', array($parameters)); - } - - /** - * @param UpdateToken $parameters - * @return UpdateTokenResponse - */ - public function updateToken(UpdateToken $parameters) - { - return $this->__soapCall('updateToken', array($parameters)); - } - - /** - * @param UpdateRefund $parameters - * @return UpdateRefundResponse - */ - public function updateRefund(UpdateRefund $parameters) - { - return $this->__soapCall('updateRefund', array($parameters)); - } - - /** - * @param CancelSubscription $parameters - * @return CancelSubscriptionResponse - */ - public function cancelSubscription(CancelSubscription $parameters) - { - return $this->__soapCall('cancelSubscription', array($parameters)); - } - - /** - * @param RefundPayment $parameters - * @return RefundPaymentResponse - */ - public function refundPayment(RefundPayment $parameters) - { - return $this->__soapCall('refundPayment', array($parameters)); - } - - /** - * @param CreateTokenFromTransaction $parameters - * @return CreateTokenFromTransactionResponse - */ - public function createTokenFromTransaction(CreateTokenFromTransaction $parameters) - { - return $this->__soapCall('createTokenFromTransaction', array($parameters)); - } - - /** - * @param VerifyThreeDSEnrollment $parameters - * @return VerifyThreeDSEnrollmentResponse - */ - public function verifyThreeDSEnrollment(VerifyThreeDSEnrollment $parameters) - { - return $this->__soapCall('verifyThreeDSEnrollment', array($parameters)); - } - - /** - * @param ValidatePayment $parameters - * @return ValidatePaymentResponse - */ - public function validatePayment(ValidatePayment $parameters) - { - return $this->__soapCall('validatePayment', array($parameters)); - } - - /** - * @param GetPaymentUuid $parameters - * @return GetPaymentUuidResponse - */ - public function getPaymentUuid(GetPaymentUuid $parameters) - { - return $this->__soapCall('getPaymentUuid', array($parameters)); - } - - /** - * @param CreatePayment $parameters - * @return CreatePaymentResponse - */ - public function createPayment(CreatePayment $parameters) - { - return $this->__soapCall('createPayment', array($parameters)); - } - - /** - * @param CreateSubscription $parameters - * @return CreateSubscriptionResponse - */ - public function createSubscription(CreateSubscription $parameters) - { - return $this->__soapCall('createSubscription', array($parameters)); - } - - /** - * @param GetSubscriptionDetails $parameters - * @return GetSubscriptionDetailsResponse - */ - public function getSubscriptionDetails(GetSubscriptionDetails $parameters) - { - return $this->__soapCall('getSubscriptionDetails', array($parameters)); - } - - /** - * @param UpdateSubscription $parameters - * @return UpdateSubscriptionResponse - */ - public function updateSubscription(UpdateSubscription $parameters) - { - return $this->__soapCall('updateSubscription', array($parameters)); - } - - /** - * @param CancelToken $parameters - * @return CancelTokenResponse - */ - public function cancelToken(CancelToken $parameters) - { - return $this->__soapCall('cancelToken', array($parameters)); - } - - /** - * @param CreateToken $parameters - * @return CreateTokenResponse - */ - public function createToken(CreateToken $parameters) - { - return $this->__soapCall('createToken', array($parameters)); - } - - /** - * @param FindPayments $parameters - * @return FindPaymentsResponse - */ - public function findPayments(FindPayments $parameters) - { - return $this->__soapCall('findPayments', array($parameters)); - } - - /** - * @param GetTokenDetails $parameters - * @return GetTokenDetailsResponse - */ - public function getTokenDetails(GetTokenDetails $parameters) - { - return $this->__soapCall('getTokenDetails', array($parameters)); - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/WsApiClassLoader.php b/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/WsApiClassLoader.php deleted file mode 100644 index b5b8277c..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/Api/Ws/WsApiClassLoader.php +++ /dev/null @@ -1,55 +0,0 @@ -requestId; - } - - /** - * @param string $requestId - * @return WsResponse - */ - public function setRequestId($requestId) - { - $this->requestId = $requestId; - return $this; - } -} diff --git a/app/code/community/Lyranetwork/Payzen/Model/Field/Array.php b/app/code/community/Lyranetwork/Payzen/Model/Field/Array.php index 9c2e93a7..bdf59e32 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Field/Array.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Field/Array.php @@ -27,4 +27,34 @@ protected function _throwError($column, $position, $extraMsg = '') // Throw exception. Mage::throwException($msg); } + + protected function checkMandatoryDecimal($value, $fieldLabel, $i) + { + if (empty($value)) { + $this->_throwError($fieldLabel, $i); + } + + $this->checkDecimal($value, $fieldLabel, $i); + } + + protected function checkDecimal($value, $fieldLabel, $i) + { + if (! empty($value) && ! preg_match('#^\d+$#', $value)) { + $this->_throwError($fieldLabel, $i); + } + } + + protected function checkAmount($amount, $fieldLabel, $i) + { + if (! empty($amount) && ! preg_match('#^\d+(\.\d+)?$#', $amount)) { + $this->_throwError($fieldLabel, $i); + } + } + + protected function checkRate($rate, $fieldLabel, $i) + { + if (! empty($rate) && (! is_numeric($rate) || ($rate < 0) || ($rate >= 100))) { + $this->_throwError($fieldLabel, $i); + } + } } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Field/Choozeo/PaymentOptions.php b/app/code/community/Lyranetwork/Payzen/Model/Field/Choozeo/PaymentOptions.php index 1bbaf00c..2af2ed47 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Field/Choozeo/PaymentOptions.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Field/Choozeo/PaymentOptions.php @@ -27,11 +27,8 @@ protected function _beforeSave() continue; } - if (! empty($value['amount_min']) && (! is_numeric($value['amount_min']) || $value['amount_min'] < 0)) { - $this->_throwError('Minimum amount', $i); - } elseif (! empty($value['amount_max']) && (! is_numeric($value['amount_max']) || $value['amount_max'] < 0)) { - $this->_throwError('Maximum amount', $i); - } + $this->checkAmount($value['amount_min'], 'Minimum amount', $i); + $this->checkAmount($value['amount_max'], 'Maximum amount', $i); } } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Field/Fullcb/PaymentOptions.php b/app/code/community/Lyranetwork/Payzen/Model/Field/Fullcb/PaymentOptions.php index 51259a65..f4c6c272 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Field/Fullcb/PaymentOptions.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Field/Fullcb/PaymentOptions.php @@ -31,21 +31,10 @@ protected function _beforeSave() $this->_throwError('Label', $i); } - if (! empty($value['amount_min']) && (! is_numeric($value['amount_min']) || $value['amount_min'] < 0)) { - $this->_throwError('Minimum amount', $i); - } - - if (! empty($value['amount_max']) && (! is_numeric($value['amount_max']) || $value['amount_max'] < 0)) { - $this->_throwError('Maximum amount', $i); - } - - if (! is_numeric($value['rate']) || $value['rate'] > 100 || $value['rate'] < 0) { - $this->_throwError('Rate', $i); - } - - if (! is_numeric($value['cap']) || $value['cap'] < 0) { - $this->_throwError('Cap', $i); - } + $this->checkAmount($value['amount_min'], 'Minimum amount', $i); + $this->checkAmount($value['amount_max'], 'Maximum amount', $i); + $this->checkRate($value['rate'], 'Rate', $i); + $this->checkAmount($value['cap'], 'Cap', $i); } } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Field/Multi/PaymentOptions.php b/app/code/community/Lyranetwork/Payzen/Model/Field/Multi/PaymentOptions.php index d198638b..b17ac282 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Field/Multi/PaymentOptions.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Field/Multi/PaymentOptions.php @@ -32,29 +32,16 @@ protected function _beforeSave() $this->_throwError('Label', $i); } - if (! empty($value['minimum']) && ! preg_match('#^\d+(\.\d+)?$#', $value['minimum'])) { - $this->_throwError('Min. amount', $i); - } - - if (! empty($value['maximum']) && ! preg_match('#^\d+(\.\d+)?$#', $value['maximum'])) { - $this->_throwError('Max. amount', $i); - } + $this->checkAmount($value['minimum'], 'Min. amount', $i); + $this->checkAmount($value['maximum'], 'Max. amount', $i); if (! empty($value['contract']) && ! preg_match('#^[^;=]+$#', $value['contract'])) { $this->_throwError('Contract', $i); } - if (! preg_match('#^[1-9]\d*$#', $value['count'])) { - $this->_throwError('Count', $i); - } - - if (! preg_match('#^[1-9]\d*$#', $value['period'])) { - $this->_throwError('Period', $i); - } - - if (! empty($value['first']) && (! is_numeric($value['first']) || $value['first'] >= 100)) { - $this->_throwError('1st installment', $i); - } + $this->checkMandatoryDecimal($value['count'], 'Count', $i); + $this->checkMandatoryDecimal($value['period'], 'Period', $i); + $this->checkRate($value['first'], '1st installment', $i); $options[] = $value['count']; } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Field/Oney3x4x/PaymentOptions.php b/app/code/community/Lyranetwork/Payzen/Model/Field/Oney3x4x/PaymentOptions.php index f49db9d7..4a44deac 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Field/Oney3x4x/PaymentOptions.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Field/Oney3x4x/PaymentOptions.php @@ -58,21 +58,10 @@ public function _beforeSave() $this->_throwError('Code', $i); } - if (! empty($value['minimum']) && ! preg_match('#^\d+(\.\d+)?$#', $value['minimum'])) { - $this->_throwError('Min. amount', $i); - } - - if (! empty($value['maximum']) && ! preg_match('#^\d+(\.\d+)?$#', $value['maximum'])) { - $this->_throwError('Max. amount', $i); - } - - if (! preg_match('#^[1-9]\d*$#', $value['count'])) { - $this->_throwError('Count', $i); - } - - if (! is_numeric($value['rate']) || $value['rate'] >= 100 || $value['rate'] < 0) { - $this->_throwError('Rate', $i); - } + $this->checkAmount($value['minimum'], 'Min. amount', $i); + $this->checkAmount($value['maximum'], 'Max. amount', $i); + $this->checkMandatoryDecimal($value['count'], 'Count', $i); + $this->checkRate($value['rate'], 'Rate', $i); } } } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Field/Other/PaymentMeans.php b/app/code/community/Lyranetwork/Payzen/Model/Field/Other/PaymentMeans.php index a258b276..3327fe35 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Field/Other/PaymentMeans.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Field/Other/PaymentMeans.php @@ -15,15 +15,7 @@ class Lyranetwork_Payzen_Model_Field_Other_PaymentMeans extends Lyranetwork_Payz protected function _beforeSave() { $values = $this->getValue(); - - $savedOptions = array(); - foreach ($values as $value) { - if (isset($value['means'])){ - $savedOptions[] = $value['means']; - } - } - - $occurences = array_count_values($savedOptions); + $usedCards = array(); if (! is_array($values) || empty($values)) { $this->setValue(array()); @@ -37,28 +29,22 @@ protected function _beforeSave() continue; } + if (in_array($value['means'], $usedCards)) { + // Do not save several options with the same means of payment. + $this->_throwError('Payment means', $i, 'You cannot enable several options with the same means of payment.'); + } else { + $usedCards[] = $value['means']; + } + if (empty($value['label'])) { $supportedCards = Lyranetwork_Payzen_Model_Api_Api::getSupportedCardTypes(); $value['label'] = Mage::helper('payzen')->__('Payment with %s', $supportedCards[$value['means']]); $values[$key] = $value; } - if (! empty($value['minimum']) && ! preg_match('#^\d+(\.\d+)?$#', $value['minimum'])) { - $this->_throwError('Min. amount', $i); - } - - if (! empty($value['maximum']) && ! preg_match('#^\d+(\.\d+)?$#', $value['maximum'])) { - $this->_throwError('Max. amount', $i); - } - - if (! empty($value['minimum']) && ! preg_match('#^\d+(\.\d+)?$#', $value['capture_delay'])) { - $this->_throwError('Capture delay', $i); - } - - if ($occurences[$value['means']] > 1) { - // Do not save several options with the same means of payment. - $this->_throwError('Payment means', $i, 'You cannot enable several options with the same means of payment.'); - } + $this->checkAmount($value['minimum'], 'Min. amount', $i); + $this->checkAmount($value['maximum'], 'Max. amount', $i); + $this->checkDecimal($value['capture_delay'], 'Capture delay', $i); $means[$value['means']] = $value['label']; } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Field/Standard/CardInfoModes.php b/app/code/community/Lyranetwork/Payzen/Model/Field/Standard/CardInfoModes.php index 664fdc22..0c4203bb 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Field/Standard/CardInfoModes.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Field/Standard/CardInfoModes.php @@ -15,8 +15,13 @@ class Lyranetwork_Payzen_Model_Field_Standard_CardInfoModes extends Mage_Core_Mo public function save() { $value = $this->getValue(); + $iframeAndEmbedded = array( + Lyranetwork_Payzen_Helper_Data::MODE_IFRAME, + Lyranetwork_Payzen_Helper_Data::MODE_EMBEDDED, + Lyranetwork_Payzen_Helper_Data::MODE_POPIN + ); - if (($value == 3 || $value == 4) && ! $this->_isFrontSecure()) { // IFRAME mode or REST API. + if (in_array($value, $iframeAndEmbedded) && ! $this->_isFrontSecure()) { // IFRAME mode or REST API. $this->_message = Mage::helper('payzen')->__('The iframe mode and the embedded payment fields cannot be used without enabling SSL.'); $this->setValue(1); } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Observer.php b/app/code/community/Lyranetwork/Payzen/Model/Observer.php index 97e1b351..39e194d0 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Observer.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Observer.php @@ -26,11 +26,6 @@ public function doPaymentRedirect($observer) $method = $order->getPayment()->getMethodInstance(); - if ($method instanceof Lyranetwork_Payzen_Model_Payment_Standard && $this->_getHelper()->isCurrentlySecure()) { - // Use WS instead. - return; - } - if ($method instanceof Lyranetwork_Payzen_Model_Payment_Abstract) { // Backend payment with redirection. @@ -394,7 +389,7 @@ public function doReplacePrototypeLibrary() } // Do nothing if payment by embedded fields is not enabled. - if (Mage::getModel('payzen/payment_standard')->getConfigData('card_info_mode') != '4') { + if (! Mage::getModel('payzen/payment_standard')->isEmbedded()) { return $this; } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Payment/Abstract.php b/app/code/community/Lyranetwork/Payzen/Model/Payment/Abstract.php index 6d8ccb01..6b31c809 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Payment/Abstract.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Payment/Abstract.php @@ -41,6 +41,7 @@ public function __construct() /** * @param Mage_Sales_Model_Order $order + * * @return array of params as key=>value */ public function getFormFields($order) @@ -180,7 +181,7 @@ public function getFormFields($order) if ($admin) { $session = Mage::getSingleton('adminhtml/session_quote'); $sendEmail = $session->getPayzenCanSendNewEmail(true); - $this->_payzenRequest->set('order_info', 'send_confirmation=' . $sendEmail); + $this->_payzenRequest->addExtInfo('send_confirmation', $sendEmail); } // Set method-specific parameters. @@ -250,7 +251,7 @@ public function getOrderPlaceRedirectUrl() } /** - * Attempt to accept a pending payment + * Attempt to accept a pending payment. * * @param Mage_Sales_Model_Order_Payment $payment * @return bool @@ -262,69 +263,45 @@ public function acceptPayment(Mage_Payment_Model_Info $payment) $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->_getHelper()->log("Get payment information online for order #{$order->getIncrementId()}."); + // Client did not configure private key in module backend, let Magento offline accept payment. + if (! $this->_getRestHelper()->getPassword($storeId)) { + $this->_getHelper()->log("Cannot get online payment information for order #{$order->getIncrementId()}: private key is not configured, let Magento accepts payment."); + return true; + } - $requestId = ''; + $this->_getHelper()->log("Get payment information online for order #{$order->getIncrementId()}."); try { - $wsApi = $this->checkAndGetWsApi($storeId); - - $sid = false; - // Retrieve transaction UUID. $uuid = $payment->getAdditionalInformation(Lyranetwork_Payzen_Helper_Payment::TRANS_UUID); if (! $uuid) { // Retro compatibility. - $legacyTransactionKeyRequest = new \Lyranetwork\Payzen\Model\Api\Ws\LegacyTransactionKeyRequest(); - $legacyTransactionKeyRequest->setTransactionId($payment->getCcTransId()); - $legacyTransactionKeyRequest->setSequenceNumber('1'); - $legacyTransactionKeyRequest->setCreationDate(new DateTime($order->getCreatedAt())); - - $getPaymentUuid = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentUuid(); - $getPaymentUuid->setLegacyTransactionKeyRequest($legacyTransactionKeyRequest); - - $requestId = $wsApi->setHeaders(); - $getPaymentUuidResponse = $wsApi->getPaymentUuid($getPaymentUuid); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentUuidResponse->getLegacyTransactionKeyResult()->getCommonResponse()); - - $uuid = $getPaymentUuidResponse->getLegacyTransactionKeyResult()->getPaymentResponse()->getTransactionUuid(); - - // Retrieve JSESSIONID created for getPaymentUuid call. - $sid = $wsApi->getJsessionId(); - } - - // Common $queryRequest object to use in all operations. - $queryRequest = new \Lyranetwork\Payzen\Model\Api\Ws\QueryRequest(); - $queryRequest->setUuid($uuid); - - $getPaymentDetails = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentDetails($queryRequest); - $getPaymentDetails->setQueryRequest($queryRequest); + $data = $this->_getPaymentDetails($order, false); + $getPaymentDetails['answer'] = reset($data); + $getPaymentDetails['status'] = 'SUCCESS'; + } else { + $requestData = array('uuid' => $uuid); - $requestId = $wsApi->setHeaders(); + // Perform our request. + $client = new Lyranetwork_Payzen_Model_Api_Rest( + $this->_getHelper()->getCommonConfigData('rest_url', $storeId), + $this->_getHelper()->getCommonConfigData('site_id', $storeId), + $this->_getRestHelper()->getPassword($storeId) + ); - // Set JSESSIONID if ws getPaymentUuid is called. - if ($sid) { - $wsApi->setJsessionId($sid); + $getPaymentDetails = $client->post('V4/Transaction/Get', json_encode($requestData)); } - $getPaymentDetailsResponse = $wsApi->getPaymentDetails($getPaymentDetails); - - $wsApi->checkAuthenticity(); - $successStatuses = array_merge( Lyranetwork_Payzen_Model_Api_Api::getSuccessStatuses(), Lyranetwork_Payzen_Model_Api_Api::getPendingStatuses() ); - $wsApi->checkResult( - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getCommonResponse(), - $successStatuses - ); - // Check operation type (0: debit, 1 refund). - $transType = $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getPaymentResponse()->getOperationType(); - if ($transType != 0) { - throw new Exception("Unexpected transaction type returned ($transType)."); + $this->_getRestHelper()->checkResult($getPaymentDetails, $successStatuses); + + // Check operation type. + $transType = $getPaymentDetails['answer']['operationType']; + if ($transType !== 'DEBIT') { + throw new \Exception("Unexpected transaction type returned ($transType)."); } $this->_getHelper()->log("Updating payment information for accepted order #{$order->getIncrementId()}."); @@ -332,17 +309,15 @@ public function acceptPayment(Mage_Payment_Model_Info $payment) // Payment is accepted by merchant. $payment->setIsFraudDetected(false); - $wrapper = new Lyranetwork_Payzen_Model_Api_Ws_ResultWrapper( - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getCommonResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getPaymentResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getAuthorizationResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getCardResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getThreeDSResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getFraudManagementResponse() - ); - $stateObject = $this->_getPaymentHelper()->nextOrderState($wrapper, $order, true); + // Wrap payment result to use traditional order creation tunnel. + $data = $this->_getRestHelper()->convertRestResult($getPaymentDetails['answer'], true); + + // Load API response. + $response = new Lyranetwork_Payzen_Model_Api_Response($data, null, null, null); - $this->_getHelper()->log("Order #{$order->getIncrementId()}, new state: {$stateObject->getState()}, new status: {$stateObject->getStatus()}."); + $stateObject = $this->_getPaymentHelper()->nextOrderState($response, $order, true); + + $this->_getHelper()->log("Order #{$order->getIncrementId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); $order->setState($stateObject->getState(), $stateObject->getStatus(), $this->_getHelper()->__('The payment has been accepted.')); // Try to create invoice. @@ -353,38 +328,27 @@ public function acceptPayment(Mage_Payment_Model_Info $payment) $redirectUrl = Mage::getUrl('*/sales_order/view', array('order_id' => $order->getId())); Mage::app()->getResponse()->setRedirect($redirectUrl)->sendHeadersAndExit(); - } catch(Lyranetwork_Payzen_Model_WsException $e) { - $this->_getHelper()->log("[$requestId] {$e->getMessage()}", Zend_Log::WARN); - - $this->_getAdminSession()->addWarning($this->_getHelper()->__('Please correct this error to use PayZen web services.')); - $this->_getAdminSession()->addError($this->_getHelper()->__($e->getMessage())); - return true; - } catch(\SoapFault $f) { - $this->_getHelper()->log("[$requestId] SoapFault with code {$f->faultcode}: {$f->faultstring}.", Zend_Log::WARN); + } catch(UnexpectedValueException $e) { + $this->_getHelper()->log("getPaymentDetails error with code {$e->getCode()}: {$e->getMessage()}.", Zend_Log::ERR); - $this->_getAdminSession()->addWarning($this->_getHelper()->__('Please correct this error to use PayZen web services.')); - $this->_getAdminSession()->addError($f->faultstring); - return true; - } catch(\UnexpectedValueException $e) { - $this->_getHelper()->log("[$requestId] getPaymentDetails error with code {$e->getCode()}: {$e->getMessage()}.", Zend_Log::ERR); + Mage::throwException($e->getMessage()); + } catch (Exception $e) { + $this->_getHelper()->log("Exception with code {$e->getCode()}: {$e->getMessage()}", Zend_Log::ERR); - if ($e->getCode() === -1) { - Mage::throwException($this->_getHelper()->__('Authentication error ! ')); - } elseif ($e->getCode() === 1) { - // Merchant does not subscribe to WS option, accept payment offline. - return true; + if ($e->getCode() <= -1) { // Manage cUrl errors. + $message = __("Please consult the PayZen logs for more details."); } else { - Mage::throwException($e->getMessage()); + $message = $e->getMessage(); } - } catch (Exception $e) { - $this->_getHelper()->log("[$requestId] Exception with code {$e->getCode()}: {$e->getMessage()}", Zend_Log::ERR); - Mage::throwException($e->getMessage()); - } + $this->_getAdminSession()->addError($message); + + throw $e; + } } /** - * Attempt to deny a pending payment + * Attempt to deny a pending payment. * * @param Mage_Sales_Model_Order_Payment $payment * @return bool @@ -396,64 +360,44 @@ public function denyPayment(Mage_Payment_Model_Info $payment) $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->_getHelper()->log("Cancel payment online for order #{$order->getIncrementId()}."); + // Client did not configure private key in module backend, let Magento offline cancel payment. + if (! $this->_getRestHelper()->getPassword($storeId)) { + $this->_getHelper()->log("Cannot online cancel payment for order #{$order->getIncrementId()}: private key is not configured, let Magento cancel payment."); + $this->_getAdminSession()->addWarning(__('Payment is cancelled only in Magento. Please, consider cancelling the payment in PayZen Back Office.')); + return true; + } - $requestId = ''; + $this->_getHelper()->log("Cancel payment online for order #{$order->getIncrementId()}."); try { - $wsApi = $this->checkAndGetWsApi($storeId); - - $sid = false; - // Retrieve transaction UUID. $uuid = $payment->getAdditionalInformation(Lyranetwork_Payzen_Helper_Payment::TRANS_UUID); if (! $uuid) { // Retro compatibility. - $legacyTransactionKeyRequest = new \Lyranetwork\Payzen\Model\Api\Ws\LegacyTransactionKeyRequest(); - $legacyTransactionKeyRequest->setTransactionId($payment->getCcTransId()); - $legacyTransactionKeyRequest->setSequenceNumber('1'); - $legacyTransactionKeyRequest->setCreationDate(new DateTime($order->getCreatedAt())); - - $getPaymentUuid = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentUuid(); - $getPaymentUuid->setLegacyTransactionKeyRequest($legacyTransactionKeyRequest); - - $requestId = $wsApi->setHeaders(); - $getPaymentUuidResponse = $wsApi->getPaymentUuid($getPaymentUuid); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentUuidResponse->getLegacyTransactionKeyResult()->getCommonResponse()); - - $uuid = $getPaymentUuidResponse->getLegacyTransactionKeyResult()->getPaymentResponse()->getTransactionUuid(); - - // Retrieve JSESSIONID created for getPaymentUuid call. - $sid = $wsApi->getJsessionId(); + // Get UUID from Order. + $uuidArray = $this->_getPaymentDetails($order); + $uuid = reset($uuidArray); } - // Common $queryRequest object to use in all operations. - $queryRequest = new \Lyranetwork\Payzen\Model\Api\Ws\QueryRequest(); - $queryRequest->setUuid($uuid); - - $cancelPayment = new \Lyranetwork\Payzen\Model\Api\Ws\CancelPayment(); - $cancelPayment->setCommonRequest(new \Lyranetwork\Payzen\Model\Api\Ws\CommonRequest()); - $cancelPayment->setQueryRequest($queryRequest); - - $requestId = $wsApi->setHeaders(); + $requestData = array( + 'uuid' => $uuid, + 'resolutionMode' => 'CANCELLATION_ONLY', + 'comment' => $this->_getUserInfo() + ); - // Set JSESSIONID if ws getPaymentUuid is called. - if ($sid) { - $wsApi->setJsessionId($sid); - } + // Load API response. + $client = new Lyranetwork_Payzen_Model_Api_Rest( + $this->_getHelper()->getCommonConfigData('rest_url', $storeId), + $this->_getHelper()->getCommonConfigData('site_id', $storeId), + $this->_getRestHelper()->getPassword($storeId) + ); - $cancelPaymentResponse = $wsApi->cancelPayment($cancelPayment); + $cancelPaymentResponse = $client->post('V4/Transaction/CancelOrRefund', json_encode($requestData)); - $wsApi->checkAuthenticity(); - $wsApi->checkResult( - $cancelPaymentResponse->getCancelPaymentResult()->getCommonResponse(), - array('CANCELLED') - ); + $this->_getRestHelper()->checkResult($cancelPaymentResponse, array('CANCELLED')); $this->_getHelper()->log("Payment cancelled successfully online for order #{$order->getIncrementId()}."); - $transactionId = $payment->getCcTransId() . '-1'; + $transactionId = $payment->getCcTransId() . '-' . $cancelPaymentResponse['answer']['transactionDetails']['sequenceNumber']; $additionalInfo = array(); $txn = Mage::getModel('sales/order_payment_transaction')->setOrderPaymentObject($payment) @@ -468,176 +412,176 @@ public function denyPayment(Mage_Payment_Model_Info $payment) $transactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID; $this->_getPaymentHelper()->addTransaction($payment, $transactionType, $transactionId, $additionalInfo); return true; // Let Magento cancel order. + } catch(\UnexpectedValueException $e) { + $this->_getHelper()->log("[cancelPayment error with code {$e->getCode()}: {$e->getMessage()}.", Zend_Log::ERR); - } catch(Lyranetwork_Payzen_Model_WsException $e) { - $this->_getHelper()->log("[$requestId] {$e->getMessage()}", Zend_Log::WARN); - - $this->_getAdminSession()->addWarning($this->_getHelper()->__('Please correct this error to use PayZen web services.')); - $this->_getAdminSession()->addError($this->_getHelper()->__($e->getMessage())); - return true; - } catch(\SoapFault $f) { - $this->_getHelper()->log("[$requestId] SoapFault with code {$f->faultcode}: {$f->faultstring}.", Zend_Log::WARN); + Mage::throwException($e->getMessage()); + } catch (Exception $e) { + $this->_getHelper()->log("Exception with code {$e->getCode()}: {$e->getMessage()}", Zend_Log::ERR); - $this->_getAdminSession()->addWarning($this->_getHelper()->__('Please correct this error to use PayZen web services.')); - $this->_getAdminSession()->addError($f->faultstring); - return true; - } catch(\UnexpectedValueException $e) { - $this->_getHelper()->log("[$requestId] cancelPayment error with code {$e->getCode()}: {$e->getMessage()}.", Zend_Log::ERR); - - if ($e->getCode() === -1) { - Mage::throwException($this->_getHelper()->__('Authentication error ! ')); - } elseif ($e->getCode() === 1) { - // Merchant does not subscribe to WS option, cancel payment offline. - $notice = $this->_getHelper()->__('You are not authorized to do this action online. Please, consider updating the payment in PayZen Back Office.'); - $this->_getAdminSession()->addNotice($notice); - return true; + if ($e->getCode() <= -1) { // Manage cUrl errors. + $message = __("Please consult the PayZen logs for more details."); } else { - Mage::throwException($e->getMessage()); + $message = $e->getMessage(); } - } catch (Exception $e) { - $this->_getHelper()->log("[$requestId] Exception with code {$e->getCode()}: {$e->getMessage()}", Zend_Log::ERR); - Mage::throwException($e->getMessage()); + $this->_getAdminSession()->addError($message); + + throw $e; } } + /** + * Attempt to validate a payment. + * + * @param Mage_Payment_Model_Info $payment + */ public function validatePayment(Mage_Payment_Model_Info $payment) { $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->_getHelper()->log("Validate payment online for order #{$order->getIncrementId()}."); + $uuidArray = array(); + $onlineValidatePayment = true; - $requestId = ''; + // Client did not configure private key in module backend, let Magento offline validate payment. + if (! $this->_getRestHelper()->getPassword($storeId)) { + $this->_getHelper()->log("Cannot online validate payment for order #{$order->getIncrementId()}: private key is not configured, let Magento validate payment."); + $this->_getAdminSession()->addWarning(__('Payment is validated only in Magento. Please, consider validating the payment in PayZen Back Office.')); + $onlineValidatePayment = false; + } else { + $this->_getHelper()->log("Validate payment online for order #{$order->getIncrementId()}."); + } try { - $wsApi = $this->checkAndGetWsApi($storeId); - $sid = false; - // Get choosen payment option if any. $option = @unserialize($payment->getAdditionalData()); $multi = (stripos($payment->getMethod(), 'payzen_multi') === 0) && is_array($option) && ! empty($option); $count = $multi ? (int) $option['count'] : 1; - // Retrieve transaction UUID. - $savedUuid = $payment->getAdditionalInformation(Lyranetwork_Payzen_Helper_Payment::TRANS_UUID); + if ($onlineValidatePayment) { + // Retrieve saved transaction UUID. + $savedUuid = $payment->getAdditionalInformation(Lyranetwork_Payzen_Helper_Payment::TRANS_UUID); + $uuidArray[1] = $savedUuid; - for ($i = 1; $i <= $count; $i++) { - if ($i === 1 && $savedUuid) { - $uuid = $savedUuid; + if (! $savedUuid || ($count > 1)) { + $uuidArray = $this->_getPaymentDetails($order); } else { - $legacyTransactionKeyRequest = new \Lyranetwork\Payzen\Model\Api\Ws\LegacyTransactionKeyRequest(); - $legacyTransactionKeyRequest->setTransactionId($payment->getCcTransId()); - $legacyTransactionKeyRequest->setSequenceNumber($i); - $legacyTransactionKeyRequest->setCreationDate(new DateTime($order->getCreatedAt())); - - $getPaymentUuid = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentUuid(); - $getPaymentUuid->setLegacyTransactionKeyRequest($legacyTransactionKeyRequest); + $uuidArray[] = $savedUuid; + } - $requestId = $wsApi->setHeaders(); - $getPaymentUuidResponse = $wsApi->getPaymentUuid($getPaymentUuid); + $commentText = $this->_getUserInfo(); - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentUuidResponse->getLegacyTransactionKeyResult()->getCommonResponse()); + $first = true; + foreach ($uuidArray as $uuid) { + $requestData = array( + 'uuid' => $uuid, + 'comment' => $commentText + ); - $uuid = $getPaymentUuidResponse->getLegacyTransactionKeyResult()->getPaymentResponse()->getTransactionUuid(); + // Perform our request. + $client = new Lyranetwork_Payzen_Model_Api_Rest( + $this->_getHelper()->getCommonConfigData('rest_url', $storeId), + $this->_getHelper()->getCommonConfigData('site_id', $storeId), + $this->_getRestHelper()->getPassword($storeId) + ); - // Retrieve JSESSIONID created for getPaymentUuid call. - $sid = $wsApi->getJsessionId(); - } + $validatePaymentResponse = $client->post('V4/Transaction/Validate', json_encode($requestData)); - // Common $queryRequest object to use in all operations. - $queryRequest = new \Lyranetwork\Payzen\Model\Api\Ws\QueryRequest(); - $queryRequest->setUuid($uuid); + $this->_getRestHelper()->checkResult($validatePaymentResponse, array('WAITING_AUTHORISATION', 'AUTHORISED')); - $validatePayment = new \Lyranetwork\Payzen\Model\Api\Ws\ValidatePayment(); - $validatePayment->setCommonRequest(new \Lyranetwork\Payzen\Model\Api\Ws\CommonRequest()); - $validatePayment->setQueryRequest($queryRequest); + // Wrap payment result to use traditional order creation tunnel. + $data = $this->_getRestHelper()->convertRestResult($validatePaymentResponse['answer'], true); - $requestId = $wsApi->setHeaders(); + // Load API response. + $response = new Lyranetwork_Payzen_Model_Api_Response($data, null, null, null); - // Set JSESSIONID if WS getPaymentUuid is called. - if ($sid) { - $wsApi->setJsessionId($sid); - } + $transId = $order->getPayment()->getCcTransId() . '-' . $response->get('sequence_number'); - $validatePaymentResponse = $wsApi->validatePayment($validatePayment); + if ($first) { // Single payment or first transaction for payment in installments. + $stateObject = $this->_getPaymentHelper()->nextOrderState($response, $order, true); - $wsApi->checkAuthenticity(); - $wsApi->checkResult( - $validatePaymentResponse->getValidatePaymentResult()->getCommonResponse(), - array('WAITING_AUTHORISATION', 'AUTHORISED') - ); + $this->_getHelper()->log("Order #{$order->getIncrementId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); + $order->setState( + $stateObject->getState(), + $stateObject->getStatus(), + $this->_getHelper()->__('Transaction %s has been validated.', $transId) + ); + } else { + $order->addStatusHistoryComment($this->_getHelper()->__('Transaction %s has been validated.', $transId)); + } - $transId = $payment->getCcTransId() . '-'. $i; + // Update transaction status. + $this->_getHelper()->log("Updating payment information for validated order #{$order->getIncrementId()}."); - $wrapper = new Lyranetwork_Payzen_Model_Api_Ws_ResultWrapper($validatePaymentResponse->getValidatePaymentResult()->getCommonResponse()); + // Load Magento payment transaction object. + $txn = Mage::getModel('sales/order_payment_transaction')->setOrderPaymentObject($payment) + ->loadByTxnId($transId); + if ($txn && $txn->getId()) { + $data = $txn->getAdditionalInformation('raw_details_info'); + $data['Transaction Status'] = $response->getTransStatus(); + $data['Transaction UUID'] = $uuid; - if ($i === 1) { // Single payment or first transaction for payment in installments. - $stateObject = $this->_getPaymentHelper()->nextOrderState($wrapper, $order, true); + $txn->setAdditionalInformation('raw_details_info', $data); + $txn->save(); + } - $this->_getHelper()->log("Order #{$order->getIncrementId()}, new state: {$stateObject->getState()}, new status: {$stateObject->getStatus()}."); - $order->setState( - $stateObject->getState(), - $stateObject->getStatus(), - $this->_getHelper()->__('Transaction %s has been validated.', $transId) - ); - } else { - $order->addStatusHistoryComment($this->_getHelper()->__('Transaction %s has been validated.', $transId)); + $first = false; } + } else { + // Load Magento payment transaction object. + $txn = Mage::getModel('sales/order_payment_transaction') + ->setOrderPaymentObject($payment) + ->loadByTxnId($order->getPayment()->getLastTransId()); - // Update transaction status. - $this->_getHelper()->log("Updating payment information for validated order #{$order->getIncrementId()}."); + // Wrap payment result to use traditional order creation tunnel. + $data = array('vads_trans_status' => 'AUTHORISED'); - $txn = Mage::getModel('sales/order_payment_transaction')->setOrderPaymentObject($payment) - ->loadByTxnId($transId); if ($txn && $txn->getId()) { - $data = $txn->getAdditionalInformation('raw_details_info'); - $data['Transaction Status'] = $wrapper->getTransStatus(); - $data['Transaction UUID'] = $uuid; - - $txn->setAdditionalInformation('raw_details_info', $data); - $txn->save(); + $txnData = $txn->getAdditionalInformation('raw_details_info'); + $data['vads_card_brand'] = $txnData['Means of Payment']; } + + // Load API response. + $response = new Lyranetwork_Payzen_Model_Api_Response($data, null, null, null); + + $stateObject = $this->_getPaymentHelper()->nextOrderState($response, $order, true); + + $this->_getHelper()->log("Order #{$order->getIncrementId()}, new state: {$stateObject->getState()}, new status: {$stateObject->getStatus()}."); + $order->setState( + $stateObject->getState(), + $stateObject->getStatus(), + $this->_getHelper()->__('Order %s has been validated.', $order->getIncrementId()) + ); } + $this->_getHelper()->log("Updating payment information for validated order #{$order->getIncrementId()}."); + // Try to create invoice. $this->_getPaymentHelper()->createInvoice($order); $order->save(); + $this->_getAdminSession()->addSuccess(__('Payment validated successfully.')); + } catch(UnexpectedValueException $e) { + $this->_getHelper()->log("validatePayment error with code {$e->getCode()}: {$e->getMessage()}.", Zend_Log::ERR); - $this->_getAdminSession()->addSuccess($this->_getHelper()->__('Payment validated successfully.')); - } catch(Lyranetwork_Payzen_Model_WsException $e) { - $this->_getHelper()->log("[$requestId] {$e->getMessage()}", Zend_Log::WARN); - - $this->_getAdminSession()->addWarning($this->_getHelper()->__('Please correct this error to use PayZen web services.')); - $this->_getAdminSession()->addError($this->_getHelper()->__($e->getMessage())); - } catch(\SoapFault $f) { - $this->_getHelper()->log("[$requestId] SoapFault with code {$f->faultcode}: {$f->faultstring}.", Zend_Log::WARN); + $this->_getAdminSession()->addError($e->getMessage()); + } catch (Exception $e) { + $this->_getHelper()->log("Exception with code {$e->getCode()}: {$e->getMessage()}", Zend_Log::ERR); - $this->_getAdminSession()->addWarning($this->_getHelper()->__('Please correct this error to use PayZen web services.')); - $this->_getAdminSession()->addError($f->faultstring); - } catch(\UnexpectedValueException $e) { - $this->_getHelper()->log("[$requestId] validatePayment error with code {$e->getCode()}: {$e->getMessage()}.", Zend_Log::ERR); - - if ($e->getCode() === -1) { - $this->_getAdminSession()->addError($this->_getHelper()->__('Authentication error ! ')); - } elseif ($e->getCode() === 1) { - // Merchant does not subscribe to WS option, validate payment offline. - $notice = $this->_getHelper()->__('You are not authorized to do this action online. Please, consider updating the payment in PayZen Back Office.'); - $this->_getAdminSession()->addNotice($notice); + $message = __('Failed to update the payment.'); + if ($e->getCode() <= -1) { // Manage cUrl errors. + $message .= '
' . __('Please consult the PayZen logs for more details.'); } else { - $this->_getAdminSession()->addError($e->getMessage()); + $message .= '
' . $e->getMessage(); } - } catch (Exception $e) { - $this->_getHelper()->log("[$requestId] Exception with code {$e->getCode()}: {$e->getMessage()}", Zend_Log::ERR); - $this->_getAdminSession()->addError($e->getMessage()); + $this->_getAdminSession()->addError($message); } } /** - * Validate payment method information object + * Validate payment method information object. * @deprecated to be removed in the next version. * * @param Mage_Payment_Model_Info $info @@ -666,7 +610,7 @@ public function validate() /** * Method that will be executed instead of authorize or capture - * if flag isInitializeNeeded set to true + * if flag isInitializeNeeded set to true. * * @param string $paymentAction * @param object $stateObject @@ -689,7 +633,7 @@ public function initialize($paymentAction, $stateObject) } /** - * Check method for processing with base currency + * Check method for processing with base currency. * * @param string $baseCurrencyCode * @return boolean @@ -720,7 +664,7 @@ public function canUseForCurrency($baseCurrencyCode) } /** - * Return true if the method can be used at this time + * Return true if the method can be used at this time. * * @return bool */ @@ -799,237 +743,189 @@ public function refund(Varien_Object $payment, $amount) $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->_getHelper()->log("Start refund of {$amount} {$order->getOrderCurrencyCode()} for order #{$order->getIncrementId()} with {$this->_code} payment method."); + $successStatuses = array_merge( + Lyranetwork_Payzen_Model_Api_Api::getSuccessStatuses(), + Lyranetwork_Payzen_Model_Api_Api::getPendingStatuses() + ); - $requestId = ''; + $this->_getHelper()->log("Start refund of {$amount} {$order->getOrderCurrencyCode()} for order #{$order->getIncrementId()} with {$this->_code} payment method."); try { - $wsApi = $this->checkAndGetWsApi($storeId); - - $sid = false; + // Get currency. + $currency = Lyranetwork_Payzen_Model_Api_Api::findCurrencyByAlphaCode($order->getOrderCurrencyCode()); + $amountInCents = $currency->convertAmountToInteger($amount); // Retrieve transaction UUID. $uuid = $payment->getAdditionalInformation(Lyranetwork_Payzen_Helper_Payment::TRANS_UUID); if (! $uuid) { // Retro compatibility. - $legacyTransactionKeyRequest = new \Lyranetwork\Payzen\Model\Api\Ws\LegacyTransactionKeyRequest(); - $legacyTransactionKeyRequest->setTransactionId($payment->getCcTransId()); - $legacyTransactionKeyRequest->setSequenceNumber('1'); // Only single payments can be refund at this time. - $legacyTransactionKeyRequest->setCreationDate(new DateTime($order->getCreatedAt())); - - $getPaymentUuid = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentUuid(); - $getPaymentUuid->setLegacyTransactionKeyRequest($legacyTransactionKeyRequest); - - $requestId = $wsApi->setHeaders(); - $getPaymentUuidResponse = $wsApi->getPaymentUuid($getPaymentUuid); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentUuidResponse->getLegacyTransactionKeyResult()->getCommonResponse()); - - $uuid = $getPaymentUuidResponse->getLegacyTransactionKeyResult()->getPaymentResponse()->getTransactionUuid(); - - // Retrieve JSESSIONID created for getPaymentUuid call. - $sid = $wsApi->getJsessionId(); + // Get UUID from Order. + $uuidArray = $this->_getPaymentDetails($order); + $uuid = reset($uuidArray); } - // Common $queryRequest object to use in all operations. - $queryRequest = new \Lyranetwork\Payzen\Model\Api\Ws\QueryRequest(); - $queryRequest->setUuid($uuid); - - $getPaymentDetails = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentDetails(); - $getPaymentDetails->setQueryRequest($queryRequest); - - $requestId = $wsApi->setHeaders(); + $requestData = array('uuid' => $uuid); - // Set JSESSIONID if ws getPaymentUuid is called. - if ($sid) { - $wsApi->setJsessionId($sid); - } + // Perform our request. + $client = new Lyranetwork_Payzen_Model_Api_Rest( + $this->_getHelper()->getCommonConfigData('rest_url', $storeId), + $this->_getHelper()->getCommonConfigData('site_id', $storeId), + $this->_getRestHelper()->getPassword($storeId) + ); - $getPaymentDetailsResponse = $wsApi->getPaymentDetails($getPaymentDetails); + $getPaymentDetails = $client->post('V4/Transaction/Get', json_encode($requestData)); + $this->_getRestHelper()->checkResult($getPaymentDetails); - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentDetailsResponse->getGetPaymentDetailsResult()->getCommonResponse()); + $transStatus = $getPaymentDetails['answer']['detailedStatus']; - // Retrieve JSESSIONID created for getPaymentDetails call. - if (! $sid) { - $sid = $wsApi->getJsessionId(); + if (! in_array($transStatus, $successStatuses)) { + $msg = $this->_getHelper()->__('Error occurred when refunding payment for order #%s. Unexpected transaction status: %s.', $order->getIncrementId(), $transStatus); + Mage::throwException($msg); } - $transStatus = $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getCommonResponse()->getTransactionStatusLabel(); - - // Get currency. - $currency = Lyranetwork_Payzen_Model_Api_Api::findCurrencyByAlphaCode($order->getOrderCurrencyCode()); - $amountInCents = $currency->convertAmountToInteger($amount); - - // Common request generation. - $commonRequest = new \Lyranetwork\Payzen\Model\Api\Ws\CommonRequest(); - $commentText = 'Magento user: ' . Mage::getSingleton('admin/session')->getUser()->getUsername(); - $commentText .= '; IP address: ' . $this->_getHelper()->getIpAddress(); + $commentText = $this->_getUserInfo(); foreach ($payment->getCreditmemo()->getCommentsCollection() as $comment) { $commentText .= '; ' . $comment->getComment(); } - $commonRequest->setComment($commentText); - - $requestId = $wsApi->setHeaders(); - $wsApi->setJsessionId($sid); // Set JSESSIONID for the last WS call. + if ($transStatus === 'CAPTURED') { // Transaction captured. + $requestData = array( + 'uuid' => $uuid, + 'amount' => $amountInCents, + 'resolutionMode' => 'REFUND_ONLY', + 'currency' => $currency->getAlpha3(), + 'comment' => $commentText + ); - if ($transStatus === 'CAPTURED') { // Transaction captured, we can do refund. - $timestamp = time(); + $refundPaymentResponse = $client->post('V4/Transaction/CancelOrRefund', json_encode($requestData)); + + $this->_getRestHelper()->checkResult( + $refundPaymentResponse, + array( + 'INITIAL', + 'AUTHORISED', + 'AUTHORISED_TO_VALIDATE', + 'WAITING_AUTHORISATION', + 'WAITING_AUTHORISATION_TO_VALIDATE', + 'CAPTURED', + 'UNDER_VERIFICATION' + ) + ); - $paymentRequest = new \Lyranetwork\Payzen\Model\Api\Ws\PaymentRequest(); - $paymentRequest->setTransactionId(Lyranetwork_Payzen_Model_Api_Api::generateTransId($timestamp)); - $paymentRequest->setAmount($amountInCents); - $paymentRequest->setCurrency($currency->getNum()); + // Check operation type. + $transType = $refundPaymentResponse['answer']['operationType']; - $captureDelay = $this->getConfigData('capture_delay', $storeId); // Get submodule specific param. - if (! is_numeric($captureDelay)) { - $captureDelay = $this->_getHelper()->getCommonConfigData('capture_delay', $storeId); // Get general param. + if ($transType != 'CREDIT') { + $msg = $this->_getHelper()->__("Unexpected transaction type received (%s).", $transType); + Mage::throwException($msg); } - if (is_numeric($captureDelay)) { - $paymentRequest->setExpectedCaptureDate(new DateTime('@' . strtotime("+$captureDelay days", $timestamp))); - } + // Create refund transaction in Magento. + $this->_createRefundTransaction($payment, $refundPaymentResponse['answer']); - $validationMode = $this->getConfigData('validation_mode', $storeId); // Get submodule specific param. - if ($validationMode === '-1') { - $validationMode = $this->_getHelper()->getCommonConfigData('validation_mode', $storeId); // Get general param. + $this->_getHelper()->log("Online money refund for order #{$order->getIncrementId()} is successful."); + } else { + $transAmount = $getPaymentDetails['answer']['amount']; + if ($getPaymentDetails['answer']['transactionDetails']['effectiveCurrency'] && ($getPaymentDetails['answer']['transactionDetails']['effectiveCurrency'] !== $getPaymentDetails['answer']['currency'])) { + $transAmount = $getPaymentDetails['answer']['transactionDetails']['effectiveAmount']; // Use effective amount to get modified amount. } - if ($validationMode !== '') { - $paymentRequest->setManualValidation($validationMode); + if ($amountInCents > $transAmount) { + $transAmountFloat = $currency->convertAmountToFloat($transAmount); + $msg = $this->_getHelper()->__("Cannot refund payment for order #%s. Transaction amount (%s %s) is less than requested refund amount (%s %s).", $order->getIncrementId(), $transAmountFloat, $currency->getAlpha3(), $amount, $currency->getAlpha3()); + Mage::throwException($msg); } - $refundPayment = new \Lyranetwork\Payzen\Model\Api\Ws\RefundPayment(); - $refundPayment->setCommonRequest($commonRequest); - $refundPayment->setPaymentRequest($paymentRequest); - $refundPayment->setQueryRequest($queryRequest); - - $refundPaymentResponse = $wsApi->refundPayment($refundPayment); - - $wsApi->checkAuthenticity(); + if ($amountInCents == $transAmount) { // Transaction cancel. + $requestData = array( + 'uuid' => $uuid, + 'resolutionMode' => 'CANCELLATION_ONLY', + 'comment' => $commentText + ); - $successStatuses = array_merge( - Lyranetwork_Payzen_Model_Api_Api::getSuccessStatuses(), - Lyranetwork_Payzen_Model_Api_Api::getPendingStatuses() - ); - $wsApi->checkResult( - $refundPaymentResponse->getRefundPaymentResult()->getCommonResponse(), - $successStatuses - ); + $cancelPaymentResponse = $client->post('V4/Transaction/CancelOrRefund', json_encode($requestData)); - // Check operation type (0: debit, 1 refund). - $transType = $refundPaymentResponse->getRefundPaymentResult()->getPaymentResponse()->getOperationType(); - if ($transType != 1) { - throw new Exception("Unexpected transaction type returned ($transType)."); - } + $this->_getRestHelper()->checkResult($cancelPaymentResponse, array('CANCELLED')); - // Create refund transaction in Magento. - $this->createRefundTransaction( - $payment, - $refundPaymentResponse->getRefundPaymentResult()->getCommonResponse(), - $refundPaymentResponse->getRefundPaymentResult()->getPaymentResponse(), - $refundPaymentResponse->getRefundPaymentResult()->getCardResponse() - ); + $order->cancel(); + $this->_getHelper()->log("Online payment cancel for order #{$order->getIncrementId()} is successful."); + } else { + // Partial transaction cancel, call update WS. + $newTransactionAmount = $transAmount - $amountInCents; + $requestData = array( + 'uuid' => $uuid, + 'cardUpdate' => array( + 'amount' => $newTransactionAmount, + 'currency' => $currency->getAlpha3() + ), + 'comment' => $commentText + ); - $this->_getHelper()->log("Online money refund for order #{$order->getIncrementId()} is successful."); - } else { - $transAmount = $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getPaymentResponse()->getAmount(); - if ($amountInCents >= $transAmount) { // Transaction cancel. - $cancelPayment = new \Lyranetwork\Payzen\Model\Api\Ws\CancelPayment(); - $cancelPayment->setCommonRequest($commonRequest); - $cancelPayment->setQueryRequest($queryRequest); + $updatePaymentResponse = $client->post('V4/Transaction/Update', json_encode($requestData)); - $cancelPaymentResponse = $wsApi->cancelPayment($cancelPayment); + $successStatuses = array_merge( + Lyranetwork_Payzen_Model_Api_Api::getSuccessStatuses(), + Lyranetwork_Payzen_Model_Api_Api::getPendingStatuses() + ); - $wsApi->checkAuthenticity(); - $wsApi->checkResult($cancelPaymentResponse->getCancelPaymentResult()->getCommonResponse(), array('CANCELLED')); + $this->_getRestHelper()->checkResult($updatePaymentResponse, $successStatuses); - $order->cancel(); - $this->_getHelper()->log("Online payment cancel for order #{$order->getIncrementId()} is successful."); - } else { // Partial transaction cancel, call updatePayment WS. - $paymentRequest = new \Lyranetwork\Payzen\Model\Api\Ws\PaymentRequest(); - $paymentRequest->setAmount($transAmount - $amountInCents); - $paymentRequest->setCurrency($currency->getNum()); - - $updatePayment = new \Lyranetwork\Payzen\Model\Api\Ws\UpdatePayment(); - $updatePayment->setCommonRequest($commonRequest); - $updatePayment->setQueryRequest($queryRequest); - $updatePayment->setPaymentRequest($paymentRequest); - - $updatePaymentResponse = $wsApi->updatePayment($updatePayment); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult( - $updatePaymentResponse->getUpdatePaymentResult()->getCommonResponse(), - array('AUTHORISED', 'AUTHORISED_TO_VALIDATE', 'WAITING_AUTHORISATION', 'WAITING_AUTHORISATION_TO_VALIDATE') - ); $this->_getHelper()->log("Online payment update for order #{$order->getIncrementId()} is successful."); } } - } catch(Lyranetwork_Payzen_Model_WsException $e) { - $this->_getHelper()->log("[$requestId] {$e->getMessage()}", Zend_Log::WARN); - - $warn = $this->_getHelper()->__('Please correct error to refund payments through PayZen. If you want to refund order in Magento, use the « Refund Offline » button.'); - $this->_getAdminSession()->addWarning($warn); - Mage::throwException($this->_getHelper()->__($e->getMessage())); - } catch(\SoapFault $f) { - $this->_getHelper()->log("[$requestId] SoapFault with code {$f->faultcode}: {$f->faultstring}.", Zend_Log::WARN); - - $warn = $this->_getHelper()->__('Please correct error to refund payments through PayZen. If you want to refund order in Magento, use the « Refund Offline » button.'); - $this->_getAdminSession()->addWarning($warn); - Mage::throwException($f->faultstring); - } catch(\UnexpectedValueException $e) { - $this->_getHelper()->log("[$requestId] refund error with code {$e->getCode()}: {$e->getMessage()}.", Zend_Log::ERR); - - if ($e->getCode() === -1) { - Mage::throwException($this->_getHelper()->__('Authentication error ! ')); - } elseif ($e->getCode() === 1) { - // Merchant does not subscribe to WS option, refund payment offline. - $notice = $this->_getHelper()->__('You are not authorized to do this action online. Please, consider updating the payment in PayZen Back Office.'); - $this->_getAdminSession()->addNotice($notice); - // Magento will do an offline refund. - } elseif ($e->getCode() === 83) { - Mage::throwException($this->_getHelper()->__('Chargebacks cannot be refunded.')); + } catch(UnexpectedValueException $e) { + $this->_getHelper()->log("refund error with code {$e->getCode()}: {$e->getMessage()}.", Zend_Log::ERR); + Mage::throwException($e->getMessage()); + } catch (Exception $e) { + $this->_getHelper()->log( + "Exception with code {$e->getCode()}: {$e->getMessage()}", + Zend_Log::ERR + ); + + if ($e->getCode() <= -1) { // Manage cUrl errors. + $message = __("Please consult the PayZen logs for more details."); } else { - Mage::throwException($e->getMessage()); + $message = $e->getMessage(); } - } catch (Exception $e) { - $this->_getHelper()->log("[$requestId] Exception with code {$e->getCode()}: {$e->getMessage()}", Zend_Log::ERR); - Mage::throwException($e->getMessage()); + $this->_getAdminSession()->addError($message); + + throw $e; } $order->save(); return $this; } - protected function createRefundTransaction($payment, $commonResponse, $paymentResponse, $cardResponse) + protected function _createRefundTransaction($payment, $refundResponse) { + $response = $this->_getRestHelper()->convertRestResult($refundResponse, true); + // Save transaction details to sales_payment_transaction. - $transactionId = $paymentResponse->getTransactionId() . '-' . $paymentResponse->getSequenceNumber(); + $transactionId = $response['vads_trans_id'] . '-' . $response['vads_sequence_number']; $expiry = ''; - if ($cardResponse->getExpiryMonth() && $cardResponse->getExpiryYear()) { - $expiry = str_pad($cardResponse->getExpiryMonth(), 2, '0', STR_PAD_LEFT) . ' / ' . $cardResponse->getExpiryYear(); + if ($response['vads_expiry_month'] && $response['vads_expiry_year']) { + $expiry = str_pad($response['vads_expiry_month'], 2, '0', STR_PAD_LEFT) . ' / ' . + $response['vads_expiry_year']; } // Save paid amount. - $currency = Lyranetwork_Payzen_Model_Api_Api::findCurrencyByNumCode($paymentResponse->getCurrency()); - $amount = number_format($currency->convertAmountToFloat($paymentResponse->getAmount()), $currency->getDecimals(), ',', ' '); + $currency = Lyranetwork_Payzen_Model_Api_Api::findCurrencyByNumCode($response['vads_currency']); + $amount = number_format($currency->convertAmountToFloat($response['vads_amount']), $currency->getDecimals(), ',', ' '); $amountDetail = $amount . ' ' . $currency->getAlpha3(); - if ($paymentResponse->getEffectiveCurrency() && ($paymentResponse->getCurrency() !== $paymentResponse->getEffectiveCurrency())) { - $effectiveCurrency = Lyranetwork_Payzen_Model_Api_Api::findCurrencyByNumCode($paymentResponse->getEffectiveCurrency()); + if ($response['vads_effective_currency'] && + ($response['vads_currency'] !== $response['vads_effective_currency'])) { + $effectiveCurrency = _Lyranetwork_Payzen_Model_Api_Api::findCurrencyByNumCode($response['vads_effective_currency']); $effectiveAmount = number_format( - $effectiveCurrency->convertAmountToFloat($paymentResponse->getEffectiveAmount()), + $effectiveCurrency->convertAmountToFloat($response['vads_effective_amount']), $effectiveCurrency->getDecimals(), ',', ' ' - ); + ); $amountDetail = $effectiveAmount . ' ' . $effectiveCurrency->getAlpha3() . ' (' . $amountDetail . ')'; } @@ -1038,10 +934,10 @@ protected function createRefundTransaction($payment, $commonResponse, $paymentRe 'Transaction Type' => 'CREDIT', 'Amount' => $amountDetail, 'Transaction ID' => $transactionId, - 'Transaction UUID' => $paymentResponse->getTransactionUuid(), - 'Transaction Status' => $commonResponse->getTransactionStatusLabel(), - 'Means of Payment' => $cardResponse->getBrand(), - 'Card Number' => $cardResponse->getNumber(), + 'Transaction UUID' => $response['vads_trans_uuid'], + 'Transaction Status' => $response['vads_trans_status'], + 'Means of payment' => $response['vads_card_brand'], + 'Card Number' => $response['vads_card_number'], 'Expiration Date' => $expiry ); @@ -1049,39 +945,6 @@ protected function createRefundTransaction($payment, $commonResponse, $paymentRe $this->_getPaymentHelper()->addTransaction($payment, $transactionType, $transactionId, $additionalInfo); } - protected function checkAndGetWsApi($storeId) - { - $this->_getHelper()->checkWsRequirements(); - - // Headers generation. - $shopId = $this->_getHelper()->getCommonConfigData('site_id', $storeId); - $mode = $this->_getHelper()->getCommonConfigData('ctx_mode', $storeId); - $keyTest = $this->_getHelper()->getCommonConfigData('key_test', $storeId); - $keyProd = $this->_getHelper()->getCommonConfigData('key_prod', $storeId); - - // Load specific configuration file for WSDL access. - $configFile = parse_ini_file(Mage::getModuleDir('etc', 'Lyranetwork_Payzen') . DS . 'ws.ini'); - $options = $configFile ? $configFile : array(); - - if (! empty($options)) { - if (! $options['proxy.enabled']) { - unset($options['proxy_host'], $options['proxy_port'], $options['proxy_login'], $options['proxy_password']); - } - - unset($options['proxy.enabled']); - } - - include_once Mage::getModuleDir('', 'Lyranetwork_Payzen') . DS . 'Model' . DS . 'Api' . DS . 'Ws' . DS . 'WsApiClassLoader.php'; - \Lyranetwork\Payzen\Model\Api\Ws\WsApiClassLoader::register(true); - - $url = $this->_getHelper()->getCommonConfigData('wsdl_url', $storeId); - - $wsApi = new \Lyranetwork\Payzen\Model\Api\Ws\WsApi($url, $options); - $wsApi->init($shopId, $mode, $keyTest, $keyProd); - - return $wsApi; - } - /** * Set transaction ID into creditmemo for informational purposes. * @@ -1121,4 +984,56 @@ protected function _getPaymentHelper() { return Mage::helper('payzen/payment'); } + + /** + * Return payzen payment method helper. + * + * @return Mage_Payzen_Helper_Rest + */ + protected function _getRestHelper() + { + return Mage::helper('payzen/rest'); + } + + protected function _getPaymentDetails($order, $uuidOnly = true) + { + $storeId = $order->getStore()->getId(); + + // Get UUIDs from Order. + $client = new Lyranetwork_Payzen_Model_Api_Rest( + $this->_getHelper()->getCommonConfigData('rest_url', $storeId), + $this->_getHelper()->getCommonConfigData('site_id', $storeId), + $this->_getRestHelper()->getPassword($storeId) + ); + + $requestData = array( + 'orderId' => $order->getIncrementId(), + 'operationType' => 'DEBIT' + ); + + $getOrderResponse = $client->post('V4/Order/Get', json_encode($requestData)); + $this->_getRestHelper()->checkResult($getOrderResponse); + + // Order transactions organized by sequence numbers. + $transBySequence = array(); + foreach ($getOrderResponse['answer']['transactions'] as $transaction) { + $sequenceNumber = $transaction['transactionDetails']['sequenceNumber']; + // Unpaid transactions are not considered. + if ($transaction['status'] !== 'UNPAID') { + $transBySequence[$sequenceNumber] = $uuidOnly ? $transaction['uuid'] : $transaction; + } + } + + ksort($transBySequence); + return $transBySequence; + } + + protected function _getUserInfo() + { + $user = Mage::getSingleton('admin/session'); + $commentText = 'Magento user: ' . $user->getUser()->getUsername(); + $commentText .= '; IP address: ' . $this->_getHelper()->getIpAddress(); + + return $commentText; + } } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Payment/Multi.php b/app/code/community/Lyranetwork/Payzen/Model/Payment/Multi.php index 26911499..e139fd2b 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Payment/Multi.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Payment/Multi.php @@ -25,7 +25,7 @@ protected function _setExtraFields($order) $info = $this->getInfoInstance(); - if (! $this->_getHelper()->isAdmin() && ($this->getConfigData('card_info_mode') == 2)) { + if (! $this->_getHelper()->isAdmin() && ($this->getConfigData('card_info_mode') == Lyranetwork_Payzen_Helper_Data::MODE_LOCAL_TYPE)) { $this->_payzenRequest->set('payment_cards', $info->getCcType()); } else { // payment_cards is given as csv by Magento. diff --git a/app/code/community/Lyranetwork/Payzen/Model/Payment/Standard.php b/app/code/community/Lyranetwork/Payzen/Model/Payment/Standard.php index d9a6eb03..961b09a7 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Payment/Standard.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Payment/Standard.php @@ -10,8 +10,6 @@ class Lyranetwork_Payzen_Model_Payment_Standard extends Lyranetwork_Payzen_Model_Payment_Abstract { - const REST_API = '4'; - protected $_code = 'payzen_standard'; protected $_formBlockType = 'payzen/standard'; @@ -70,7 +68,7 @@ protected function _setExtraFields($order) $customer = Mage::getModel('customer/customer'); $customer->load($order->getCustomerId()); - if ($customer->getPayzenIdentifier()) { + if ($customer->getPayzenIdentifier() && Mage::getSingleton('checkout/session')->getValidAlias()) { // Customer has an identifier. $this->_getHelper()->log("Customer {$customer->getEmail()} has an identifier. Use it for payment of order #{$order->getIncrementId()}."); $this->_payzenRequest->set('identifier', $customer->getPayzenIdentifier()); @@ -202,7 +200,7 @@ private function _getFormTokenData($quote, $useIdentifier = false) $customer = $quote->getCustomer(); - if ($useIdentifier) { + if ($useIdentifier && Mage::getSingleton('checkout/session')->getValidAlias()) { $this->_getHelper()->log("Customer {$customer->getEmail()} has an identifier. Use it for payment of order #{$quote->getReservedOrderId()}."); $data['paymentMethodToken'] = $customer->getPayzenIdentifier(); } elseif ($this->getConfigData('one_click_active') && $quote->getCustomer()->getId()) { @@ -258,7 +256,7 @@ public function getFormToken($useIdentifier, $renew = false) $client = new Lyranetwork_Payzen_Model_Api_Rest( $this->_getHelper()->getCommonConfigData('rest_url'), $login, - $this->_getPassword() + $this->_getRestHelper()->getPassword() ); $response = $client->post('V4/Charge/CreatePayment', json_encode($data)); @@ -297,16 +295,8 @@ public function getFormToken($useIdentifier, $renew = false) return $token; } - private function _getPassword() - { - $test = $this->_getHelper()->getCommonConfigData('ctx_mode') === 'TEST'; - $crypted = $this->getConfigData($test ? 'rest_private_key_test' : 'rest_private_key_prod'); - - return Mage::helper('core')->decrypt($crypted); - } - /** - * Return available card types + * Return available card types. * * @return string */ @@ -349,8 +339,8 @@ public function isOneclickAvailable() return false; } - // Rest Api mode active. - if ($this->getConfigData('card_info_mode') === self::REST_API) { + // Rest API mode active. + if ($this->isEmbedded()) { return false; } @@ -380,7 +370,7 @@ public function isOneclickAvailable() } /** - * Assign data to info model instance + * Assign data to info model instance. * * @param mixed $data * @return Mage_Payment_Model_Info @@ -410,7 +400,7 @@ public function assignData($data) } /** - * Prepare info instance for save + * Prepare info instance for save. * * @return Mage_Payment_Model_Abstract */ @@ -424,31 +414,6 @@ public function prepareSave() return $this; } - /** - * Method that will be executed instead of authorize or capture - * if flag isInitializeNeeded set to true - * - * @param string $paymentAction - * @param object $stateObject - * - * @return Mage_Payment_Model_Abstract - */ - public function initialize($paymentAction, $stateObject) - { - parent::initialize($paymentAction, $stateObject); - - if ($this->_getHelper()->isAdmin() && $this->_getHelper()->isCurrentlySecure()) { - // Do instant payment by WS. - $stateObjectResult = $this->_doInstantPayment($this->getInfoInstance()); - - $stateObject->setState($stateObjectResult->getState()); - $stateObject->setStatus($stateObjectResult->getStatus()); - $stateObject->setIsNotified($stateObjectResult->getIsNotified()); - } - - return $this; - } - /** * The URL the customer is redirected to after clicking on "Confirm order". * @@ -464,261 +429,37 @@ public function getOrderPlaceRedirectUrl() } /** - * Call gateway by WS to do an instant payment - * - * @param Mage_Sales_Model_Order_Payment $payment - * @return Varien_Object - */ - protected function _doInstantPayment($payment) - { - $order = $payment->getOrder(); - $storeId = $order->getStore()->getId(); - - $this->_getHelper()->log("Instant payment using WS for order #{$order->getIncrementId()}."); - - $requestId = ''; - - try { - $wsApi = $this->checkAndGetWsApi($storeId); - - $timestamp = time(); - - // Common request generation. - $commonRequest = new \Lyranetwork\Payzen\Model\Api\Ws\CommonRequest(); - $commonRequest->setPaymentSource('MOTO'); - $commonRequest->setSubmissionDate(new DateTime("@$timestamp")); - - // Amount in current order currency. - $amount = $order->getGrandTotal(); - - // Retrieve currency. - $currency = Lyranetwork_Payzen_Model_Api_Api::findCurrencyByAlphaCode($order->getOrderCurrencyCode()); - if ($currency == null) { - // If currency is not supported, use base currency. - $currency = Lyranetwork_Payzen_Model_Api_Api::findCurrencyByAlphaCode($order->getBaseCurrencyCode()); - - // ... and order total in base currency. - $amount = $order->getBaseGrandTotal(); - } - - // Payment request generation. - $paymentRequest = new \Lyranetwork\Payzen\Model\Api\Ws\PaymentRequest(); - $paymentRequest->setTransactionId(Lyranetwork_Payzen_Model_Api_Api::generateTransId($timestamp)); - $paymentRequest->setAmount($currency->convertAmountToInteger($amount)); - $paymentRequest->setCurrency($currency->getNum()); - - $captureDelay = $this->getConfigData('capture_delay', $storeId); // Get submodule specific param. - if (! is_numeric($captureDelay)) { - // Get general param. - $captureDelay = $this->_getHelper()->getCommonConfigData('capture_delay', $storeId); - } - - if (is_numeric($captureDelay)) { - $paymentRequest->setExpectedCaptureDate( - new DateTime('@' . strtotime("+$captureDelay days", $timestamp)) - ); - } - - $validationMode = $this->getConfigData('validation_mode', $storeId); // Get submodule specific param. - if ($validationMode === '-1') { - // Get general param. - $validationMode = $this->_getHelper()->getCommonConfigData('validation_mode', $storeId); - } - - if ($validationMode !== '') { - $paymentRequest->setManualValidation($validationMode); - } - - // Order request generation. - $orderRequest = new \Lyranetwork\Payzen\Model\Api\Ws\OrderRequest(); - $orderRequest->setOrderId($order->getIncrementId()); - - // Card request generation. - $cardRequest = new \Lyranetwork\Payzen\Model\Api\Ws\CardRequest(); - $info = $this->getInfoInstance(); - $cardRequest->setNumber($info->getCcNumber()); - $cardRequest->setScheme($info->getCcType()); - $cardRequest->setCardSecurityCode($info->getCcCid()); - $cardRequest->setExpiryMonth($info->getCcExpMonth()); - $cardRequest->setExpiryYear($info->getCcExpYear()); - - // Billing details generation. - $billingDetailsRequest = new \Lyranetwork\Payzen\Model\Api\Ws\BillingDetailsRequest(); - $billingDetailsRequest->setReference($order->getCustomerId()); - - if ($order->getBillingAddress()->getPrefix()) { - $billingDetailsRequest->setTitle($order->getBillingAddress()->getPrefix()); - } - - $billingDetailsRequest->setFirstName($order->getBillingAddress()->getFirstname()); - $billingDetailsRequest->setLastName($order->getBillingAddress()->getLastname()); - $billingDetailsRequest->setPhoneNumber($order->getBillingAddress()->getTelephone()); - $billingDetailsRequest->setCellPhoneNumber($order->getBillingAddress()->getTelephone()); - $billingDetailsRequest->setEmail($order->getCustomerEmail()); - - $address = $order->getBillingAddress()->getStreet(1) . ' ' . $order->getBillingAddress()->getStreet(2); - $billingDetailsRequest->setAddress(trim($address)); - - $billingDetailsRequest->setZipCode($order->getBillingAddress()->getPostcode()); - $billingDetailsRequest->setCity($order->getBillingAddress()->getCity()); - $billingDetailsRequest->setState($order->getBillingAddress()->getRegion()); - $billingDetailsRequest->setCountry($order->getBillingAddress()->getCountryId()); - - // Language. - $currentLang = substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2); - if (Lyranetwork_Payzen_Model_Api_Api::isSupportedLanguage($currentLang)) { - $language = $currentLang; - } else { - $language = $this->_getHelper()->getCommonConfigData('language', $storeId); - } - - $billingDetailsRequest->setLanguage($language); - - // Shipping details generation. - $shippingDetailsRequest = new \Lyranetwork\Payzen\Model\Api\Ws\ShippingDetailsRequest(); - - $address = $order->getShippingAddress(); - if (is_object($address)) { // Deliverable order. - $shippingDetailsRequest->setFirstName($address->getFirstname()); - $shippingDetailsRequest->setLastName($address->getLastname()); - $shippingDetailsRequest->setPhoneNumber($address->getTelephone()); - $shippingDetailsRequest->setAddress($address->getStreet(1)); - $shippingDetailsRequest->setAddress2($address->getStreet(2)); - $shippingDetailsRequest->setZipCode($address->getPostcode()); - $shippingDetailsRequest->setCity($address->getCity()); - $shippingDetailsRequest->setState($address->getRegion()); - $shippingDetailsRequest->setCountry($address->getCountryId()); - } - - // Extra details generation. - $extraDetailsRequest = new \Lyranetwork\Payzen\Model\Api\Ws\ExtraDetailsRequest(); - $extraDetailsRequest->setIpAddress($this->_getHelper()->getIpAddress()); - - // Customer request generation. - $customerRequest = new \Lyranetwork\Payzen\Model\Api\Ws\CustomerRequest(); - $customerRequest->setBillingDetails($billingDetailsRequest); - $customerRequest->setShippingDetails($shippingDetailsRequest); - $customerRequest->setExtraDetails($extraDetailsRequest); - - // Create payment object generation. - $createPayment = new \Lyranetwork\Payzen\Model\Api\Ws\CreatePayment(); - $createPayment->setCommonRequest($commonRequest); - $createPayment->setPaymentRequest($paymentRequest); - $createPayment->setOrderRequest($orderRequest); - $createPayment->setCardRequest($cardRequest); - $createPayment->setCustomerRequest($customerRequest); - - // Do createPayment WS call. - $requestId = $wsApi->setHeaders(); - $createPaymentResponse = $wsApi->createPayment($createPayment); - - $wsApi->checkAuthenticity(); - - $successStatuses = array_merge( - Lyranetwork_Payzen_Model_Api_Api::getSuccessStatuses(), - Lyranetwork_Payzen_Model_Api_Api::getPendingStatuses() - ); - $wsApi->checkResult( - $createPaymentResponse->getCreatePaymentResult()->getCommonResponse(), - $successStatuses - ); - - // Check operation type (0: debit, 1 refund). - $transType = $createPaymentResponse->getCreatePaymentResult()->getPaymentResponse()->getOperationType(); - if ($transType != 0) { - throw new Exception("Unexpected transaction type returned ($transType)."); - } - - // Update authorized amount. - $payment->setAmountAuthorized($order->getTotalDue()); - $payment->setBaseAmountAuthorized($order->getBaseTotalDue()); - - $wrapper = new Lyranetwork_Payzen_Model_Api_Ws_ResultWrapper( - $createPaymentResponse->getCreatePaymentResult()->getCommonResponse(), - $createPaymentResponse->getCreatePaymentResult()->getPaymentResponse(), - $createPaymentResponse->getCreatePaymentResult()->getAuthorizationResponse(), - $createPaymentResponse->getCreatePaymentResult()->getCardResponse(), - $createPaymentResponse->getCreatePaymentResult()->getThreeDSResponse(), - $createPaymentResponse->getCreatePaymentResult()->getFraudManagementResponse() - ); - - // Retrieve new order state and status. - $stateObject = $this->_getPaymentHelper()->nextOrderState($wrapper, $order); - $this->_getHelper()->log("Order #{$order->getIncrementId()}, new state: {$stateObject->getState()}, new status: {$stateObject->getStatus()}."); - - $order->setState($stateObject->getState(), $stateObject->getStatus(), $wrapper->getMessage()); - if ($stateObject->getState() === Mage_Sales_Model_Order::STATE_HOLDED) { // For magento 1.4.0.x - $stateObject->setState($stateObject->getBeforeState()); - $stateObject->setStatus($stateObject->getBeforeStatus()); - } - - // Save gateway responses. - $this->_getPaymentHelper()->updatePaymentInfo($order, $wrapper); - - // Try to create invoice. - $this->_getPaymentHelper()->createInvoice($order); - - $stateObject->setIsNotified(true); - return $stateObject; - } catch(Lyranetwork_Payzen_Model_WsException $e) { - $this->_getHelper()->log("[$requestId] {$e->getMessage()}", Zend_Log::WARN); - - $warn = $this->_getHelper()->__('Please correct this error to use PayZen web services.'); - $this->_getAdminSession()->addWarning($warn); - $this->_getAdminSession()->addError($this->_getHelper()->__($e->getMessage())); - Mage::throwException(''); - } catch(\SoapFault $f) { - $this->_getHelper()->log( - "[$requestId] SoapFault with code {$f->faultcode}: {$f->faultstring}.", - Zend_Log::WARN - ); - $warn = $this->_getHelper()->__('Please correct this error to use PayZen web services.'); - $this->_getAdminSession()->addWarning($warn); - $this->_getAdminSession()->addError($f->faultstring); - Mage::throwException(''); - } catch(\UnexpectedValueException $e) { - $this->_getHelper()->log( - "[$requestId] createPayment error with code {$e->getCode()}: {$e->getMessage()}.", - Zend_Log::ERR - ); - - if ($e->getCode() === -1) { - $this->_getAdminSession()->addError($this->_getHelper()->__('Authentication error ! ')); - } else { - $this->_getAdminSession()->addError($e->getMessage()); - } - - Mage::throwException(''); - } catch (Exception $e) { - $this->_getHelper()->log( - "[$requestId] Exception with code {$e->getCode()}: {$e->getMessage()}", - Zend_Log::ERR - ); - - $this->_getAdminSession()->addError($e->getMessage()); - Mage::throwException(''); - } - } - - - /** * Return true if iframe mode is enabled. * * @return string */ public function isIframeMode() { - return $this->getConfigData('card_info_mode') == 3; + return $this->getConfigData('card_info_mode') == Lyranetwork_Payzen_Helper_Data::MODE_IFRAME; } /** - * Check if the local card type selection option is choosen + * Check if the local card type selection option is choosen. * * @return boolean */ public function isLocalCcType() { - return $this->getConfigData('card_info_mode') == 2; + return $this->getConfigData('card_info_mode') == Lyranetwork_Payzen_Helper_Data::MODE_LOCAL_TYPE; + } + + /** + * Check if the embedded payment fields option is choosen. + * + * @return boolean + */ + public function isEmbedded() { + $embedded = array( + Lyranetwork_Payzen_Helper_Data::MODE_EMBEDDED, + Lyranetwork_Payzen_Helper_Data::MODE_POPIN + ); + + return in_array($this->getConfigData('card_info_mode'), $embedded); } } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Source/Gift/GiftCards.php b/app/code/community/Lyranetwork/Payzen/Model/Source/Gift/GiftCards.php index b3229970..0650bd1c 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Source/Gift/GiftCards.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Source/Gift/GiftCards.php @@ -17,7 +17,7 @@ public function toOptionArray() foreach (Mage::getModel('payzen/payment_gift')->getSupportedGcTypes() as $code => $name) { $options[] = array( 'value' => $code, - 'label' => $name + 'label' => $code . ' - ' . $name ); } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Source/Multi/PaymentCards.php b/app/code/community/Lyranetwork/Payzen/Model/Source/Multi/PaymentCards.php index 2b125057..8b7604b7 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Source/Multi/PaymentCards.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Source/Multi/PaymentCards.php @@ -27,7 +27,7 @@ public function toOptionArray() continue; } - $options[] = array('value' => $code, 'label' => $code . " - " . $name); + $options[] = array('value' => $code, 'label' => $code . ' - ' . $name); } return $options; diff --git a/app/code/community/Lyranetwork/Payzen/Model/Source/PaymentCards.php b/app/code/community/Lyranetwork/Payzen/Model/Source/PaymentCards.php index 4e82155d..d4607f7b 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Source/PaymentCards.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Source/PaymentCards.php @@ -25,7 +25,7 @@ public function toOptionArray() $options[] = array ( 'value' => $code, - 'label' => $code . " - " . $name, + 'label' => $code . ' - ' . $name, ); } diff --git a/app/code/community/Lyranetwork/Payzen/Model/Source/Standard/CardInfoModes.php b/app/code/community/Lyranetwork/Payzen/Model/Source/Standard/CardInfoModes.php index 756eb530..de3f7dce 100644 --- a/app/code/community/Lyranetwork/Payzen/Model/Source/Standard/CardInfoModes.php +++ b/app/code/community/Lyranetwork/Payzen/Model/Source/Standard/CardInfoModes.php @@ -14,8 +14,13 @@ public function toOptionArray() { $options = array(); + $embedded = array( + Lyranetwork_Payzen_Helper_Data::MODE_EMBEDDED, + Lyranetwork_Payzen_Helper_Data::MODE_POPIN + ); + foreach (Mage::helper('payzen')->getConfigArray('card_info_modes') as $code => $name) { - if (($code == 4) && ! Lyranetwork_Payzen_Helper_Data::$pluginFeatures['embedded']) { + if ((in_array($code, $embedded)) && ! Lyranetwork_Payzen_Helper_Data::$pluginFeatures['embedded']) { // Payment with embedded fields option using REST API not available for all. continue; } diff --git a/app/code/community/Lyranetwork/Payzen/Model/WsException.php b/app/code/community/Lyranetwork/Payzen/Model/WsException.php deleted file mode 100644 index f1b2ae03..00000000 --- a/app/code/community/Lyranetwork/Payzen/Model/WsException.php +++ /dev/null @@ -1,14 +0,0 @@ -_getDataHelper()->isMaintenanceMode()) { $message = $this->__('The shop is in maintenance mode.The automatic notification cannot work.'); } else { - $message = $this->__('The automatic validation hasn\'t worked. Have you correctly set up the notification URL in your PayZen Back Office?'); + $message = $this->__('The automatic validation has not worked. Have you correctly set up the notification URL in your PayZen Back Office?'); $message .= '

'; $message .= $this->__('For understanding the problem, please read the documentation of the module:
   - Chapter « To read carefully before going further »
   - Chapter « Notification URL settings »'); } diff --git a/app/code/community/Lyranetwork/Payzen/controllers/CustomerController.php b/app/code/community/Lyranetwork/Payzen/controllers/CustomerController.php new file mode 100644 index 00000000..d7a87991 --- /dev/null +++ b/app/code/community/Lyranetwork/Payzen/controllers/CustomerController.php @@ -0,0 +1,52 @@ +loadLayout(); + $this->_initLayoutMessages('catalog/session'); + + $this->getLayout()->getBlock('head')->setTitle($this->__('My Payment Means')); + + if ($block = $this->getLayout()->getBlock('customer.account.link.back')) { + $block->setRefererUrl($this->_getRefererUrl()); + } + + $this->renderLayout(); + } + + public function cancelAction() + { + // Clear all messages from session. + Mage::getSingleton('core/session')->getMessages(true); + + Mage::helper('payzen')->log('Start ================================================='); + $attribute = $this->getRequest()->getPost('alias', false); + $maskedAttribute = $this->getRequest()->getPost('pm', false); + + $session = Mage::getSingleton('customer/session'); + $customer = $session->getCustomer(); + + if ($customer && $session->isLoggedIn() && $attribute && $maskedAttribute) { + if (Mage::helper('payzen/payment')->deleteIdentifier($attribute, $maskedAttribute)) { + Mage::getSingleton('core/session')->addSuccess(__('The stored means of payment was successfully deleted.')); + } else { + Mage::getSingleton('core/session')->addError(__('The stored means of payment could not be deleted.')); + } + } + + Mage::helper('payzen')->log('End ================================================='); + } +} diff --git a/app/code/community/Lyranetwork/Payzen/controllers/PaymentController.php b/app/code/community/Lyranetwork/Payzen/controllers/PaymentController.php index bfe16f91..2195f74a 100644 --- a/app/code/community/Lyranetwork/Payzen/controllers/PaymentController.php +++ b/app/code/community/Lyranetwork/Payzen/controllers/PaymentController.php @@ -155,7 +155,7 @@ public function restClearCartAction() // Disable quote. $quote->setIsActive(false)->save(); - $this->_getHelper()->log("Cleared quote, reserved order ID: #{$quote->getReservedOrderId()}."); + $this->_getDataHelper()->log("Cleared quote, reserved order ID: #{$quote->getReservedOrderId()}."); } $result['success'] = true; diff --git a/app/code/community/Lyranetwork/Payzen/etc/config.xml b/app/code/community/Lyranetwork/Payzen/etc/config.xml index e10f355d..8bcca89c 100644 --- a/app/code/community/Lyranetwork/Payzen/etc/config.xml +++ b/app/code/community/Lyranetwork/Payzen/etc/config.xml @@ -14,7 +14,7 @@ - 1.11.4 + 1.12.0 @@ -70,8 +70,8 @@ - - + + 1 @@ -195,8 +195,12 @@ 4 - Embedded payment fields (REST API) + Embedded payment fields on merchant site (REST API) + + 5 + Embedded payment fields in a pop-in (REST API) + @@ -496,7 +500,7 @@ Lyra Network support@payzen.eu - 1.11.4 + 1.12.0 V2 Magento_1.4-1.9 1 @@ -510,8 +514,7 @@ payzen/payment/check https://secure.payzen.eu/vads-payment/ https://api.payzen.eu/api-payment/ - https://api.payzen.eu/static/ - https://secure.payzen.eu/vads-ws/v5?wsdl + https://static.payzen.eu/static/ fr @@ -525,6 +528,8 @@ processing 1 + payzen/payment/restCheck + 1 FOOD_AND_GROCERY @@ -551,8 +556,7 @@ 1 Card data will be stored on the secured server of the payment gateway.]]> - payzen/payment/restCheck - classic + classic diff --git a/app/code/community/Lyranetwork/Payzen/etc/system.xml b/app/code/community/Lyranetwork/Payzen/etc/system.xml index d4f53cf8..760dba4a 100644 --- a/app/code/community/Lyranetwork/Payzen/etc/system.xml +++ b/app/code/community/Lyranetwork/Payzen/etc/system.xml @@ -198,12 +198,121 @@ 1 + + + + REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).]]> + payzen/adminhtml_system_config_field_sectionTitle + 30 + 1 + 0 + 1 + + + + + obscure + adminhtml/system_config_backend_encrypted + payment/payzen/rest_private_key_test + 31 + 1 + 1 + 1 + + + + + obscure + adminhtml/system_config_backend_encrypted + payment/payzen/rest_private_key_prod + 32 + 1 + 1 + 1 + + + + + text + payzen/adminhtml_system_config_field_sensitive + payment/payzen/rest_public_key_test + 33 + 1 + 1 + 1 + + + + + text + payzen/adminhtml_system_config_field_sensitive + payment/payzen/rest_public_key_prod + 34 + 1 + 1 + 1 + + + + + obscure + adminhtml/system_config_backend_encrypted + payment/payzen/rest_return_key_test + 35 + 1 + 1 + 1 + + + + + obscure + adminhtml/system_config_backend_encrypted + payment/payzen/rest_return_key_prod + 36 + 1 + 1 + 1 + + + + + text + payment/payzen/rest_url + 37 + 1 + 1 + 1 + + + + + text + payment/payzen/static_url + 38 + 1 + 1 + 1 + + + + + Settings > Notification rules.
In multistore mode, notification URL is the same for all the stores.]]>
+ label + payzen/adminhtml_system_config_field_notifyUrl + payment/payzen/rest_notify_url + 39 + 1 + 1 + 1 +
+ label payzen/adminhtml_system_config_field_sectionTitle - 30 + 40 1 1 1 @@ -215,7 +324,7 @@ select payzen/source_languages payment/payzen/language - 31 + 41 1 1 1 @@ -230,7 +339,7 @@ payzen/source_languages payzen/field_availableLanguages payment/payzen/available_languages - 32 + 42 1 1 1 @@ -241,7 +350,7 @@ text payment/payzen/capture_delay - 33 + 43 1 1 1 @@ -253,7 +362,7 @@ select payzen/source_validationModes payment/payzen/validation_mode - 34 + 44 1 1 1 @@ -264,7 +373,7 @@ label payzen/adminhtml_system_config_field_sectionTitle - 40 + 50 1 1 1 @@ -276,7 +385,7 @@ text payzen/field_themeConfig payment/payzen/theme_config - 41 + 51 1 1 1 @@ -287,7 +396,7 @@ text payment/payzen/shop_name - 42 + 52 1 1 1 @@ -299,7 +408,7 @@ text payzen/field_shopUrl payment/payzen/shop_url - 43 + 53 1 1 1 @@ -310,7 +419,7 @@ label payzen/adminhtml_system_config_field_sectionTitle - 50 + 60 1 1 1 @@ -322,7 +431,7 @@ payzen/adminhtml_system_config_field_threedsCustgroupOptions payzen/field_custgroupOptions payment/payzen/custgroup_threeds_min_amount - 51 + 61 1 1 1 @@ -333,7 +442,7 @@ label payzen/adminhtml_system_config_field_sectionTitle - 60 + 70 1 1 1 @@ -345,7 +454,7 @@ select adminhtml/system_config_source_yesno payment/payzen/redirect_enabled - 61 + 71 1 1 1 @@ -356,7 +465,7 @@ text payment/payzen/redirect_success_timeout - 62 + 72 1 1 1 @@ -370,7 +479,7 @@ text payment/payzen/redirect_success_message - 63 + 73 1 1 1 @@ -384,7 +493,7 @@ text payment/payzen/redirect_error_timeout - 64 + 74 1 1 1 @@ -398,7 +507,7 @@ text payment/payzen/redirect_error_message - 65 + 75 1 1 1 @@ -413,7 +522,7 @@ select payzen/source_returnModes payment/payzen/return_mode - 66 + 76 1 1 1 @@ -425,7 +534,7 @@ select adminhtml/system_config_source_order_status_newprocessing payment/payzen/registered_order_status - 67 + 77 1 1 1 @@ -437,7 +546,7 @@ select adminhtml/system_config_source_yesno payment/payzen/capture_auto - 68 + 78 1 1 1 @@ -451,7 +560,7 @@ label payzen/adminhtml_system_config_field_sectionTitle - 70 + 80 1 0 1 @@ -463,7 +572,7 @@ select adminhtml/system_config_source_yesno payment/payzen/send_cart_detail - 71 + 81 1 1 1 @@ -475,7 +584,7 @@ select payzen/source_categories payment/payzen/common_category - 72 + 82 1 0 1 @@ -486,7 +595,7 @@ payzen/adminhtml_system_config_field_categoryMapping payzen/field_categoryMapping payment/payzen/category_mapping - 73 + 83 1 0 1 @@ -501,7 +610,7 @@ payzen/adminhtml_system_config_field_shipOptions payzen/field_shipOptions payment/payzen/ship_options - 74 + 84 1 0 1 @@ -756,131 +865,31 @@ - - Shops > REST API keys).]]> + text payzen/adminhtml_system_config_field_subSectionTitle - standard_rest_public_key_test,standard_rest_private_key_test,standard_rest_public_key_prod,standard_rest_private_key_prod,standard_rest_return_key_test,standard_rest_return_key_prod,standard_rest_notify_url,standard_rest_theme,standard_rest_placeholders,standard_rest_attempts + standard_rest_theme,standard_rest_placeholders,standard_rest_attempts 45 1 1 1 - 4 + 4,5 - - - obscure - adminhtml/system_config_backend_encrypted - payment/payzen_standard/rest_private_key_test - 46 - 1 - 1 - 1 - - 4 - - - - - - obscure - adminhtml/system_config_backend_encrypted - payment/payzen_standard/rest_private_key_prod - 47 - 1 - 1 - 1 - - 4 - - - - - - text - payzen/adminhtml_system_config_field_sensitive - payment/payzen_standard/rest_public_key_test - 48 - 1 - 1 - 1 - - 4 - - - - - - text - payzen/adminhtml_system_config_field_sensitive - payment/payzen_standard/rest_public_key_prod - 49 - 1 - 1 - 1 - - 4 - - - - - - obscure - adminhtml/system_config_backend_encrypted - payment/payzen_standard/rest_return_key_test - 50 - 1 - 1 - 1 - - 4 - - - - - - obscure - adminhtml/system_config_backend_encrypted - payment/payzen_standard/rest_return_key_prod - 51 - 1 - 1 - 1 - - 4 - - - - - - Settings > Notification rules.
In multistore mode, notification URL is the same for all the stores.]]>
- label - payzen/adminhtml_system_config_field_notifyUrl - payment/payzen_standard/rest_notify_url - 52 - 1 - 1 - 1 - - 4 - -
- select payzen/source_standard_restThemes payment/payzen_standard/rest_theme - 53 + 47 1 1 1 - 4 + 4,5 @@ -890,12 +899,12 @@ payzen/adminhtml_system_config_field_standard_restPlaceholders payzen/field_standard_restPlaceholders payment/payzen_standard/rest_placeholders - 54 + 48 1 1 1 - 4 + 4,5 @@ -904,12 +913,12 @@ text payment/payzen_standard/rest_attempts - 55 + 49 1 1 1 - 4 + 4,5 @@ -2930,7 +2939,7 @@ - + text payment/payzen_other/title 12 @@ -2952,7 +2961,7 @@ - + image payment/payzen_other/module_logo payzen/field_logo diff --git a/app/code/community/Lyranetwork/Payzen/etc/ws.ini b/app/code/community/Lyranetwork/Payzen/etc/ws.ini deleted file mode 100644 index 14fb9463..00000000 --- a/app/code/community/Lyranetwork/Payzen/etc/ws.ini +++ /dev/null @@ -1,9 +0,0 @@ -; enable this option if Server Name Indication (SNI) extension is used -sni.enabled = false - -; configure proxy -proxy.enabled = false -proxy_host = -proxy_port = -proxy_login = -proxy_password = \ No newline at end of file diff --git a/app/code/community/Lyranetwork/Payzen/sql/payzen_setup/mysql4-install-1.6.0.php b/app/code/community/Lyranetwork/Payzen/sql/payzen_setup/mysql4-install-1.6.0.php index 1a6d2e98..0c14fd20 100644 --- a/app/code/community/Lyranetwork/Payzen/sql/payzen_setup/mysql4-install-1.6.0.php +++ b/app/code/community/Lyranetwork/Payzen/sql/payzen_setup/mysql4-install-1.6.0.php @@ -18,7 +18,7 @@ include_once $installFile; } -/* install data just for versions less than 1.6 */ +// Install data just for versions less than 1.6. if (version_compare(Mage::getVersion(), '1.6.0.0', '<')) { /** * @var $this Lyranetwork_Payzen_Model_Resource_Setup diff --git a/app/code/community/Lyranetwork/Payzen/sql/payzen_setup/mysql4-upgrade-1.8.0-1.9.0.php b/app/code/community/Lyranetwork/Payzen/sql/payzen_setup/mysql4-upgrade-1.8.0-1.9.0.php index e4240613..886dd71c 100644 --- a/app/code/community/Lyranetwork/Payzen/sql/payzen_setup/mysql4-upgrade-1.8.0-1.9.0.php +++ b/app/code/community/Lyranetwork/Payzen/sql/payzen_setup/mysql4-upgrade-1.8.0-1.9.0.php @@ -12,7 +12,7 @@ * For backward compatibility (less than 1.6 Magento versions). */ - /* install data just for versions less than 1.6 */ + // Install data just for versions less than 1.6. if (version_compare(Mage::getVersion(), '1.6.0.0', '<')) { /** * @var $this Lyranetwork_Payzen_Model_Resource_Setup diff --git a/app/design/frontend/base/default/layout/payzen.xml b/app/design/frontend/base/default/layout/payzen.xml index 0a7f8a73..fab34cf3 100644 --- a/app/design/frontend/base/default/layout/payzen.xml +++ b/app/design/frontend/base/default/layout/payzen.xml @@ -66,18 +66,18 @@ - - + + - + - - + + @@ -91,8 +91,8 @@ - - + + @@ -102,10 +102,25 @@ - - + + + + + + payzen_payment_meanspayzen/customer/index + + + + + + + + + + + \ No newline at end of file diff --git a/app/design/frontend/base/default/template/payzen/customer/payment_means.phtml b/app/design/frontend/base/default/template/payzen/customer/payment_means.phtml new file mode 100644 index 00000000..52525076 --- /dev/null +++ b/app/design/frontend/base/default/template/payzen/customer/payment_means.phtml @@ -0,0 +1,69 @@ +getStoredPaymentMeans(); + +?> +
+

__('My payment means') ?>

+
+ +
+ + + + + + + + + + + + getCcTypeImageSrc($card['brand'])): ?> + + + + + + + + + +
escapeHtml(__('Type')); ?>escapeHtml(__('Means of payment')); ?>escapeHtml(__('Action')); ?>
<?php echo $this->escapeHtml($card['brand']); ?> + escapeHtml($card['brand']); ?>escapeHtml($card['number']); ?> + + escapeHtml(__('Delete')); ?> + +
+ + +
+ +

escapeHtml(__('You have no stored payment means.')); ?>

+ diff --git a/app/design/frontend/base/default/template/payzen/rest/head.phtml b/app/design/frontend/base/default/template/payzen/rest/head.phtml index c69fc53b..9616ac22 100644 --- a/app/design/frontend/base/default/template/payzen/rest/head.phtml +++ b/app/design/frontend/base/default/template/payzen/rest/head.phtml @@ -32,4 +32,11 @@ if ($cvvLabel = $this->getPlaceholder('cvv')) { kr-language="escapeUrl($this->getLanguage()); ?>"> - \ No newline at end of file + + \ No newline at end of file diff --git a/app/design/frontend/base/default/template/payzen/rest/review.phtml b/app/design/frontend/base/default/template/payzen/rest/review.phtml index 334315f0..19801420 100644 --- a/app/design/frontend/base/default/template/payzen/rest/review.phtml +++ b/app/design/frontend/base/default/template/payzen/rest/review.phtml @@ -12,33 +12,41 @@ \ No newline at end of file diff --git a/app/design/frontend/base/default/template/payzen/standard.phtml b/app/design/frontend/base/default/template/payzen/standard.phtml index cf3c9616..83c3e06a 100644 --- a/app/design/frontend/base/default/template/payzen/standard.phtml +++ b/app/design/frontend/base/default/template/payzen/standard.phtml @@ -10,6 +10,11 @@ $paymentByTokenActive = $this->getConfigData('one_click_active'); // Payment by token active? $customer = Mage::getSingleton('customer/session')->getCustomer(); // Logged-in customer. $isPaymentByToken = $paymentByTokenActive && $customer && $customer->getPayzenIdentifier(); +if ($isPaymentByToken) { + Mage::helper('payzen/rest')->setSessionValidPaymentByToken($customer); + $isPaymentByToken &= Mage::getSingleton('checkout/session')->getValidAlias(); +} + ?>