Ejemplo n.º 1
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
$InvoiceID = 'INV2-NV29-RP49-7ERJ-8L6C';
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->MarkInvoiceAsUnpaid($InvoiceID);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 2
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$MarkInvoiceAsPaidFields = array('InvoiceID' => '', 'Method' => '', 'Note' => '', 'Date' => '');
$PayPalRequestData = array('MarkInvoiceAsPaidFields' => $MarkInvoiceAsPaidFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->MarkInvoiceAsPaid($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 3
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Pay
$PayRequestFields = array('ActionType' => '', 'CancelURL' => '', 'CurrencyCode' => '', 'FeesPayer' => '', 'IPNNotificationURL' => '', 'Memo' => '', 'Pin' => '', 'PreapprovalKey' => '', 'ReturnURL' => '', 'ReverseAllParallelPaymentsOnError' => '', 'SenderEmail' => '', 'TrackingID' => '');
$ClientDetailsFields = array('CustomerID' => '', 'CustomerType' => '', 'GeoLocation' => '', 'Model' => '', 'PartnerName' => '');
$FundingTypes = array('ECHECK', 'BALANCE', 'CREDITCARD');
// Funding constrainigs require advanced permissions levels.
$Receivers = array();
$Receiver = array('Amount' => '', 'Email' => '', 'InvoiceID' => '', 'PaymentType' => '', 'PaymentSubType' => '', 'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => ''), 'Primary' => '');
array_push($Receivers, $Receiver);
$SenderIdentifierFields = array('UseCredentials' => '');
$AccountIdentifierFields = array('Email' => '', 'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => ''));
// SetPaymentOptions
$SPOFields = array('PayKey' => '', 'ShippingAddressID' => '');
$DisplayOptions = array('EmailHeaderImageURL' => '', 'EmailMarketingImageURL' => '', 'HeaderImageURL' => '', 'BusinessName' => '');
$InstitutionCustomer = array('CountryCode' => '', 'DisplayName' => '', 'InstitutionCustomerEmail' => '', 'FirstName' => '', 'LastName' => '', 'InstitutionCustomerID' => '', 'InstitutionID' => '');
$SenderOptions = array('RequireShippingAddressSelection' => '');
// Begin loop to populate receiver options.
$ReceiverOptions = array();
$ReceiverOption = array('Description' => '', 'CustomID' => '');
$InvoiceData = array('TotalTax' => '', 'TotalShipping' => '');
$InvoiceItems = array();
$InvoiceItem = array('Name' => '', 'Identifier' => '', 'Price' => '', 'ItemPrice' => '', 'ItemCount' => '');
array_push($InvoiceItems, $InvoiceItem);
$ReceiverIdentifier = array('Email' => '', 'PhoneCountryCode' => '', 'PhoneNumber' => '', 'PhoneExtension' => '');
Ejemplo n.º 4
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$SearchInvoicesFields = array('MerchantEmail' => '', 'Page' => '', 'PageSize' => '');
$Parameters = array('Email' => '', 'RecipientName' => '', 'BusinessName' => '', 'InvoiceNumber' => '', 'Status' => '', 'LowerAmount' => '', 'UpperAmount' => '', 'CurrencyCode' => '', 'Memo' => '', 'Origin' => '', 'InvoiceDate' => array('StartDate' => '', 'EndDate' => ''), 'DueDate' => array('StartDate' => '', 'EndDate' => ''), 'PaymentDate' => array('StartDate' => '', 'EndDate' => ''), 'CreationDate' => array('StartDate' => '', 'EndDate' => ''));
$PayPalRequestData = array('SearchInvoicesFields' => $SearchInvoicesFields, 'Parameters' => $Parameters);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->SearchInvoices($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 5
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
$InvoiceID = 'INV2-YMM7-96UZ-2ZR5-HDP6';
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->DeleteInvoice($InvoiceID);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 6
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$BaseAmountList = array();
$BaseAmountData = array('Code' => '', 'Amount' => '');
array_push($BaseAmountList, $BaseAmountData);
$ConvertToCurrencyList = array('USD', 'AUD', 'CAD');
// Currency Codes
$PayPalRequestData = array('BaseAmountList' => $BaseAmountList, 'ConvertToCurrencyList' => $ConvertToCurrencyList);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->ConvertCurrency($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 7
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$AddBankAccountFields = array('AccountHolderDateOfBirth' => '', 'AccountID' => '', 'AgencyNumber' => '', 'BankAccountNumber' => '', 'BankAccountType' => '', 'BankCode' => '', 'BankCountryCode' => '', 'BankName' => '', 'BankTransitNumber' => '', 'BranchCode' => '', 'BranchLocation' => '', 'BSBNumber' => '', 'CLABE' => '', 'ConfirmationType' => '', 'ControlDigit' => '', 'EmailAddress' => '', 'IBAN' => '', 'InstitutionNumber' => '', 'PartnerInfo' => '', 'RibKey' => '', 'RoutingNumber' => '', 'SortCode' => '', 'TaxIDType' => '', 'TaxIDNumber' => '');
$WebOptions = array('CancelURL' => '', 'CancelURLDescription' => '', 'ReturnURL' => '', 'ReturnURLDescription' => '');
$PayPalRequestData = array('AddBankAccountFields' => $AddBankAccountFields, 'WebOptions' => $WebOptions);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->AddBankAccount($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$PayKey = 'AP-69Y76588A7139944D';
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->GetShippingAddresses($PayKey);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$AttributeList = array('http://axschema.org/birthDate', 'http://axschema.org/contact/postalCode/home', 'http://schema.openid.net/contact/street1', 'http://schema.openid.net/contact/street2', 'http://axschema.org/contact/city/home', 'http://axschema.org/contact/state/home', 'http://axschema.org/contact/phone/default');
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->GetAdvancedPersonalData($AttributeList);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 10
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$CreateInvoiceFields = array('MerchantEmail' => '', 'PayerEmail' => '', 'Number' => '', 'CurrencyCode' => '', 'InvoiceDate' => '', 'DueDate' => '', 'PaymentTerms' => '', 'DiscountPercent' => '', 'DiscountAmount' => '', 'Terms' => '', 'Note' => '', 'MerchantMemo' => '', 'ShippingAmount' => '', 'ShippingTaxName' => '', 'ShippingTaxRate' => '', 'LogoURL' => '');
$BusinessInfo = array('FirstName' => '', 'LastName' => '', 'BusinessName' => '', 'Phone' => '', 'Fax' => '', 'Website' => '', 'Custom' => '');
$BusinessInfoAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$BillingInfo = array('FirstName' => '', 'LastName' => '', 'BusinessName' => '', 'Phone' => '', 'Fax' => '', 'Website' => '', 'Custom' => '');
$BillingInfoAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$ShippingInfo = array('FirstName' => '', 'LastName' => '', 'BusinessName' => '', 'Phone' => '', 'Fax' => '', 'Website' => '', 'Custom' => '');
$ShippingInfoAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
// For invoice items you populate a nested array with multiple $InvoiceItem arrays.  Normally you'll be looping through cart items to populate the $InvoiceItem
// array and then push it into the $InvoiceItems array at the end of each loop for an entire collection of all items in $InvoiceItems.
$InvoiceItems = array();
$InvoiceItem = array('Name' => '', 'Description' => '', 'Date' => '', 'Quantity' => '', 'UnitPrice' => '', 'TaxName' => '', 'TaxRate' => '');
array_push($InvoiceItems, $InvoiceItem);
$PayPalRequestData = array('CreateInvoiceFields' => $CreateInvoiceFields, 'BusinessInfo' => $BusinessInfo, 'BusinessInfoAddress' => $BusinessInfoAddress, 'BillingInfo' => $BillingInfo, 'BillingInfoAddress' => $BillingInfoAddress, 'ShippingInfo' => $ShippingInfo, 'ShippingInfoAddress' => $ShippingInfoAddress, 'InvoiceItems' => $InvoiceItems);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->CreateInvoice($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 11
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$UpdateInvoiceFields = array('InvoiceID' => '', 'MerchantEmail' => '', 'PayerEmail' => '', 'Number' => '', 'CurrencyCode' => '', 'InvoiceDate' => '', 'DueDate' => '', 'PaymentTerms' => '', 'DiscountPercent' => '', 'DiscountAmount' => '', 'Terms' => '', 'Note' => '', 'MerchantMemo' => '', 'ShippingAmount' => '', 'ShippingTaxName' => '', 'ShippingTaxRate' => '', 'LogoURL' => '');
$BusinessInfo = array('FirstName' => '', 'LastName' => '', 'BusinessName' => '', 'Phone' => '', 'Fax' => '', 'Website' => '', 'Custom' => '');
$BusinessInfoAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$BillingInfo = array('FirstName' => '', 'LastName' => '', 'BusinessName' => '', 'Phone' => '', 'Fax' => '', 'Website' => '', 'Custom' => '');
$BillingInfoAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$ShippingInfo = array('FirstName' => '', 'LastName' => '', 'BusinessName' => '', 'Phone' => '', 'Fax' => '', 'Website' => '', 'Custom' => '');
$ShippingInfoAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
// For invoice items you populate a nested array with multiple $InvoiceItem arrays.  Normally you'll be looping through cart items to populate the $InvoiceItem
// array and then push it into the $InvoiceItems array at the end of each loop for an entire collection of all items in $InvoiceItems.
$InvoiceItems = array();
$InvoiceItem = array('Name' => '', 'Description' => '', 'Date' => '', 'Quantity' => '', 'UnitPrice' => '', 'TaxName' => '', 'TaxRate' => '');
array_push($InvoiceItems, $InvoiceItem);
$PayPalRequestData = array('UpdateInvoiceFields' => $UpdateInvoiceFields, 'BusinessInfo' => $BusinessInfo, 'BusinessInfoAddress' => $BusinessInfoAddress, 'BillingInfo' => $BillingInfo, 'BillingInfoAddress' => $BillingInfoAddress, 'ShippingInfo' => $ShippingInfo, 'ShippingInfoAddress' => $ShippingInfoAddress, 'InvoiceItems' => $InvoiceItems);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->UpdateInvoice($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 12
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$AddPaymentCardFields = array('AccountID' => '', 'CardNumber' => '', 'CardOwnerDateOfBirth' => '', 'CardType' => '', 'CardVerificationNumber' => '', 'ConfirmationType' => '', 'CreateAccountKey' => '', 'EmailAddress' => '', 'IssueNumber' => '', 'StartDate' => '');
$NameOnCard = array('Salutation' => '', 'FirstName' => '', 'MiddleName' => '', 'LastName' => '', 'Suffix' => '');
$BillingAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$ExpirationDate = array('Month' => '', 'Year' => '');
$WebOptions = array('CancelURL' => '', 'CancelURLDescription' => '', 'ReturnURL' => '', 'ReturnURLDescription' => '');
$PayPalRequestData = array('AddPaymentCardFields' => $AddPaymentCardFields, 'NameOnCard' => $NameOnCard, 'BillingAddress' => $BillingAddress, 'ExpirationDate' => $ExpirationDate, 'WebOptions' => $WebOptions);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->AddPaymentCard($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 13
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$GetAccessTokenFields = array('Token' => 'AAAAAAAVVExe6AWkB5ZG', 'Verifier' => 'oL6Qp.fwlaI-Izt-MwFbRQ');
$PayPalRequestData = array('GetAccessTokenFields' => $GetAccessTokenFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->GetAccessToken($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 14
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Process API request
$PayPalResult = $PayPal->GenerateInvoiceNumber();
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$SetFundingSourceConfirmedFields = array('AccountID' => '', 'EmailAddress' => '', 'FundingSourceKey' => '');
$PayPalRequestData = array('SetFundingSourceConfirmedFields' => $SetFundingSourceConfirmedFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->SetFundingSourceConfirmed($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 16
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$Scope = array('EXPRESS_CHECKOUT', 'DIRECT_PAYMENT', 'BILLING_AGREEMENT', 'REFERENCE_TRANSACTION', 'TRANSACTION_DETAILS', 'TRANSACTION_SEARCH', 'RECURRING_PAYMENTS', 'ACCOUNT_BALANCE', 'ENCRYPTED_WEBSITE_PAYMENTS', 'REFUND', 'NON_REFERENCED_CREDIT', 'BUTTON_MANAGER', 'MANAGE_PENDING_TRANSACTION_STATUS', 'RECURRING_PAYMENT_REPORT', 'EXTENDED_PRO_PROCESSING_REPORT', 'EXCEPTION_PROCESSING_REPORT', 'ACCOUNT_MANAGEMENT_PERMISSION', 'ACCESS_BASIC_PERSONAL_DATA', 'ACCESS_ADVANCED_PERSONAL_DATA');
$RequestPermissionsFields = array('Scope' => $Scope, 'Callback' => $domain . 'paypal/class/1.4/samples/RequestPermissions-Callback.php');
$PayPalRequestData = array('RequestPermissionsFields' => $RequestPermissionsFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->RequestPermissions($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$PreapprovalDetailsFields = array('GetBillingAddress' => '', 'PreapprovalKey' => '');
$PayPalRequestData = array('PreapprovalDetailsFields' => $PreapprovalDetailsFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->PreapprovalDetails($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 18
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$PreapprovalFields = array('CancelURL' => $domain . 'cancel.php', 'CurrencyCode' => 'USD', 'DateOfMonth' => '', 'DayOfWeek' => '', 'EndingDate' => '2013-12-31', 'IPNNotificationURL' => 'http://sandbox.angelleye.com/paypal/ipn/ipn-listener.php', 'MaxAmountPerPayment' => '', 'MaxNumberOfPayments' => '', 'MaxTotalAmountOfPaymentsPerPeriod' => '', 'MaxTotalAmountOfAllPayments' => '', 'Memo' => '', 'PaymentPeriod' => '', 'PinType' => '', 'ReturnURL' => $domain . 'return.php', 'SenderEmail' => '', 'StartingDate' => '2013-09-24', 'FeesPayer' => '', 'RequireInstantFundingSource' => '', 'DisplayMaxTotalAmount' => '');
$ClientDetailsFields = array('CustomerID' => '', 'CustomerType' => '', 'GeoLocation' => '', 'Model' => '', 'PartnerName' => '');
$PayPalRequestData = array('PreapprovalFields' => $PreapprovalFields, 'ClientDetailsFields' => $ClientDetailsFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->Preapproval($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
header('Location: ' . $PayPalResult['RedirectURL']);
Ejemplo n.º 19
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$InvoiceID = 'INV2-3283-QFCE-5L2E-4FCH';
$PayPalResult = $PayPal->GetInvoiceDetails($InvoiceID);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
<?php

// Include required library files.
require_once 'includes/config.php';
require_once 'angelleye-paypal-php-lib/autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$PayRequestFields = array('ActionType' => '', 'CancelURL' => '', 'CurrencyCode' => '', 'FeesPayer' => '', 'IPNNotificationURL' => '', 'Memo' => '', 'Pin' => '', 'PreapprovalKey' => '', 'ReturnURL' => '', 'ReverseAllParallelPaymentsOnError' => '', 'SenderEmail' => '', 'TrackingID' => '');
$ClientDetailsFields = array('CustomerID' => '', 'CustomerType' => '', 'GeoLocation' => '', 'Model' => '', 'PartnerName' => '');
$FundingTypes = array('ECHECK', 'BALANCE', 'CREDITCARD');
// Funding constrainigs require advanced permissions levels.
$Receivers = array();
$Receiver = array('Amount' => '', 'Email' => '', 'AccountID' => '', 'InvoiceID' => '', 'PaymentType' => '', 'PaymentSubType' => '', 'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => ''), 'Primary' => '');
array_push($Receivers, $Receiver);
$SenderIdentifierFields = array('UseCredentials' => '');
$AccountIdentifierFields = array('Email' => '', 'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => ''));
$PayPalRequestData = array('PayRequestFields' => $PayRequestFields, 'ClientDetailsFields' => $ClientDetailsFields, 'FundingTypes' => $FundingTypes, 'Receivers' => $Receivers, 'SenderIdentifierFields' => $SenderIdentifierFields, 'AccountIdentifierFields' => $AccountIdentifierFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->Pay($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 21
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$RemindInvoiceFields = array('InvoiceID' => '', 'Subject' => '', 'NoteForPayer' => '');
$PayPalRequestData = array('RemindInvoiceFields' => $RemindInvoiceFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->RemindInvoice($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 22
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$ExecutePaymentFields = array('PayKey' => '', 'FundingPlanID' => '');
$PayPalRequestData = array('ExecutePaymentFields' => $ExecutePaymentFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->ExecutePayment($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$AttributeList = array('http://axschema.org/namePerson/first', 'http://axschema.org/namePerson/last', 'http://axschema.org/contact/email', 'http://axschema.org/contact/fullname', 'http://openid.net/schema/company/name', 'http://axschema.org/contact/country/home', 'https://www.paypal.com/webapps/auth/schema/payerID');
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->GetBasicPersonalData($AttributeList);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 24
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$CreateAccountFields = array('AccountType' => '', 'CitizenshipCountryCode' => '', 'ContactPhoneNumber' => '', 'HomePhoneNumber' => '', 'MobilePhoneNumber' => '', 'ReturnURL' => '', 'ShowAddCreditCard' => '', 'ShowMobileConfirm' => '', 'ReturnURLDescription' => '', 'UseMiniBrowser' => '', 'ReminderEmailFrequency' => '', 'ConfirmEmail' => '', 'CurrencyCode' => '', 'DateOfBirth' => '', 'EmailAddress' => '', 'FunctionalArea' => '', 'Salutation' => '', 'FirstName' => '', 'MiddleName' => '', 'LastName' => '', 'Suffix' => '', 'NotificationURL' => '', 'Occupation' => '', 'PreferredLanguageCode' => '', 'RegistrationType' => '', 'SuppressWelcomeEmail' => '', 'PerformExtraVettingOnThisAccount' => '', 'PurposeOfAccount' => '', 'Profession' => '', 'TaxID' => '');
$GovernmentIDPair = array('Value' => '', 'Type' => '');
$LegalAgreement = array('Accepted' => '', 'Type' => '');
$BusinessInfo = array('AverageMonthlyVolume' => '', 'AveragePrice' => '', 'BusinessName' => '', 'BusinessSubType' => '', 'BusinessType' => '', 'Category' => '', 'CommercialRegistrationLocation' => '', 'CompanyID' => '', 'CustomerServiceEmail' => '', 'CustomerServicePhone' => '', 'DateOfEstablishment' => '', 'DisputeEmail' => '', 'DoingBusinessAs' => '', 'EstablishmentCountryCode' => '', 'EstablishmentState' => '', 'IncorporationID' => '', 'MerchantCategoryCode' => '', 'PercentageRevenueFromOnline' => '', 'SalesVenu' => '', 'SalesVenuDesc' => '', 'SubCategory' => '', 'VatCountryCode' => '', 'VatID' => '', 'WebSite' => '', 'WorkPhone' => '');
$BusinessAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$PrinciplePlaceOfBusinessAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$RegisteredOfficeAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$BusinessStakeHolder = array('DateOfBirth' => '', 'FullLegalName' => '', 'Salutation' => '', 'FirstName' => '', 'MiddleName' => '', 'LastName' => '', 'Suffix' => '', 'Role' => '', 'CountryCode' => '');
$BusinessStakeHolderAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$Address = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$PartnerFields = array('Field1' => '', 'Field2' => '', 'Field3' => '', 'Field4' => '', 'Field5' => '');
$PayPalRequestData = array('CreateAccountFields' => $CreateAccountFields, 'BusinessInfo' => $BusinessInfo, 'BusinessAddress' => $BusinessAddress, 'GovernmentIDPair' => $GovernmentIDPair, 'LegalAgreement' => $LegalAgreement, 'PrinciplePlaceOfBusinessAddress' => $PrinciplePlaceOfBusinessAddress, 'RegisteredOfficeAddress' => $RegisteredOfficeAddress, 'BusinessStakeHolder' => $BusinessStakeHolder, 'BusinessStakeHolderAddress' => $BusinessStakeHolderAddress, 'Address' => $Address, 'PartnerFields' => $PartnerFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->CreateAccount($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 25
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$GetVerifiedStatusFields = array('EmailAddress' => '*****@*****.**', 'FirstName' => 'Drew', 'LastName' => 'Angell', 'MatchCriteria' => 'NAME');
$PayPalRequestData = array('GetVerifiedStatusFields' => $GetVerifiedStatusFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->GetVerifiedStatus($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
 /**
  * Perform PayPal Pre Approval request and return the result.
  * Prepare all config vars for PayPal Request
  * @params $EM_Booking
  * @returns array $PayPalResponse
  */
 function paypal_pre_approval($EM_Booking)
 {
     // Get Adaptive Payments Pay Key
     require_once 'lib/angelleye/PayPal/PayPal.php';
     require_once 'lib/angelleye/PayPal/Adaptive.php';
     // Create PayPal object.
     $PayPalConfig = array('IPAddress' => $_SERVER['REMOTE_ADDR'], 'APISubject' => '', 'LogResults' => false, 'LogPath' => $_SERVER['DOCUMENT_ROOT'] . '/logs/');
     // Differing values for Sandbox or Live
     if (get_option('em_' . $this->gateway . "_status") == 'test') {
         $PayPalConfig['DeveloperAccountEmail'] = get_option('em_' . $this->gateway . "_dev_email");
         $PayPalConfig['LogResults'] = true;
         $PayPalConfig['Sandbox'] = true;
         $PayPalConfig['ApplicationID'] = 'APP-80W284485P519543T';
         $PayPalConfig['APIUsername'] = get_option('em_' . $this->gateway . "_api_sb_username");
         $PayPalConfig['APIPassword'] = get_option('em_' . $this->gateway . "_api_sb_password");
         $PayPalConfig['APISignature'] = get_option('em_' . $this->gateway . "_api_sb_signature");
         $pp_account_email = get_option('em_' . $this->gateway . "_sb_email");
     } else {
         $PayPalConfig['Sandbox'] = false;
         $PayPalConfig['ApplicationID'] = get_option('em_' . $this->gateway . "_app_id");
         $PayPalConfig['APIUsername'] = get_option('em_' . $this->gateway . "_api_username");
         $PayPalConfig['APIPassword'] = get_option('em_' . $this->gateway . "_api_password");
         $PayPalConfig['APISignature'] = get_option('em_' . $this->gateway . "_api_signature");
         $pp_account_email = get_option('em_' . $this->gateway . "_email");
     }
     $PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
     if (get_option('em_' . $this->gateway . "_return")) {
         $return_url = get_option('em_' . $this->gateway . "_return");
     } else {
         $return_url = get_permalink(get_option("dbem_my_bookings_page")) . '?thanks=1';
     }
     // Optional
     /*
     $ClientDetailsFields = array(
     	'CustomerID' => '', 								// Your ID for the sender  127 char max.
     	'CustomerType' => '', 								// Your ID of the type of customer.  127 char max.
     	'GeoLocation' => '', 								// Sender's geographic location
     	'Model' => '', 										// A sub-identification of the application.  127 char max.
     	'PartnerName' => ''									// Your organization's name or ID
     );
     */
     // Funding constraints require advanced permissions levels.
     //$FundingTypes = array('ECHECK', 'BALANCE', 'CREDITCARD');
     $Receivers = array();
     $Receiver = array('Amount' => $EM_Booking->get_price(false, false, true), 'Email' => $pp_account_email, 'InvoiceID' => '', 'PaymentType' => '', 'PaymentSubType' => '', 'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => ''), 'Primary' => 'true');
     array_push($Receivers, $Receiver);
     /*
     		$Receiver = array(
     			'Amount' => '50.00', 											// Required.  Amount to be paid to the receiver.
     			'Email' => '*****@*****.**', 												// Receiver's email address. 127 char max.
     			'InvoiceID' => '', 											// The invoice number for the payment.  127 char max.
     			'PaymentType' => '', 										// Transaction type.  Values are:  GOODS, SERVICE, PERSONAL, CASHADVANCE, DIGITALGOODS
     			'PaymentSubType' => '', 									// The transaction subtype for the payment.
     			'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => ''), // Receiver's phone number.   Numbers only.
     			'Primary' => 'false'												// Whether this receiver is the primary receiver.  Values are boolean:  TRUE, FALSE
     		);
     		array_push($Receivers,$Receiver);
     */
     // This is the big one. Hook into this to add or modify Receivers. Without multiple receivers Chained payment request will fail.
     $Receivers = apply_filters('em_gateway_paypal_chained_receivers', $Receivers, $EM_Booking, $this);
     //if( count( $Receivers ) > 1
     // Filter to allow fees payer setting to be modified on booking by booking basis
     $fees_payer = apply_filters('em_gateway_paypal_chained_fees_payer', get_option('em_' . $this->gateway . "_fees_payer"), $Receivers, $EM_Booking, $this);
     // Prepare request arrays, only creating chained payment settings if more than one receiver
     $PayRequestFields = array('ActionType' => 'PAY', 'CancelURL' => '<![CDATA[' . get_option('em_' . $this->gateway . "_cancel_return") . ']]>', 'CurrencyCode' => get_option('dbem_bookings_currency', 'USD'), 'FeesPayer' => $fees_payer, 'IPNNotificationURL' => '<![CDATA[' . $this->get_payment_return_url() . ']]>', 'Memo' => '<![CDATA[Booking for ' . $EM_Booking->get_event()->event_name . ']]>', 'ReturnURL' => '<![CDATA[' . $return_url . ']]>', 'SenderEmail' => '', 'TrackingID' => $EM_Booking->booking_id);
     // Optional
     /*
     $SenderIdentifierFields = array(
     	'UseCredentials' => ''						// If TRUE, use credentials to identify the sender.  Default is false.
     );
     */
     // Optional
     /*
     $AccountIdentifierFields = array(
     	'Email' => '', 								// Sender's email address.  127 char max.
     	'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => '')								// Sender's phone number.  Numbers only.
     );
     */
     $PayPalRequestData = array('PayRequestFields' => $PayRequestFields, 'Receivers' => $Receivers);
     // Add hook for Request Data
     $PayPalRequestData = apply_filters('em_gateway_paypal_chained_paypal_request_data', $PayPalRequestData, $EM_Booking, $this);
     //error_log( print_r( $PayPalRequestData, true ) );
     // Pass data into class for processing with PayPal and load the response array into $PayPalResult
     $PayPalResult = $PayPal->Pay($PayPalRequestData);
     return $PayPalResult;
 }
Ejemplo n.º 27
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$SPOFields = array('PayKey' => '', 'ShippingAddressID' => '');
$DisplayOptions = array('EmailHeaderImageURL' => '', 'EmailMarketingImageURL' => '', 'HeaderImageURL' => '', 'BusinessName' => '');
$InstitutionCustomer = array('CountryCode' => '', 'DisplayName' => '', 'InstitutionCustomerEmail' => '', 'FirstName' => '', 'LastName' => '', 'InstitutionCustomerID' => '', 'InstitutionID' => '');
$SenderOptions = array('RequireShippingAddressSelection' => '');
// Begin loop to populate receiver options.
$ReceiverOptions = array();
$ReceiverOption = array('Description' => '', 'CustomID' => '');
$InvoiceData = array('TotalTax' => '', 'TotalShipping' => '');
$InvoiceItems = array();
$InvoiceItem = array('Name' => '', 'Identifier' => '', 'Price' => '', 'ItemPrice' => '', 'ItemCount' => '');
array_push($InvoiceItems, $InvoiceItem);
$ReceiverIdentifier = array('Email' => '', 'PhoneCountryCode' => '', 'PhoneNumber' => '', 'PhoneExtension' => '');
$ReceiverOption['InvoiceData'] = $InvoiceData;
$ReceiverOption['InvoiceItems'] = $InvoiceItems;
$ReceiverOption['ReceiverIdentifier'] = $ReceiverIdentifier;
array_push($ReceiverOptions, $ReceiverOption);
// End receiver options loop
$PayPalRequestData = array('SPOFields' => $SPOFields, 'DisplayOptions' => $DisplayOptions, 'InstitutionCustomer' => $InstitutionCustomer, 'SenderOptions' => $SenderOptions, 'ReceiverOptions' => $ReceiverOptions);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->SetPaymentOptions($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
Ejemplo n.º 28
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$PaymentDetailsFields = array('PayKey' => 'AP-84R2524843917081W', 'TransactionID' => '1BM714721N413291D', 'TrackingID' => '');
$PayPalRequestData = array('PaymentDetailsFields' => $PaymentDetailsFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->PaymentDetails($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 29
0
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$CancelInvoiceFields = array('InvoiceID' => '', 'Subject' => '', 'NoteForPayer' => '', 'SendCopyToMerchant' => '');
$PayPalRequestData = array('CancelInvoiceFields' => $CancelInvoiceFields);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->CancelInvoice($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
Ejemplo n.º 30
-1
<?php

// Include required library files.
require_once '../includes/config.php';
require_once '../autoload.php';
// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'DeveloperAccountEmail' => $developer_account_email, 'ApplicationID' => $application_id, 'DeviceID' => $device_id, 'IPAddress' => $_SERVER['REMOTE_ADDR'], 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'APISubject' => $api_subject);
$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);
// Prepare request arrays
$CreateInvoiceFields = array('MerchantEmail' => '', 'PayerEmail' => '', 'Number' => '', 'CurrencyCode' => '', 'InvoiceDate' => '', 'DueDate' => '', 'PaymentTerms' => '', 'DiscountPercent' => '', 'DiscountAmount' => '', 'Terms' => '', 'Note' => '', 'MerchantMemo' => '', 'ShippingAmount' => '', 'ShippingTaxName' => '', 'ShippingTaxRate' => '', 'LogoURL' => '');
$BusinessInfo = array('FirstName' => '', 'LastName' => '', 'BusinessName' => '', 'Phone' => '', 'Fax' => '', 'Website' => '', 'Custom' => '');
$BusinessInfoAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$BillingInfo = array('FirstName' => '', 'LastName' => '', 'BusinessName' => '', 'Phone' => '', 'Fax' => '', 'Website' => '', 'Custom' => '');
$BillingInfoAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
$ShippingInfo = array('FirstName' => '', 'LastName' => '', 'BusinessName' => '', 'Phone' => '', 'Fax' => '', 'Website' => '', 'Custom' => '');
$ShippingInfoAddress = array('Line1' => '', 'Line2' => '', 'City' => '', 'State' => '', 'PostalCode' => '', 'CountryCode' => '');
// For invoice items you populate a nested array with multiple $InvoiceItem arrays.  Normally you'll be looping through cart items to populate the $InvoiceItem
// array and then push it into the $InvoiceItems array at the end of each loop for an entire collection of all items in $InvoiceItems.
$InvoiceItems = array();
$InvoiceItem = array('Name' => '', 'Description' => '', 'Date' => '', 'Quantity' => '', 'UnitPrice' => '', 'TaxName' => '', 'TaxRate' => '');
array_push($InvoiceItems, $InvoiceItem);
$PayPalRequestData = array('CreateInvoiceFields' => $CreateInvoiceFields, 'BusinessInfo' => $BusinessInfo, 'BusinessInfoAddress' => $BusinessInfoAddress, 'BillingInfo' => $BillingInfo, 'BillingInfoAddress' => $BillingInfoAddress, 'ShippingInfo' => $ShippingInfo, 'ShippingInfoAddress' => $ShippingInfoAddress, 'InvoiceItems' => $InvoiceItems);
// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->CreateAndSendInvoice($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);