Im Implementing PayPal's Client Side REST implementation for Express Checkout:
https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/client-side-REST-integration/
How does anyone know what the field is where you pass them a transaction or reference ID that they will then return via the?
https://developer.paypal.com/docs/api/payments/
Tried transaction.reference_id, and the invoice_number fields. No luck.
If anyone else is wondering you can make use of the 'custom' parameter bound to each transaction object.
Related
All is in the title, I tried a lot of possibilities but I didn't find a way to do this. My goal is to get some data in IPN allowing me to know which offer the user choose.
I know how to do it with SetExpressCheckout and it works in express_checkout context... but when in recurring_payment_profile_created or recurring_payment context, I'm not able to pass any custom field.
Thanks for your help.
Well, the custom field of BillingAgreement is ignored for CreateRecurringPaymentsProfile, I don't understand why but I decide to use the ProfileReference field as suggested here: PAYPAL IPN custom field missing
I'm adding very simple membership renewal functionality to a web site using PayPal Payments Standard buttons. We only have 300 or so members, so a simple e-comm solution like this should work fine.
I'd like to capture some sort of confirmation that I can then capture on my end so that I can insert it into the database. I've seen the IPN listener method, but it seems more complex than I really need - all I really need is to pass the confirmation code via a URL variable in the return URL, i.e. http://www.example.com/landing?transactionid=abc123. Is this possible? Also, is there a way to pass my own dynamic variable (for instance, a membership ID) into the form and have that be a part of the return string?
Thanks
An alternative is to use express checkout which is a two step process requiring pre-authorization and then charging a customer. If you are accepting echecks you will eventually need to use IPN to update the original transaction. You can pass a dynamic variable using the custom field in Paypal.
Either way one of the two methods is required to process a transaction securely - what is stopping someone from typing the URL you are suggesting?
I'm wrapping up my express checkout integration. So far, so good. Only possible problem is I need to supply MerchantID in paypal.checkout.setup(..), something like this was not needed in classic EC. Because I'm implementing on an ecommerce system with many stores, but same code, this presents a bit of a struggle.
What I noticed is that if I simply put an empty string for ID, the checkout process completes successfully on sandbox.
My fairly short question is how mandatory is that ID, since it's only needed for In-Context checkout and practically any string works? Can I skip it?
Thanks!
The field is not exactly mandatory. You are not required to put in your email address or your Merchant ID. It's used for tracking with PayPal using In-Context. However, in order to generate the button you will need to keep a space in the field.
paypal.checkout.setup(' ', {
container: 'myContainer',
environment: 'production'
});
I am using paypal API for subscription.
I Want to pass custom variable in IPN like user id so that I can save the id in database and show user only his transactions.
There are a couple of ways you could do that.
If you have an invoice ID of some sort that's already related back to your customer then you could just pass that invoice ID into the INVNUM parameter of your API request. That way it will come back in the "invoice" parameter in IPN, and then you can use your existing relationships to pull back out your customer ID and save the new transaction for that customer ID.
Alternatively, you could just use the CUSTOM parameter in your API requests which allows you to pass any string you want up to 256 characters. If that one value is all you need then you could just store it alone and pull it out of IPN using the "custom" parameter there. If you need to pass more than 1 custom value you could include them all in a string like "val1|val2|val3|etc" and parse that out of the custom parameter that IPN sends you.
I'm using the callback API to prevent someone selecting a non-UK shipping address. I've supplied a callback url, I've set CALLBACKVERSION to 61.0.
When I go into the sandbox and choose an address I know the callback page is being called as I've added code to email me the values submitted to it and the value returned to PayPal. For anything with a SHIPTOCOUNTRY that isn't GB the response is
METHOD=CallbackResponse&NO_SHIPPING_OPTION_DETAILS=1
I've also tried setting a fuller response in case it doesn't like some required field to be missing
METHOD=CallbackResponse&CURRENCYCODE=GBP&L_SHIPPINGOPTIONNAME0=Standard&L_SHIPPINGALABEL0=Standard&L_SHIPPINGAMOUNT0=2.95&L_SHIPPINGOPTIONISDEFAULT0=true&L_SHIPPINGOPTIONNAME1=Express&L_SHIPPINGALABEL1=Express&L_SHIPPINGAMOUNT1=5.95&L_SHIPPINGOPTIONISDEFAULT1=false&NO_SHIPPING_OPTION_DETAILS=1
But it's still allowing non-UK addresses and just using the shipping options set during the initial set up request.
Any suggestions on where I'm going wrong?
After opening a ticket as suggested by PayPal_Patrick the problem was that I was adding the callbackversion in the wrong place. The full response to reject a shipping address on callback is:
METHOD=CallbackResponse&NO_SHIPPING_OPTION_DETAILS=1&CALLBACKVERSION=61
There are different transaction ID's for Buyer and Seller accounts.
I think this might be an issue caused by the country associated with the buyer account being used. I'm going to reach out to the product team for Express Checkout and see if it is intended functionality or not - I don't believe it would be.
If you want to stay updated on the issue I would recommend creating a ticket to PayPal.com/mts, give me the ticket number, I'll grab it and keep you involved.