Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Kaleem-
    @Kaleem-
    What do you mean?
    It should be a transaction in the history
    Kaleem-
    @Kaleem-
    Just an update, I managed to get subscriptions to create and be in ACTIVE status in sandbox. But then there is an issue with payment, and it's only occuring when I use paypal checkout. Using the button generator provided it all works perfectly. Anyone got any ideas?
    Aimee Casden
    @AimeeCasden
    Hi. I need help integrating Paypal into my website using react and I am slightly confused. Anyone here to help?
    Jamie Corkhill
    @JamieCorkhill
    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
    @JamieCorkhill
    @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
    @trainerbill
    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
    @JamieCorkhill
    @trainerbill Than you. Will the Braintree solution include things like Purchase Protection/Return Shipping/Etc.?
    Andrew Throener
    @trainerbill
    yep
    Jan Ryan Felipe
    @ryanskiefelipe
    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
    @trainerbill
    @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
    @ryanskiefelipe
    @trainerbill That solved it. Thanks
    Jamie Corkhill
    @JamieCorkhill
    @trainerbill What that message for me or @ryanskiefelipe ?
    Andrew Throener
    @trainerbill
    sry yeah mixed those up. answer to your question @JamieCorkhill is yes.
    Eli Barbosa
    @elirenato

    Hi,

    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?

    Thanks.

    Eli Barbosa
    @elirenato

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

    https://developer.paypal.com/docs/classic/api/adaptive-payments/SetPaymentOptions-API-Operation/

    qwer24rus
    @qwer24rus
    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
    karthij15
    @karthij15
    Hi I need to integrate variable amount subscription using paypal, right now it seems not possible. any one have come across this ?
    Amitkumar
    @UltimateBrains
    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.
    crocante
    @DredHors_twitter
    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
    index.html

    <!DOCTYPE html>

    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    </head>
    <body>
    <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>

    <script>
    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) {
    paypal.checkout.initXO();

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

    action.done(function (data) {
    paypal.checkout.startFlow('https://www.paypal.com/checkoutnow?useraction=commit&token='+data.TOKEN);
    });

    action.fail(function() {
    paypal.checkout.closeFlow();
    });
    }
    else
    alert('Please enter an amount')
    })
    }
    </script>
    </body>
    </html>

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

    <?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_RETURNTRANSFER => true, 
      CURLOPT_POSTFIELDS => http_build_query($values), 
      CURLOPT_CUSTOMREQUEST => "POST", 
      CURLOPT_TIMEOUT => 10, 
      //CURLOPT_SSL_VERIFYPEER => false //for dev 
     ); 
    
     curl_setopt_array($curl, $options); 
     $rep = curl_exec($curl); 
    
     parse_str($rep, $response); 
     curl_close($curl); 
    
     return $response; 
    } 

    }

    crocante
    @DredHors_twitter
    paypal.php --------------------------------------------------------------------------

    <?php

    include('class.php');

    $config = array(
    "environment" => "sandbox", # or live
    "user" => "REPLACE WITH PAYPAL USER",
    "pwd" => "REPLACE WITH PAYPAL PASSWORD",
    "signature" => "REPLACE WITH PAYPAL SIGNATURE",
    "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
    @pirmax_twitter
    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
    @cjohnweb_twitter
    @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
    @cjohnweb_twitter
    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
    @cjohnweb_twitter
    I'll be around, thanks for the insight and your really helpful info on the github issue
    Fernando Martín Ortiz
    @fmo91
    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 🙏
    uzsunny
    @uzsunny9_twitter
    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
    @TheAshwaniK_gitlab
    Hi Anyone online plz?
    ALIABUHATAB
    @ALIABUHATAB
    HELLO