<?php

$path = '../../lib';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once 'services/PayPalAPIInterfaceService/PayPalAPIInterfaceServiceService.php';
require_once 'PPLoggingManager.php';
$logger = new PPLoggingManager('ManageRecurringPaymentsProfileStatus');
$manageRPPStatusReqestDetails = new ManageRecurringPaymentsProfileStatusRequestDetailsType();
$manageRPPStatusReqestDetails->Action = $_REQUEST['action'];
$manageRPPStatusReqestDetails->ProfileID = $_REQUEST['profileID'];
$manageRPPStatusReqest = new ManageRecurringPaymentsProfileStatusRequestType();
$manageRPPStatusReqest->ManageRecurringPaymentsProfileStatusRequestDetails = $manageRPPStatusReqestDetails;
$manageRPPStatusReqest->Version = 92;
$manageRPPStatusReq = new ManageRecurringPaymentsProfileStatusReq();
$manageRPPStatusReq->ManageRecurringPaymentsProfileStatusRequest = $manageRPPStatusReqest;
$paypalService = new PayPalAPIInterfaceServiceService();
$manageRPPStatusResponse = $paypalService->ManageRecurringPaymentsProfileStatus($manageRPPStatusReq);
echo "<pre>";
print_r($manageRPPStatusResponse);
echo "</pre>";
require_once '../Response.php';
Exemplo n.º 2
0
 function performAction($sProfileId, $sAction = BX_SITES_PP_RPA_CANCEL)
 {
     if (empty($sProfileId)) {
         return false;
     }
     $oRPPStatusReqestDetails = new ManageRecurringPaymentsProfileStatusRequestDetailsType();
     $oRPPStatusReqestDetails->Action = $sAction;
     $oRPPStatusReqestDetails->ProfileID = $sProfileId;
     $oRPPStatusReqest = new ManageRecurringPaymentsProfileStatusRequestType();
     $oRPPStatusReqest->ManageRecurringPaymentsProfileStatusRequestDetails = $oRPPStatusReqestDetails;
     $oRPPStatusReq = new ManageRecurringPaymentsProfileStatusReq();
     $oRPPStatusReq->ManageRecurringPaymentsProfileStatusRequest = $oRPPStatusReqest;
     $oPaypalService = new PayPalAPIInterfaceServiceService();
     try {
         $oRPPStatusResponse = $oPaypalService->ManageRecurringPaymentsProfileStatus($oRPPStatusReq);
     } catch (Exception $oException) {
         $this->_logException($oException);
         return false;
     }
     if (!isset($oRPPStatusResponse)) {
         $sLog = "---\n";
         $sLog .= "--- Perform Action: {date}\n";
         $sLog .= "--- Request: " . $oPaypalService->getLastRequest() . "\n";
         $sLog .= "--- Response: " . $oPaypalService->getLastResponse() . "\n";
         $sLog .= "---\n";
         $this->_logError($sLog);
         return false;
     }
     if ($oRPPStatusResponse->Ack == 'Success') {
         $oAccount = $this->_oModule->getObject('Account');
         $oAccount->onActionPerformed($sProfileId, $sAction);
     }
     return true;
 }