|
Rank: Starting Member
Groups: Registered
Joined: 4/26/2006 Posts: 1 Location: ,
|
I'm using this module however whenever I perform a direct payment I get a 10002 error code returned from paypal (Security header is not valid). I'm using the same sandbox username/password/certificate that I am using with the php sdk so I know the cert/username/password are good.
Has anyone successfully used this module before?
Here is how I'm making the call to DirectPayments:
my $pp = new Business::PayPal::API (
Username => 'username',
Password => 'password',
CertFile => 'cert.pem',
KeyFile => 'cert.pem',
Sandbox => 1
);
my %response = $pp->DoDirectPaymentRequest( PaymentAction => 'Sale',
OrderTotal => 4.95,
TaxTotal => 0.0,
ShippingTotal => 0.0,
ItemTotal => 0.0,
HandlingTotal => 0.0,
CreditCardType => $cardType,
CreditCardNumber => $pxml->{'card'}{'number'},
ExpMonth => $month,
ExpYear => $year,
CVV2 => $pxml->{'card'}{'cvv2'},
FirstName => $firstName,
LastName => $lastName,
Street1 => $address1,
Street2 => $address2,
CityName => $city,
StateOrProvince => $state,
PostalCode => $zipcode,
Country => 'US',
Payer => $email,
CurrencyID => 'USD',
IPAddress => '<ip making payment from>'
);
|