WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Pending payments

[Resolved] Pending payments

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

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

    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.

    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?

    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.

    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”]

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Pending payments’ is closed to new replies.