Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Jamie Corkhill
    Hello. I'm looking to use this with React Native. Is that possible? Thanks.
    @JamieCorkhill no. we have a native sdk releasing in the near future.
    Jamie Corkhill
    @trainerbill Thank you. A Native SDK for which platform? Can I build a wrapper for React Native?
    @trainerbill And not to sound impatient, but I need a solution now. Are there any alternatives I can use for the time being? I'm founding a startup and I've got deadlines to adhere to. Thank you. Can I make my own button styles with CSS for now and just make direct calls to the PayPal REST API via some HTTP Client until an SDK is rolled out?
    Andrew Throener
    Yeah, you would have to open paypal in a webview to accept the payment. then close it down on your redirect url.
    @JamieCorkhill ^
    Otherwise you can look at Braintree which has a solution for native paypal right now.
    Jamie Corkhill
    @trainerbill Than you. Will the Braintree solution include things like Purchase Protection/Return Shipping/Etc.?
    Andrew Throener
    Jan Ryan Felipe
    Anyone encountered an issue where in verifying a signature from a "PAYMENT.SALE.COMPLETED" webhook always returns "FAILURE"?
    All other webhook requests returns "SUCCESS"
    I run real sandbox/live transactions
    I'm using https://github.com/paypal/PayPal-PHP-SDK
    Andrew Throener
    @JamieCorkhill yeah webhook verification has had a problem for awhile. can you try manually verifying outside of the SDK? the way some languages are handling numbers and floats is breaking it. https://github.com/paypal/PayPal-PHP-SDK/issues/1107#issuecomment-396785477
    Jan Ryan Felipe
    @trainerbill That solved it. Thanks
    Jamie Corkhill
    @trainerbill What that message for me or @ryanskiefelipe ?
    Andrew Throener
    sry yeah mixed those up. answer to your question @JamieCorkhill is yes.
    Eli Barbosa


    I have been using the old PayPal API integration called Adaptive Payments (NVP/SOAP API Products) .

    Since yesterday I started to have this error:

    [error] => Array
    [0] => PayPal\Types\Common\ErrorData Object
    [errorId] => 580022
    [domain] => PLATFORM
    [subdomain] => Application
    [severity] => Error
    [category] => Application
    [message] => Invalid request parameter: {0} with value {1}
    [exceptionId] =>
    [parameter] =>


    I googled this error id and it means that the "The receiver email address can not receive payment" but everything used to work fine and nothing was changed inside the my app settings or credentials.

    Has anyone run into the same problem?

    Any tip how to solve this?


    Eli Barbosa

    I Just realised that this problem is happening when I'm trying to Set the Payment Options:


    hi all.
    I need some help with integration Smart Payment Buttons
    i long time use old method with geting token and redirect to checkout
    now i whant use Smart Payment Buttons
    but in CreateOrder section can't find NotifyURL params
    Karthi Janaki Raman
    Hi I need to integrate variable amount subscription using paypal, right now it seems not possible. any one have come across this ?
    i stuck on Identity (LIPP) where generating refreshtoken i got error Authentication failed due to invalid authentication credentials or a missing Authorization header what's wrong. Already create test app sandbox account and also have an client_id and secrete key. Please any suggestion.
    Hello everyone. I have a problem with the paypal documentation. Do there is better documentation that explains how to checkout with paypalCheckoutReady()?
    I have a code ready but it does not return me token

    <!DOCTYPE html>

    <html lang="en">
    <meta charset="UTF-8">
    <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
    <script src="https://www.paypalobjects.com/api/checkout.js" async></script>

    <input id="amount">
    <button id="paypal">Pay by PayPal</i></button>

    window.paypalCheckoutReady = function() {
    paypal.checkout.setup('REPLACE WITH MERCHANT ID', {
    environment: 'sandbox', # or production
    container: '#paypal'

    $('#paypal').click(function() {
    var amount = $('#amount').val()
    if (amount) {

    var action = $.post('/paypal.php', {amount: amount});

    action.done(function (data) {

    action.fail(function() {
    alert('Please enter an amount')

    class.php ---------------------------------------------------------------------


    class PayPal
    private $config;

    private $urls = array(
     "sandbox" => array(
      "api" => "https://api-3t.sandbox.paypal.com/nvp", 
      "redirect" => "https://www.sandbox.paypal.com/webscr", 
     "live" => array(
      "api" => "https://api-3t.paypal.com/nvp", 
      "redirect" => "https://www.paypal.com/webscr", 
    public function __construct($config) 
     $this->config = $config; 
    public function call($options = []) 
     $options = array_merge($options, $this->config); 
     return $this->_curl($this->api_url(), $options); 
    public function redirect($response) 
     $redirect_url = sprintf("%s?cmd=_express-checkout&token=%s", $this->redirect_url(), $response["TOKEN"]); 
     header("Location: $redirect_url"); 
    private function redirect_url() 
     return $this->urls[$this->config["environment"]]["redirect"]; 
    private function api_url() 
     return $this->urls[$this->config["environment"]]["api"]; 
    private function _curl($url, $values) 
     $curl = curl_init($url); 
     $options = array(
      CURLOPT_VERBOSE => true, 
      CURLOPT_POSTFIELDS => http_build_query($values), 
      CURLOPT_TIMEOUT => 10, 
      //CURLOPT_SSL_VERIFYPEER => false //for dev 
     curl_setopt_array($curl, $options); 
     $rep = curl_exec($curl); 
     parse_str($rep, $response); 
     return $response; 


    paypal.php --------------------------------------------------------------------------



    $config = array(
    "environment" => "sandbox", # or live
    "version" => 113

    $paypal = new PayPal($config);

    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $result = $paypal->call(array(
    'method' => 'SetExpressCheckout',
    'paymentrequest_0_paymentaction' => 'sale',
    'paymentrequest_0_amt' => $_POST['amount'],
    'paymentrequest_0_currencycode' => 'USD',
    'returnurl' => 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . 'paypal.php?amount=' . $_POST['amount'],
    'cancelurl' => 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . 'cancel.php?amount=' . $_POST['amount']
    if ($result['ACK'] == 'Success') {
    header("Access-Control-Allow-Origin: *");
    header('Content-Type: application/json');
    echo json_encode($result);
    } else {
    echo 'Handle the payment creation failure <br>';
    } else {
    $result = $paypal->call(array(
    'method' => 'DoExpressCheckoutPayment',
    'token' => $_GET['token'],
    'payerid' => $_GET['PayerID'],
    'paymentrequest_0_paymentaction' => 'sale',
    'paymentrequest_0_amt' => $_GET['amount'],
    'paymentrequest_0_currencycode' => 'USD'
    if ($result['PAYMENTINFO_0_PAYMENTSTATUS'] == 'Completed') {

     $result = $paypal->call(array(
      'method' => 'GetExpressCheckoutDetails', 
      'token' => $_GET['token'], 
     //$result now contains customer information 
     } else { 
     echo 'Payment error'; 


    Maxence Rose
    Hi all!
    I try to use PayPal SDK PHP
    for one subscription with PayPal / my website
    I've this error : Authentication failed due to invalid authentication credentials or a missing Authorization header
    after $plan->create($this->apiContext);, I don't know which URL I must use.
    John Minton
    @trainerbill I saw your comments on paypal/paypal-checkout-components#963, I guess this is the place to ask related questions?
    I am doing this in React/Node, smart enough to build stuff but I don't understand the bigger picture when it comes to paypal and their APIs. I desire my customers to sign up for a monthly autopay / subscription kind of deal upon creating a new account with my service. I am wondering if I need to create a billing plan (https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_create) for every new customer? Or do I do this once and all customers can use the same billing plan?
    John Minton
    And the other thing, is this step of creating a billing plan done from secure backend, or can I do this from the react frontend?
    I'll probably have other questions down the road about this braintree stuff (like, is it required to use for subscription models?), but I've been reading for a couple weeks now and it was kind of confusing to me. I lost hair trying to get Stripe to work, wasted a ton of time with square and weebly only to find out the integration was more involved than expected, and their "simple" solutions don't actually support subscriptions long story short. I'm really hoping paypal will integrate pretty quickly and without too much trouble.
    John Minton
    I'll be around, thanks for the insight and your really helpful info on the github issue
    Fernando MartĂ­n Ortiz
    Hi everyone! I'm trying to add Paypal in a mobile app to allow c2c payments. Is that even possible? I can't find a way to do so but I saw Fiverr does something like that? Or am I wrong?
    please, I'd appreciate some guidance on this regard 🙏
    Hi iam getting error while testing live api for testing live api we need to have verified business account or we can normally test without verifiying the business acount please help
    Ashwani kumar
    Hi Anyone online plz?
    Hi, anyone here ?
    If I upgrade my account from business to pro, is there any bad effect for the live app which uses paypal ?
    Sami Ullah
    POST https://www.sandbox.paypal.com/v1/billing/subscriptions 404 (Not Found) why do i get this although everything seems fine..using react.js
    Tyler Greene
    Hey I’m getting the error code “genericError?code=UEFZTUVOVF9ERU5JRUQ%3D” when I check out and it doesn’t do it on the check out for donations to like charity(which is good)