paypal - invoice field not returned - paypal

Payment is created using IOS SDK. Invoice field is set on payment - and it is returned in payment confirmation (on IOS). When I request for payment using this API https://developer.paypal.com/docs/api/#look-up-a-payment-resource on server, it is returned with transactions, payer etc, everything but invoice field (also tried with custom field). Using sandbox API. How can I get invoice number/custom field by payment id?

Dave from PayPal here.
Contrary to what I posted just a moment ago about a possible PayPal server bug, we've now done a bit more investigation.
The invoice-number and custom fields should be coming through just fine for PayPal payments. However, if you try a Credit Card payment you will not currently see these fields. The credit card issue should be resolved within the next few weeks.

Related

PayPal - Pass Customer ID from my website - Receive confirmation with same Customer ID from my website

I am working on a software service and am offering a monthly subscription for my software service.
I am currently working on the subscription part - and am wanting to implement a paypal monthly recurring payment solution.
I have spent quite a bit of time looking over PayPal documentation, and trying different buttons, webhooks, IPN methods etc.
The problem is that I am not sure what solution to use - because I am confused by the multiple options.
What is most important to me is - that when the customers fill out the form on my website - and are then directed PayPal to pay - I then want to know that specific Customer ID from my website has successfully paid.
I would like to know:
Which SPECIFIC option(s) PayPal has that I can pass Customer ID from my website of that customer - let's say a subscription ID from my site - and that PayPal will then send the customer back with my subscription ID, that I passed them on to PayPal with.
Which is the easiest option to do that with?
I simply want the customer to:
sign up at my site. (my part)
be issued a unique Customer ID from my website (my part)
click a PayPal payment/subscribe button (my part)
be sent to PayPal to pay for the subscription (paypal's part)
be returned to my site with the unique Customer ID from my website from my site - as well as a confirmation of payment from PayPal (paypal's part)
Please do not simply pass me to the general area of the development sections -
As I said - I have already been through all of that and find there is too much information.
Please direct me to a specific solution, or example, or tutorial that covers a solution that will fit what I need.
I would recommend using the Express Checkout API with Recurring Payments.
The best thing to do would be to create a local invoice record in your system, and then have a related customer ID associated with that invoice.
In the CreateRecurringPaymentsProfile request to PayPal you can include a PROFILEREFERENCE parameter, which would be the invoice ID you generated for that order in your system. Then all future payments related to that profile would include this same reference ID as part of its data, so if you're using IPN, for example, it would be included there.
When working with Express Checkout the user is always guaranteed to end up back on your site to finish the checkout flow, so you can simply save data in sessions during checkout and update things like your database, email receipts, etc. directly in your payment flow. Then you could use IPN to process the recurring payments after that, and again, it would include that same reference ID. In IPN this would come back as rp_invoice_id.

PayPal Credit + SetExpressCheckout

I am trying to setup PayPal Credit through the SetExpressCheckout API Operation. A standard payment is fine but I am having an issue setting the PayPal landing page to their Credit service.
I have seen this done elsewhere, for example on the Dyson and Apple webstores, where there is a separate PayPal Credit button which leads to a page where the customer can select their installment plan. As such: http://oi63.tinypic.com/r09w1c.jpg
Looking at the demos and documentation, it seems all that is needed are the options LANDINGPAGE=Billing&USERSELECTEDFUNDINGSOURCE=BML
This however doesn't work and takes the customer to an old style PayPal checkout.
Even the PayPal Credit demos on https://demo.paypal.com don't seem to work anymore when you change them from Static to Sandbox.
Has anyone managed to set this up successfully?

Paypal Payments - What to store from them?

I was wondering, if you have coded a website which uses paypal payments as a payment method (the kind of payments where you get redirected to their site for payment, not web payment pro).
What kind of details can I store? Is it just their paypal email address that can get supplied to me or do other details regarding their paypal account also get sent to me via their API which can be stored on my site?
As already mentioned, you get the details of the transaction, so email address, name, delivery address and the contents of the shopping cart.
You can send custom parameters from your form though, such as phone number.
Paypal, by default doesn't ask users to provide a phone number and therefore usually doesn't send you one. However, it's often useful for retailers to have a customers phone number.
If your shopping cart is populated by your website and then customers are asked to complete a brief, name, phone number, email form before submitting to Paypals site you can send these extra form fields to Paypal and have them come back to your server for storage/checking.
However... I found it very erratic! There seemed to be a problem with my account when I did this and the PP technical team couldn't explain why it was only sometimes working! I gave up in the end and found a Payment gateway with credit card and Paypal integration, now all my payments come through the same channel and callback methods regardless of type.
http://www.securehosting.com I use now.
Mostly only the details pertaining to the transaction can be retrieved in the usual procedure, as it appears even when you see the transaction details in your paypal account when you receive payments. However, it would be helpful for you if you can provide more information on what you wish to look for.

Paypal IPN and transaction IDs

I currently have a simple Paypal button on my website where people enter some information which is saved into a database, and the button then takes them to paypal to pay £20 to join. The problem is there is no link between the website and paypal, so I have to manually cross check who has joined on the website against Paypal each time.
I've looked into Paypal IPN which looks ideal, but I can't work out how to match the transactions up.
i.e. IPN sends me a txn_id, but I don't have that at my end. I need a way to send a generate & save a unique ID per transaction, that goes to Paypal with the user, and Paypal then sends back to me via IPN.
I'm quite lost in Paypals shoddy docs, so any help from SO would help!
(Off topic rant: why to Paypal have so many domains: paypal.com, paypal-business.com, x.com, paypal-marketing.com,... Can they not spell phishing?!)
Pass YOUR id (like the DB row id) to Paypal with custom variable, you can cross reference it using the custom variable from IPN.
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables

Getting custom data from Paypal

I am creating a simple online paypal commerce and I have some doubts
on how sending data to seller and buyer when order payment is done. The
scenario looks like this:
Each product (legal documents) has a different form because in order to
deliver the product buyer need to specify different information for each
item. Studying Paypal documentation I have learnt that I can add hidden
fields and send them with transaction when I click the Buy Button or Add
To Cart.
When the payment is done:
buyer will receive the confirmation of payment (ok sent by paypal)
seller will receive all necessary information to fill the documents
for each product in one email.
I have noticed using sandbox that buyyer can add note for seller with payment
but unfortunatlly the textarea allow only a limitated text.
Please let me know if I understand correctly. When the payment is done Paypal
send back all data (IPN) to paypal script (including all information sent via
using the form). In that case I should be able to check if the transaction was
completed and if so doing the parser of the reply and send data via email using
PHP to seller. Is it correct?
Does anyone can show me a simple example?
Thanks a lot.
When transaction is complete (subscription,one time web form payment,express checkout or something else ) , Paypal sends authorization query to your IPN script (link to which is defined in your Paypal profile)
The IPN values are described here
https://www.paypalobjects.com/en_US/ebook/subscriptions/Appx-ipn_subscription_variables.html
or here
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables