Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7579629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:43:18+00:00 2026-05-30T17:43:18+00:00

I am basically trying to use the PAY call of Adaptive Payments to programmatically

  • 0

I am basically trying to use the PAY call of Adaptive Payments to programmatically and immediately send funds from my own paypal account to other accounts. According to the documentation, so long as I specify the senderEmail (my own paypal address, used to set up the Adaptive Payments), this should work verbatim.

However, when I make the call, I always get result “CREATED” instead of “COMPLETED”. Created means the system still wants me to manually log into PayPal and approve the payments. I really need these payments to occur automatically on the spot. Any help would be appreciated.

Here is my request string:

currencyCode=USD&
returnUrl=http%3A%2F%2Fwww.website.com%2F&
actionType=PAY&
cancelUrl=http%3A%2F%2Fwww.website.com%2F&
receiverList.receiver%280%29.email=receiver%40gmail.com&
receiverList.receiver%280%29.amount=1.00&
requestEnvelope.senderEmail=me%40gmail.com&
clientDetails.deviceId=mydevice&
clientDetails.ipAddress=127.0.0.1&
clientDetails.applicationId=APP-ZZZZZZZZZZZZZ&
requestEnvelope.errorLanguage=en_US&
memo=memo&
feesPayer=EACHRECEIVER&
ipnNotificationUrl=http%3A%2F%2Fwww.website.com%2Fpay.php

And here is the response from PayPal:

[responseEnvelope.timestamp] => 2012-03-01T19:09:57.290-08:00
[responseEnvelope.ack] => Success
[responseEnvelope.correlationId] => 71efd416a2100
[responseEnvelope.build] => 2486531
[payKey] => AP-ZZZZZZZZZZZZZZZ
[paymentExecStatus] => CREATED
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:43:19+00:00Added an answer on May 30, 2026 at 5:43 pm

    Forget everything I said earlier. The problem isn’t an inconsistency between Sandbox and Live either, but rather a wrong parameter for ‘senderEmail’.

    Simply change:

    requestEnvelope.senderEmail=me@gmail.com&
    

    To:

    senderEmail=me@gmail.com&
    

    For example, the following returns a ‘COMPLETED’ implicit payment.

    <?php
    
    function AdaptiveCall($bodyparams, $method, $payKey) {
    
    try
    {
    
        $body_data = http_build_query($bodyparams, "", chr(38));
        $url = trim("https://svcs.sandbox.paypal.com/AdaptivePayments/".$method."");
        $params = array("http" => array( 
                            "method" => "POST",
                            "content" => $body_data,
                                "header" => "X-PAYPAL-SECURITY-USERID: xxxxxxxxx\r\n" .
                                            "X-PAYPAL-SECURITY-SIGNATURE: xxxxxxxxxxx\r\n" .
                                            "X-PAYPAL-SECURITY-PASSWORD: xxxxxxx\r\n" .
                                            "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T\r\n" .
                                            "X-PAYPAL-REQUEST-DATA-FORMAT: NV\r\n" .
                                            "X-PAYPAL-RESPONSE-DATA-FORMAT: NV\r\n" 
                                        )
                        );
    
    
        //create stream context
         $ctx = stream_context_create($params);
    
    
        //open the stream and send request
         $fp = @fopen($url, "r", false, $ctx);
    
        //get response
         $response = stream_get_contents($fp);
    
        //check to see if stream is open
         if ($response === false) {
            throw new Exception("php error message = " . "$php_errormsg");
         }
    
        //close the stream
         fclose($fp);
    
        //parse the ap key from the response
    
        $keyArray = explode("&", $response);
    
        foreach ($keyArray as $rVal){
            list($qKey, $qVal) = explode ("=", $rVal);
                $kArray[$qKey] = $qVal;
        }
    
     //print the response to screen for testing purposes
        If ( $kArray["responseEnvelope.ack"] == "Success") {
            echo "<strong>".$method ."</strong><br>";
             foreach ($kArray as $key =>$value){
            echo $key . ": " .$value . "<br/>";
    
        }
        // Return payKey
        global $payKey;
        if(!empty($kArray['payKey'])) { $payKey = $kArray['payKey']; return($payKey); }
    
         }
        else {
            echo 'ERROR Code: ' .  $kArray["error(0).errorId"] . " <br/>";
          echo 'ERROR Message: ' .  urldecode($kArray["error(0).message"]) . " <br/>";
        }
    
       }
    
    
    catch(Exception $e) {
        echo "Message: ||" .$e->getMessage()."||";
      }
    }
    
    
    
    //Create Pay body
    $bodyparams = array (   "requestEnvelope.errorLanguage" => "en_US",
                            'actionType' => 'PAY',
                            'currencyCode' => 'USD',
                            'receiverList.receiver(0).email' => 'another_account@domain.tld',
                            'receiverList.receiver(0).amount' => '1.00',
                            'senderEmail' => 'xxxxxxxxx',
                            'memo' => 'Test memo',
                            'ipnNotificationUrl' => 'http://xxxxxxxx',
                            'cancelUrl' => 'http://xxxxxxxxx',
                            'returnUrl' => 'http://xxxxxxxxxx'
                        );
    
                        // Call Pay API
    AdaptiveCall($bodyparams, "Pay");
    
    ?>
    

    Pay response:
    responseEnvelope.timestamp: 2012-03-03T09%3A10%3A22.900-08%3A00
    responseEnvelope.ack: Success
    responseEnvelope.correlationId: 4bc5cfc4a7514
    responseEnvelope.build: 2486531
    payKey: AP-1XJ7636763429720C
    paymentExecStatus: COMPLETED

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use RMO to programmatically perform merge synchronization. I've basically copied the
I am trying to use jQuery to basically wrap a bunch of CSS modifications
I am trying to use JSON to populate a div, so I basically run
I'm basically trying to create a generic object in javascript that I can use
I am trying to use the JQuery on() method. Basically I am trying to
I am trying to use GetExtendedTcpTable via a Python program. Basically I am trying
I am basically trying to return from a method which reads user input from
I'm trying to use boilerpipe from JRuby. I've seen the guide for calling Java
Basically I'm trying to use a BufferedWriter to write to a file using Java.
I'm currently trying to use a WPF component that makes use of Application.Current from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.