Location: PHPKode > scripts > PayPal Payments Pro > DoNonReferencedCredit.php
<?php
// Include required library files.
require_once('includes/config.php');
require_once('includes/paypal.class.php');

// Create PayPal object.
$PayPalConfig = array('Sandbox' => $sandbox, 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature);
$PayPal = new PayPal($PayPalConfig);

// Prepare request arrays
$DNRCFields = array(
					'amt' => '', 						// Required.  Total of order including shipping, handling, and tax.  
					'netamt' => '', 					// Total amount of all items in this transactions.  Subtotal.
					'shippingamt' => '', 				// Total shipping costs on the transaction.
					'taxamt' => '', 					// Sum of tax for all items on the order.
					'currencycode' => '', 				// Required.  Default is USD.  Only valid values are: AUD, CAD, EUR, GBP, JPY, and USD.
					'note' => '' 						// Field used by merchant to record why this credit was issued to the buyer.
				);	
				
$CCDetails = array(
					'creditcardtype' => '', 			// Required.  Type of credit card.  Values can be: Visa, MasterCard, Discover, Amex, Maestro, Solo
					'acct' => '', 						// Required.  Credit card number.  No spaces or punctuation.
					'expdate' => '', 					// Required.  Credit card expiration date.  MMYYYY
					'cvv2' => '', 						// Requirement determined by PayPal profile settings.  Credit Card security digits.
					'startdate' => '', 					// Mo and Yr that Maestro or Solo card was issued.  MMYYYY.
					'issuenumber' => '' 				// Isssue number of Maestro or Solo card.  
);

$PayerInfo = array(
					'email' => '', 						// Email address of payer.
					'firstname' => '', 					// Payer's first name.
					'lastname' => '' 					// Payer's last name.
				);
				
$BillingAddress = array(
						'street' => '', 				// Required.  First street address.
						'street2' => '', 				// Second street address.
						'city' => '', 					// Required.  Name of City.
						'state' => '', 					// Required. Name of State or Province.
						'countrycode' => '', 			// Required.  Country code.
						'zip' => '', 					// Required.  Postal code of payer.
						'phonenum' => '' 				// Phone Number of payer.  20 char max.
					);
					
$PayPalRequestData = array(
						'DNRCFields'=>$DNRCFields, 
						'CCDetails'=>$CCDetails, 
						'PayerInfo'=>$PayerInfo, 
						'BillingAddress'=>$BillingAddress
						);

// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->DoNonReferencedCredit($PayPalRequestData);

// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);
?>
Return current item: PayPal Payments Pro