Skip to content

Instantly share code, notes, and snippets.

@jcleblanc
Created April 2, 2013 16:12
Show Gist options
  • Save jcleblanc/5293486 to your computer and use it in GitHub Desktop.
Save jcleblanc/5293486 to your computer and use it in GitHub Desktop.
Processing a payment using the PayPal RESTful APIs
<?php
/**
* Process Payment
*
* Processes a PayPal or credit card payment
* @link https://developer.paypal.com/webapps/developer/docs/api/#create-a-payment
*/
public function process_payment($request){
$postvals = $request;
$uri = URI_SANDBOX . "payments/payment";
return self::curl($uri, 'POST', $postvals);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment