WordPress.org

Ready to get started?Download WordPress

Forums

PayPal Express Checkout
[resolved] Pending payments (7 posts)

  1. Foreverbarcelona
    Member
    Posted 1 year ago #

    Hi!

    I've installed your plugin and started getting payments from my clients, however, all of them show as Pending on the plugin Payments history, but none of them shows on my paypal account...

    Could it have something to do with the IPN settings? I understand they should be enabled. What URL should I enter there?
    Please help. Thank you so much,

    http://wordpress.org/extend/plugins/paypal-express-checkout/

  2. ykhaled
    Member
    Posted 1 year ago #

    Hey mate. I had similar problems when I 1st installed this plugin.

    The Pending issue is because of a missing line in the programming.

    $fields = array(
                  'USER' => urlencode(get_option('paypal_api_username')),
                  'PWD' => urlencode(get_option('paypal_api_password')),
                  'SIGNATURE' => urlencode(get_option('paypal_api_signature')),
                  'VERSION' => urlencode('72.0'),
                  'PAYMENTREQUEST_0_PAYMENTACTION' => urlencode('Sale'),
                  'PAYMENTREQUEST_0_AMT0' => urlencode($_POST['AMT']),
                  'PAYMENTREQUEST_0_AMT' => urlencode($_POST['AMT']),
                  'PAYMENTREQUEST_0_ITEMAMT' => urlencode($_POST['AMT']),
                  'ITEMAMT' => urlencode($_POST['AMT']),
                  'PAYMENTREQUEST_0_CURRENCYCODE' => urlencode($_POST['CURRENCYCODE']),
                  'RETURNURL' => urlencode($config->getItem('plugin_form_handler_url').'?func=confirm'),
                  'CANCELURL' => urlencode(get_permalink(get_option('paypal_cancel_page'))),
                  'METHOD' => urlencode('SetExpressCheckout')
              );

    Compare it to yours in paypalapi.php and that should sort out the pending payments issue.

    Do you really need the IPN?
    this plugin will tell you if payment is a success but wont update any info like when the transaction is cleared.
    I already have IPN implementation that update the transaction details into a table in the same database.

  3. ykhaled
    Member
    Posted 1 year ago #

    Sorry I posted the wrong section; it should be the following:

    $fields = array(
                  'USER' => urlencode(get_option('paypal_api_username')),
                  'PWD' => urlencode(get_option('paypal_api_password')),
                  'SIGNATURE' => urlencode(get_option('paypal_api_signature')),
                  'VERSION' => urlencode('72.0'),
                  'PAYMENTREQUEST_0_PAYMENTACTION' => urlencode('Sale'),
                  'PAYERID' => urlencode($result['PAYERID']),
                  'TOKEN' => urlencode($result['TOKEN']),
                  'PAYMENTREQUEST_0_AMT' => urlencode($result['AMT']),
                  'PAYMENTREQUEST_0_CURRENCYCODE' => urlencode($result['CURRENCYCODE']),
                  'METHOD' => urlencode('DoExpressCheckoutPayment')
              );
  4. Foreverbarcelona
    Member
    Posted 1 year ago #

    Yes Yes Yes!
    It worked! Thank you so much, you don't know how much time you have saved me! I'll be eternally thankful for that.

  5. rbernabe16
    Member
    Posted 1 year ago #

    im having the same problem.. im trying to follow your instructions, but i found 3 $fields = array on paypalapi.php.. which one should i have to change?

  6. theabsurdman
    Member
    Posted 1 year ago #

    rbernabe16:

    it's this function, starting on line 171:

    function DoExpressCheckout($result) {
    
          $config = HCCoder_PayPalConfig::getInstance();
    
          // FIELDS
          $fields = array(
                  'USER' => urlencode(get_option('paypal_api_username')),
                  'PWD' => urlencode(get_option('paypal_api_password')),
                  'SIGNATURE' => urlencode(get_option('paypal_api_signature')),
                  'VERSION' => urlencode('72.0'),
                  'PAYMENTREQUEST_0_PAYMENTACTION' => urlencode('Sale'),
                  'PAYERID' => urlencode($result['PAYERID']),
                  'TOKEN' => urlencode($result['TOKEN']),
                  'PAYMENTREQUEST_0_AMT' => urlencode($result['AMT']),
    'PAYMENTREQUEST_0_CURRENCYCODE' => urlencode($result['CURRENCYCODE']),
                  'METHOD' => urlencode('DoExpressCheckoutPayment')
              );

    see code snippet above, with the missing line already added.

  7. akent64
    Member
    Posted 4 months ago #

    I have tried your recommended code but still have the same issue, it seem to go through the complete process but no payment is taken from the buyers account nor does anything end up in the receivers account.

    Also this is my shortcode ...

    [paypal amount="43.00" currency="GBP" description="Goes here" button_style="buy_now" return_url="http://url.co.uk/membership-payment-complete" cancel_url="http://url.co.uk/payment-cancelled"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic