PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
wiloke-listing-tools
/
app
/
Framework
/
Payment
/
PayPal
<?php namespace WilokeListingTools\Framework\Payment\PayPal; use WilokeListingTools\Framework\Helpers\FileSystem; use WilokeListingTools\Framework\Payment\PaymentHook\ProceededPaymentHookInterface; use WilokeListingTools\Framework\Payment\PaymentHook\ProceedRecurringPaymentHookAbstract; use WilokeListingTools\Framework\Payment\PayPalPayment; use WilokeListingTools\Framework\Payment\WebhookInterface; final class PayPalProceededRecurringPaymentHook extends ProceedRecurringPaymentHookAbstract implements ProceededPaymentHookInterface { protected $aArgs; private $oPayPalExecution; /** * PayPalProceededNonRecurringPayment constructor. * * @param PayPalExecuteNonRecurringPayment $oPayPalExecution */ public function __construct(PayPalPayment $oPayPalExecution) { $this->oPayPalExecution = $oPayPalExecution; $nextBillingDateGMT = ''; if (isset($this->oPayPalExecution->nextBillingDateGMT)) { $nextBillingDateGMT = $this->oPayPalExecution->nextBillingDateGMT; } elseif (isset($this->oPayPalExecution->aPaymentMeta['nextBillingDateGMT'])) { $nextBillingDateGMT = $this->oPayPalExecution->aPaymentMeta['nextBillingDateGMT']; } parent::__construct( $this->oPayPalExecution->paymentID, $nextBillingDateGMT ); $this->getCommonArgs(); } private function getCommonArgs() { $this->aArgs = $this->setupSuccessArgs(); } private function verifySubscriptionID() { if (isset($this->oPayPalExecution->subscriptionID)) { $this->aArgs['subscriptionID'] = $this->oPayPalExecution->subscriptionID; } elseif (isset($this->oPayPalExecution->aPaymentMeta['subscriptionID'])) { $this->aArgs['subscriptionID'] = $this->oPayPalExecution->aPaymentMeta['subscriptionID']; } if (empty($this->aArgs['subscriptionID'])) { FileSystem::logError('Missing subscriptionID ID. Payment ID: '.$this->oPayPalExecution->paymentID); return false; } return true; } public function completed() { if (!$this->verifySubscriptionID()) { return false; } $this->aArgs['aInvoiceFormat'] = $this->oPayPalExecution->aInvoiceFormat; /** * @hooked: WilokeListingTools\Controllers\PaymentController:updatePaymentCompletedStatus 5 */ do_action('wilcity/wiloke-listing-tools/'.$this->aArgs['billingType'].'/payment-gateway-completed', $this->aArgs); /** * @hooked: SessionController:deletePaymentSessions */ do_action('wiloke-submission/payment-succeeded-and-updated-everything'); } public function active() { $this->completed(); } public function suspended() { if (!$this->verifySubscriptionID()) { return false; } do_action('wilcity/wiloke-listing-tools/'.$this->aArgs['billingType'].'/payment-gateway-suspended', $this->aArgs); /** * @hooked: SessionController:deletePaymentSessions */ do_action('wiloke-submission/payment-succeeded-and-updated-everything'); } public function reactivate() { if (!$this->verifySubscriptionID()) { return false; } $this->completed(); } }
[+]
..
[-] PayPalConfiguration.php
[edit]
[-] PayPalRefundNonRecurringPayment.php
[edit]
[-] Webhook.php
[edit]
[-] PayPalRecurringPaymentMethod.php
[edit]
[-] PayPalExecuteRecurringPayment.php
[edit]
[-] PayPalProceededRecurringPaymentHook.php
[edit]
[-] PayPalCancelPlan.php
[edit]
[-] PayPalHelps.php
[edit]
[-] PayPalWebhook.php
[edit]
[-] PayPalGetBillingAgreement.php
[edit]
[-] PayPalAuthentication.php
[edit]
[-] PayPalSuspendPlan.php
[edit]
[-] PayPalValidations.php
[edit]
[-] cert_key.pem
[edit]
[-] PayPalExecuteInterface.php
[edit]
[-] PayPalRecurringPrepareInvoiceFormat.php
[edit]
[-] ConvertPayPalStatusToWilokeStatus.php
[edit]
[-] PayPalChangePlan.php
[edit]
[-] PayPalSetupAPIContext.php
[edit]
[-] PayPalNonRecurringPrepareInvoiceFormat.php
[edit]
[-] PayPalNonRecurringPaymentMethod.php
[edit]
[-] PayPalCancelRecurringPayment.php
[edit]
[-] PayPalExecutePaymentAbstract.php
[edit]
[-] PayPalProceededNonRecurringPaymentHook.php
[edit]
[-] PayPalNonRecurringCreatedPaymentHook.php
[edit]
[-] RemainingItemsInNonRecurringPayPal.php
[edit]
[-] PaypalUpdateBillingAgreement.php
[edit]
[-] ChangePlan.php
[edit]
[-] PayPalReactivePlan.php
[edit]
[-] PayPalExecutePromotionPayment.php
[edit]
[-] PayPalGetSubscriptionStatus.php
[edit]
[-] PayPalRecurringCreatedPaymentHook.php
[edit]
[-] PayPalGenerateUrls.php
[edit]
[-] PayPalExecuteNonRecurringPayment.php
[edit]