This WordPress plugin helps you make payments via PayPal
- Create a test business account.
- Get User / PWD / Sig from this test account.
- Set-up the plugin in "sandbox" mode with these credentials.
- Set API version to 96.0.
- Upgrade your PayPal account to a business account.
- Get your API signature.
- Set-up the plugin in "live" mode with these credentials.
$WPUPaypal = new WPUPaypal();
$total = 10;if(!$WPUPaypal->isPaypalCallback()){
// Redirection to PayPal
$WPUPaypal->SetExpressCheckout(array(
'successurl' => 'http://darklg.me/success' ,
'returnurl' => 'http://darklg.me/return' ,
'total' => $total,
'name' => 'Order name',
'desc' => 'Order description',
));
}if($WPUPaypal->isPaypalCallback()){
// Back from PayPal
$transactionId = $WPUPaypal->GetExpressCheckoutDetails(array(
'total' => $total
));
if ($transactionId != null) {
// Transaction is complete !
}
}