PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
wiloke-listing-tools
/
app
/
Framework
/
Payment
/
PayPal
<?php namespace WilokeListgoFunctionality\Framework\Payment\PayPal; use PayPal\Api\Agreement; use PayPal\Api\Patch; use PayPal\Api\PatchRequest; class PaypalUpdateBillingAgreement { protected $oApiContext; public function test($agreementID){ $createdAgreement = Agreement::get($agreementID); $instPayPalConfiguration = PayPalConfiguration::setup(); $this->oApiContext = $instPayPalConfiguration->getApiContext(); $patch = new Patch(); $patch->setOp('replace') ->setPath('/') ->setValue(json_decode('{ "description": "New Description", "shipping_address": { "line1": "2065 Hamilton Ave", "city": "San Jose", "state": "CA", "postal_code": "95125", "country_code": "US" } }')); $patchRequest = new PatchRequest(); $patchRequest->addPatch($patch); try { $createdAgreement->update($patchRequest, $this->oApiContext); // Lets get the updated Agreement Object $agreement = Agreement::get($createdAgreement->getId(), $this->oApiContext); var_export($agreement);die(); } catch (\Exception $ex) { var_export($ex->getMessage());die(); } } }
[+]
..
[-] 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]