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 7088325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:47:13+00:00 2026-05-28T07:47:13+00:00

I have implement paypal library for payment in my iphone project. How can I

  • 0

I have implement paypal library for payment in my iphone project.

How can I retrieve transaction id after following method called successfully.

-(void)paymentSuccessWithKey:(NSString *)payKey andStatus:(PayPalPaymentStatus)paymentStatus {
    status = PAYMENTSTATUS_SUCCESS;
}

- (void)paymentLibraryExit 
{
    UIAlertView *alert1 = nil;

    switch (status) 
        {           
        case PAYMENTSTATUS_SUCCESS:            
                {
                   .......
                   ...........
                }
                ...............
                ..............
         }
}
  • 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-28T07:47:14+00:00Added an answer on May 28, 2026 at 7:47 am

    Finally, i got transaction id using paykey by api with following api detail:-
    https://www.x.com/developers/paypal/documentation-tools/api/paymentdetails-api-operation

    You can get transaction id by parsing data of response of following api request code:-

    - (void)paymentSuccessWithKey:(NSString *)payKey andStatus:(PayPalPaymentStatus)paymentStatus {
        status = PAYMENTSTATUS_SUCCESS;
    
        NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://svcs.paypal.com/AdaptivePayments/PaymentDetails"]];
    
        NSMutableURLRequest *theRequest=[NSMutableURLRequest requestWithURL:url];
    
    
        NSString *parameterString = [NSString stringWithFormat:@"payKey=%@&requestEnvelope.errorLanguage=%@",payKey,@"en_US"];
    
        NSString *msgLength = [NSString stringWithFormat:@"%d", [parameterString length]];
    
        [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"];
    
        //do post request for parameter passing 
        [theRequest setHTTPMethod:@"POST"];
    
        [theRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
    
        //passing key as a http header request 
        [theRequest addValue:api_username forHTTPHeaderField:@"X-PAYPAL-SECURITY-USERID"];
    
        //passing key as a http header request
        [theRequest addValue:api_password forHTTPHeaderField:@"X-PAYPAL-SECURITY-PASSWORD"];
    
        [theRequest addValue:api_signature forHTTPHeaderField:@"X-PAYPAL-SECURITY-SIGNATURE"];
    
        [theRequest addValue:@"NV" forHTTPHeaderField:@"X-PAYPAL-REQUEST-DATA-FORMAT"];
    
        [theRequest addValue:@"NV" forHTTPHeaderField:@"X-PAYPAL-RESPONSE-DATA-FORMAT"];
    
        [theRequest addValue:app_id forHTTPHeaderField:@"X-PAYPAL-APPLICATION-ID"];
    
        [theRequest setHTTPBody: [parameterString dataUsingEncoding:NSUTF8StringEncoding]];
    
        NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
    
        if( connection )
        {
            webData = [[NSMutableData data] retain];
        }
        else
        {
            NSLog(@"theConnection is NULL");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to implement Direct payment method as I have user's credit card
I have to implement a IExceptionHandler for the Enteprise Library 4.1. In my particular
I have a school project in which I have to implement a chat application,
I'm trying to implement a payment system using the new PayPal API (Adaptive Payment).
I'm trying to implement paypal into my website. So what i have is a
I have implement the following code in order to test playing a video from
I have implemented IPN in paypal which updates about the payment in our server's
I have implemented 2 payment gateways in my app (paypal and datatrans). In both
I have implement the following code to create a SSL server socket. public void
I have implement the simple TCP server and TCP client classes which can send

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.