Skip to content

WordPressUtilities/WPUPaypal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPUPaypal

This WordPress plugin helps you make payments via PayPal

Account

Test

  • 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.

Production

  • Upgrade your PayPal account to a business account.
  • Get your API signature.
  • Set-up the plugin in "live" mode with these credentials.

Code

How to make a paiement

$WPUPaypal = new WPUPaypal();
$total = 10;

New paiement

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',
    ));
}

Success

if($WPUPaypal->isPaypalCallback()){
    // Back from PayPal
    $transactionId = $WPUPaypal->GetExpressCheckoutDetails(array(
        'total' => $total
    ));
    if ($transactionId != null) {
        // Transaction is complete !
    }
}

About

This WordPress plugin helps you make payments via PayPal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages