Using PayPal NVP API 65.1. During SetExpressCheckout, I set ALLOWNOTE=1 however the PayPal payment page does not display an input field to enter a note. I've tried setting it to 'true' as well but PayPal complains about a data type error. So I know the field is being passed through to PayPal with a valid value. Still no dice. Thoughts?
Please check the required parameters.
https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/
(Optional) Enables the buyer to enter a note to the merchant on the PayPal page during checkout. The note is returned in the GetExpressCheckoutDetails response and the DoExpressCheckoutPayment response. It is one of the following values:
0 – The buyer is unable to enter a note to the merchant.
1 – The buyer is able to enter a note to the merchant.
Character length and limitations: 1 single-byte numeric character
ALLOWNOTE This field is available since version 53.0.
Related
I using Paypal / Payflow Pro's Authorization transaction (TRXTYPE=A) to validate credit card information. I am passing 0.00 as the AMT. This works fine and can filter out wrong account number as well as card expiration date, paypal returns "RESPMSG=Invalid......".
However, the problem is in verifying both CVV2 and BILLTOZIP. When passing wrong values for these two paypal still returns "RESPMSG=Approved".
I am missing something?
Can we validate CVV2 and BILLTOZIP on paypal?
Is there another method that I can use for this?
I am using this request:
USER=XXXXXX&VENDOR=XXXXXXXX&PARTNER=PayPal&PWD=XXXX&TRXTYPE=A&TENDER=C&ACCT=4xxxx&EXPDATE=xxxx&CVV2=xxx&AMT=0&INVNUM=521aa62355f5eb5515eca3777e1f8b78&PONUM=PFDCCTEST&COMMENT1=Test Comment 1&COMMENT2=Test Comment2&VERBOSITY=HIGH&BILLTOFIRSTNAME=Frank
&BILLTOLASTNAME=Enstien&BILLTOSTREET=123 Main St.&BILLTOSTREET2=Suite 267&BILLTOCITY=GILBERT
&BILLTOSTATE=AZ&BILLTOZIP=85298&INVNUM=InvoiceNumber001&CUSTOM=CustomNumber001
Is this live or sandbox?
paypal still returns "RESPMSG=Approved
Check the rest of the return for =N , =X, other documented invalid value
If you still have issues post a full return string.
Why is everything PayPal so crazy hard?
This is what I'm sending to https://api-3t.sandbox.paypal.com/nvp :
METHOD=DoExpressCheckoutPayment&
VERSION=108.0&
USER=my-sandbox-facilitator_api1.domain.com&
PWD=&
SIGNATURE=&
SUBJECT=&
TOKEN=EC-1GE68226PG526154U&
PAYERID=my-sandbox-buyer%40domain.com
PAYMENTREQUEST_0_PAYMENTACTION=SALE&
PAYMENTREQUEST_0_AMT=19.95&
PAYMENTREQUEST_0_CURRENCYCODE=USD&
PAYMENTREQUEST_0_NOTIFYURL=
This is what I'm getting back:
TIMESTAMP=2015-12-12T21%3a35%3a34Z&
CORRELATIONID=d9a463bfa6bb4&
ACK=Failure&
VERSION=108.0&
BUILD=18308778&
L_ERRORCODE0=10406&
L_SHORTMESSAGE0=Transaction+refused+because+of+an+invalid+argument.+See+additional+error+messages+for+details.&
L_LONGMESSAGE0=The+PayerID+value+is+invalid.&
L_SEVERITYCODE0=Error
Just before this I did a METHOD=GetExpressCheckoutDetails without any problems.
PayerID wasn't invalid for that?!?!!
I have a token so I did a METHOD=SetExpressCheckout without any problems.
Ideas?
No amount of Google had a working answer for me.
Either did PP's 5(!) tech support sites.
It is the same issue even if I reconfigure and and shoot a similar transaction at my live PP.
PAYERID is a unique PayPal buyer account identification number as returned after SetExpressCheckout API call(after buyer login to paypal and gets redirected to your RETURN URL , you will need to copy that PAyer Id and use in Doexpresscheckout request. Payer is a 13 single-byte alphanumeric character and not an email address.
https://developer.paypal.com/docs/classic/api/merchant/DoExpressCheckoutPayment_API_Operation_NVP/
I am testing using the sandbox at the moment new functionality to use paypal express as a payment method. I have successfully made a payment and am inspecting the returned
values from the DoExpressCheckoutPayment
One of the fields returned is PAYMENTINFO_n_AMT and my vbscript code is
PPFamt = resArray("PAYMENTINFO_0_AMT") ' The final amount charged, including any shipping and taxes from your Merchant Profile.
I would expect this value to match the total amount being requested (from the Set) but
it seems to be rounded.
i.e. if I request a payment of 217.85 - the PPFamt value is 218.00
if I request a payment of 66.90 - the PPFamt is 67.00
I am using GBP currency for both the seller and buyer accounts.
Has anyone else come across this? I can't see that I am doing anything wrong or rounding it in the code, so I am assuming Paypal is doing this.
Any advice appreciated.
User error - paypal was just returning the value I sent in the DoExpressCheckoutPayment stage.
Except as detailed below, my flow is working in both sandbox and live.
I set urlencoded nvp SURVEYENABLE=1&SURVEYQUESTION=test&L_SURVEYCHOICE0=yes&L_SURVEYCHOICE1=no, but buyer is never shown survey; GetExpressCheckoutDetails does not contain SURVEYQUESTION or SURVEYCHOICESELECTED.
I set urlencoded nvp ALLOWNOTE=1, but buyer is never shown the note text input box; GetExpressCheckoutDetails does not contain NOTE. However, if I set PAYMENTREQUEST_0_NOTETEXT="seller test note", this is passed to GetExpressCheckoutDetails (just as if it was PAYMENTREQUEST_0_CUSTOM).
Problem is seen both live and in sandbox.
The survey options are apparently not supposed to work with Recurring Payment transactions. When I remove those options from the request and test it with my own credentials the note and survey appeared correctly.
I'll submit a feature request to allow surveys with a Recurring Payment creation but I can't be sure it will be implemented.
In your request you have L_PAYMENTREQUEST_0_NUMBER0=TODO L_NUMBER0=TODO set. You don't need the L_NUMBER0=TODO set
I am using PayPal with NVP API (using PHP) for express checkout. I am creating an invoice record in the database before redirecting the user to Paypal. In case the user doesn't return to my site after processing, I am using IPN to confirm the purchase and then update the invoice record that the payment is confirmed. I am still in the sandbox mode and trying to figure out how I will tie the transaction started with NVP to the confirmation I get with IPN.
I need to verify if the "PAYMENTREQUEST_n_INVNUM" sent in the NVP will come back as "invoice" in the IPN post.
It appears I cannot actually test this until I am live since the Sandbox IPN does not seem to be active with NVP initiated sandbox transactions - is this correct?
Thanks for your help.
You can test this in Sandbox. But if you're using "PayPal NVP", I assume you're using PayPal Express Checkout and calling the SetExpressCheckout and DoExpressCheckoutPayment API's.
If that's the case, you don't really need IPN, because a transaction will only be completed as soon as you call DoExpressCheckoutPayment.
In other words, buyers will always be redirected to the RETURNURL you specified in SetExpressCheckout, and the transaction is completed (or not) when you call DoExpressCheckoutPayment on this return page.
To get the invoice number, you could call GetExpressCheckoutDetails and supply the TOKEN you retrieved earlier (it's also appended to the GET of the RETURNURL).
Finally, check PAYMENTSTATUS=Completed in the DoExpressCheckoutPayment API response to see whether the transaction has completed or not.
Thank you Robert for the clarity on the process - especially useraction=commit.
I finally realized that I could turn on IPN in the Sandbox for my test seller and test NVP with IPN together. I was able to verify that PAYMENTREQUEST_0_INVNUM matches the 'INVOICE' parameter in the IPN POST.
I will use the custom field to pass customer email from my system in case they use a different email to log into paypal with, therefore allowing me to have email/invoice number pair for confirmation.