mbe.ro
<h2>What is this web-site?</h2> <br/> <start_coding(); //just some tips and tricks for web programmers<br/>echo "Hope this is helpful to you";<br/>?>

PayPal Development – DirectPayment function

July 7, 2009 at 6:37 PM

Lately I have been working with Paypal Developing. I stumbled upon the wizard and it gave me step by step instructions but when I tested the script, the script said that the function “DirectPayment” is undefined. They forgot to include the function. So I googled and googled but nothing. So I made the function myself. For all of you that need it, here it is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
function DirectPayment($paymentType, $paymentAmount, $creditCardType,
	$creditCardNumber, $expDate, $cvv2, $firstName, $lastName, 
	$street, $city, $state, $zip, $countryCode, $currencyCode)
{
	$nvpstr="&PAYMENTACTION=$paymentType&AMT=$paymentAmount&".
		"CREDITCARDTYPE=$creditCardType&ACCT=$creditCardNumber".
		"&EXPDATE=$expDate&CVV2=$cvv2&FIRSTNAME=$firstName".
		"&LASTNAME=$lastName&STREET=$street&CITY=$city&STATE=$state&ZIP=$zip".
		"&COUNTRYCODE=$countryCode&CURRENCYCODE=$currencyCode";
 
 
	$resArray=hash_call("doDirectPayment",$nvpstr);
	return $resArray;
}

Also, you may find this helpful. I got my inspiration from there.

No Comments

Nobody has posted any comments to this article. Be the first to post a comment.

Add a comment

Name:
 
Email:
 
Website:
 
Comment: