Home Forums Theme Support Dokan Paypal Adaptive Payments Invalid Transaction

This topic is: resolved

This topic contains 26 replies, has 6 voices, and was last updated by  membie 4 years, 2 months ago.

Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #18625

    Rachelle
    Member
    Post count: 54

    Thanks Jay for the assistance. I changed everything over to parallel payments to test it out and updated my new settings and I'm still getting the same invalid transaction error code. After fooling with it for a few hours I have put it to the side for now. If anybody has any suggestions on what I might need to tweak to make this work I will gladly try anything. ๐Ÿ™‚
    Rachelle

    #18632

    Rachelle
    Member
    Post count: 54

    Since it appears my url is still not generating a pay key and paypal said that's where my problem was I dug in the plugin code and found this. Does this all look correct or should something be changed to make my site start generating a paykey with my orders so they will be valid?

    /**
    * Check if ipn request is valid or not
    *
    * @return boolean true/false
    */
    function check_ipn_response() {

    if ( ‘yes' == $this->testmode ) {
    $config = array(‘mode' => ‘sandbox');
    } else {
    $config = array(‘mode' => ‘live');
    }

    $ipnMessage = new PPIPNMessage( null, $config );

    if ( $ipnMessage->validate() ) {

    $this->add_log( ‘IPN Response: ‘ . print_r( $ipnMessage->getRawData(), true ) );

    do_action( “dokan-valid-paypal-adaptive-request” );
    } else {

    $this->add_log( ‘Received invalid response from PayPal Adaptive Payment' );

    if ( is_wp_error( $ipnMessage ) ) {
    $this->add_log( ‘Error response: ‘ . $ipnMessage->get_error_message() );
    }
    }
    }

    /**
    * Do succesfull request…
    *
    * @return void
    */
    function successful_request() {

    $posted = $_POST;
    $paykey = isset( $posted[‘pay_key'] ) ? $posted[‘pay_key'] : ”;

    if ( !$paykey ) {
    $this->add_log( __( ‘No pay key found, abort.', ‘dokan-wc-pap' ) );
    exit;
    }

    $order_id = $this->get_order_by_paykey( $paykey );

    if ( !$order_id ) {
    $this->add_log( sprintf( __( ‘No order id found by pay key: %s', ‘dokan-wc-pap' ), $paykey ) );
    exit;
    }

    $order = new WC_Order( $order_id );

    // yet another check to make sure
    if ( !isset( $order->id ) || empty( $order->id ) || absint( $order->id ) < = 0 ) { $this->add_log( sprintf( __( ‘No order found by pay key: %s', ‘dokan-wc-pap' ), $paykey ) );
    exit;
    }

    #18671

    Rachelle
    Member
    Post count: 54

    Here is the error log it gives me, how do I fix this? It says at the bottom the application is not authorized for the user but I've applied for all necessary items, been completely approved for parallel payments and inputted it all correctly, according to paypal. I think I may be missing something…

    04-13-2014 @ 09:40:43 – Payment Process: parallel —— Reciever listArray
    (
    [0] => Receiver Object
    (
    [amount] => 6.65
    [email] => classicpartydesigns@gmail.com
    [phone] =>
    [primary] =>
    [invoiceId] =>
    [paymentType] =>
    [paymentSubType] =>
    [accountId] =>
    )

    [1] => Receiver Object
    (
    [amount] => 0.35
    [email] => admin@partypinwheel.com
    [phone] =>
    [primary] =>
    [invoiceId] =>
    [paymentType] =>
    [paymentSubType] =>
    [accountId] =>
    )

    )

    04-13-2014 @ 09:40:44 – Payment Response: PayResponse Object
    (
    [responseEnvelope] => ResponseEnvelope Object
    (
    [timestamp] => 2014-04-13T06:40:44.176-07:00
    [ack] => Failure
    [correlationId] => 24155e4759650
    [build] => 10273932
    )

    [payKey] =>
    [paymentExecStatus] =>
    [payErrorList] =>
    [paymentInfoList] =>
    [sender] =>
    [defaultFundingPlan] =>
    [warningDataList] =>
    [error] => Array
    (
    [0] => ErrorData Object
    (
    [errorId] => 550006
    [domain] => PLATFORM
    [subdomain] => Application
    [severity] => Error
    [category] => Application
    [message] => The application is not authorized for the user
    [exceptionId] =>
    [parameter] => Array
    (
    [0] => ErrorParameter Object
    (
    [name] =>
    [value] => X-PAYPAL-APPLICATION-ID
    )

    #18672

    Jay
    Member
    Post count: 157

    I found this and not sure if it helps. Are you using this API somewhere else?
    http://premium.wpmudev.org/forums/topic/marketpress-issue-with-live-mode-550006-the-application-is-not-authorized-for-the-user

    The reason you are getting this error is because the account you are using the API call headers is not the same as the PayPal account you used to submit the application. The APP-ID is provided for a single account only, you cannot use it on multiple accounts.

    #18675

    Rachelle
    Member
    Post count: 54

    I found that webpage when I did a general search for the code but this is a
    newly created email just for this site. So the API and everything
    generated from it is only used on this site. Could it be because my paypal
    account is not verified yet because it is still confirming my bank account?
    I plan on calling paypal again tonight with this error code.

    On Sunday, April 13, 2014, weDevs Team wrote: > Jay wrote:

    I found this and not sure if it helps. Are you using this API somewhere
    else?

    http://premium.wpmudev.org/forums/topic/marketpress-issue-with-live-mode-550006-the-application-is-not-authorized-for-the-user
    [0]
    >
    > The reason you are getting this error is because the account you are
    using

    #18677

    Jay
    Member
    Post count: 157

    Yes, it needs to be verified. I asked you earlier if it was…LOL. Just wait until the account becomes verified. ๐Ÿ˜›

    #18678

    Rachelle
    Member
    Post count: 54

    I think I'm trying to do too much…lol
    Thank you Jay. ๐Ÿ™‚

    On Sunday, April 13, 2014, weDevs Team wrote: > Jay wrote:

    Yes, it needs to be verified. I asked you earlier if it was…LOL. Just wait
    until the account becomes verified. src=”
    http://wedevs.com/wp-includes/images/smilies/icon_razz.gif” alt=”:P”
    class=”wp-smiley”>

    #18680

    Jay
    Member
    Post count: 157

    My pleasure and it happens. I have overlooked the simple things as well. I think you should be set once it is approved.

    #18787

    Rachelle
    Member
    Post count: 54

    Once my checking account was confirmed the adaptive paypal process worked without a hitch. I will mark this as resolved. ๐Ÿ™‚

    #27100

    Jamie
    Member
    Post count: 7
    This reply has been marked as private.
    #27108

    Sekander Badsha
    Member
    Post count: 2067

    Hello Jamie,
    You did not have any seller other than admin. That is why PayPal was not getting the sellers email address. Please add 2 or more seller with PayPal mail address and the problem will be solved.

    #38185

    membie
    Member
    Post count: 86

    Hello,

    I am having the same problem and my account is verified.

    Thanks ๐Ÿ™‚

Viewing 12 posts - 16 through 27 (of 27 total)

The topic ‘Paypal Adaptive Payments Invalid Transaction’ is closed to new replies.