PayFlow PayPal recurring Payment EXPDATE Validation - paypal

Hi I have been trying to validate CC no., CVV no., EXPDATE of the users credit card for recurring billing in PayFlow. The main objective is to let the user have access to subscription products only if the credit card is valid.
I have been advised to check the card prior to creating the profile you could run a credit card verification ($0 authorization)
So I did it and I got [RESPMSG] => Verified
Here's my request and response messages:
Request
Array
(
[TRXTYPE] => A
[TENDER] => C
[PARTNER] => PayPal
[USER] => XXXXX
[PWD] => XXXXX
[AMT] => 0
[ACCT] => 5105105105105100
[EXPDATE] => 1218
[INVNUM] => PONUM1
[VERBOSITY] => HIGH
[BILLTOZIP] => 95031
)
Response
Array
(
[RESULT] => 0
[PNREF] => A11A8C1A41C0
[RESPMSG] => Verified
[AUTHCODE] => 992PNI
[AVSADDR] => X
[AVSZIP] => X
[HOSTCODE] => A
[PROCAVS] => U
[TRANSTIME] => 2015-11-22 23:30:52
[AMT] => 0.00
[ACCT] => 5100
[EXPDATE] => 1218
[CARDTYPE] => 1
[IAVS] => X
[PREFPSMSG] => No Rules Triggered
[POSTFPSMSG] => No Rules Triggered
)
Now my question is I haven't provided CVV2 and also Any future date as EXPDATE gets verified. Can you please explain how things are working here? Also how can I verify CC, CVV and EXPDATE ?

This is simply creating the profile without any initial payment. As such, it's not going to validate the card at all. Of course, the first payment attempted on the profile would fail.
If you want to check the card prior to creating the profile you could run a credit card verification ($0 authorization).
So run the card verification first, and then only if that is successful you would follow up with a call to create the profile.
Keep in mind that if you're working in the sandbox any credit card expiration and security code will be accepted as long as it's not expired. This is done in the sandbox to make testing quick and easy.
If you would like to force errors in the API response so you can test those cases, take a look at the PayFlow documentation on testing.

Yes in the Test mode any future date for EXPDATE will be fine as Andrew mentioned . If you are looking for CVV value to be returned as "N" in the test mode then you can adjust the CVV values according to the docs below .
https://developer.paypal.com/webapps/developer/docs/classic/payflow/integration-guide/#testing-card-security-code
NVP Request:
VENDOR=XXX&PARTNER=Paypal&USER=XXXX&PWD=XXXX&TRXTYPE[1]=A&TENDER[1]=C&VERBOSITY=HIGH&ACCT[16]=5105105105105100&EXPDATE[4]=1020&AMT=0.00&**CVV2[3]=400**&COMMENT1[23]=Global Test Transaction&FIRSTNAME[4]=John&LASTNAME[5]=Smith&STREET=49354 Main&CITY[7]=SanJose&STATE[2]=CA&ZIP[5]=94303&COUNTRY[2]=US
NVP Response:
RESULT=0
PNREF=A71C8A7EA028
RESPMSG=Verified
AUTHCODE=010101
AVSADDR=N
AVSZIP=N
CVV2MATCH=N
HOSTCODE=A
RESPTEXT=100
PROCAVS=I8
PROCCVV2=N
TRANSTIME=2015-11-23 20:05:55
FIRSTNAME=John
LASTNAME=Smith
AMT=0.00
ACCT=5100
EXPDATE=1020
CARDTYPE=1
IAVS=N
PREFPSMSG=No Rules Triggered
POSTFPSMSG=No Rules Triggered

Related

paypal error processing payment bmcreatebutton

I am creating Paypal buttons on the fly for shopping cart processing. I've used Express Checkout with no issues but the client does not want customers to have to complete the billing details on the EC page, using Hosted Payment buttons seems to be the solution.
I create the button using the NVP code sending the following:
(
[L_BUTTONVAR0] => business=emailaddress
[L_BUTTONVAR1] => paymentaction=sale
[L_BUTTONVAR2] => currency_code=AUD
[L_BUTTONVAR3] => cancel_return=http://localhost/orders/view/335774
[L_BUTTONVAR4] => notify_url=http://localhost/orders/complete_hostedpaypal/335774
[L_BUTTONVAR5] => return=http://localhost/orders/view/335774
[L_BUTTONVAR6] => invoice=Order #335774
[L_BUTTONVAR7] => subtotal=167.40
[L_BUTTONVAR8] => tax=2
[L_BUTTONVAR9] => shipping=3
[L_BUTTONVAR10] => handling=4
[L_BUTTONVAR11] => template=templateC
[L_BUTTONVAR12] => first_name=TEST
[L_BUTTONVAR13] => last_name=ORDER
[L_BUTTONVAR14] => buyer_email=emailaddress
[L_BUTTONVAR15] => address1=PO Box 2633
[L_BUTTONVAR16] => address2=
[L_BUTTONVAR17] => city=TAREN POINT
[L_BUTTONVAR18] => state=NSW
[L_BUTTONVAR19] => country=AU
[L_BUTTONVAR20] => zip=2229
[L_BUTTONVAR21] => billing_first_name=TEST
[L_BUTTONVAR22] => billing_last_name=ORDER
[L_BUTTONVAR23] => billing_address1=PO Box 2633
[L_BUTTONVAR24] => billing_address2=
[L_BUTTONVAR25] => billing_city=TAREN POINT
[L_BUTTONVAR26] => billing_state=NSW
[L_BUTTONVAR27] => billing_country=AU
[L_BUTTONVAR28] => billing_zip=2229
[L_BUTTONVAR29] => showBillingAddress=false
[L_BUTTONVAR30] => showShippingAddress=false
[L_BUTTONVAR31] => address_override=false
[L_BUTTONVAR32] => bn=AUD
[L_BUTTONVAR33] => lc=AU
[METHOD] => BMCreateButton
[BUTTONCODE] => TOKEN
[BUTTONTYPE] => PAYMENT
[USER] => [api_user]
[PWD] => [api_pwd]
[SIGNATURE] => [api_sig]
[VERSION] => 109.0
)
This returns ACK "Success" and the relevant code for the button and links...
When I navigate to the link the Paypal page https://securepayments.sandbox.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess?hosted_button_id=HSSS-BPdXvwvPaocw3NpZuxuIhGZuRL1DXlbqFgOo1BvzVYWKoSNjWyYwVilsDmt-QRxxvPmrlA shows:
Error Processing Payment
Error Message "This transaction can't be processed. Please pay with another card."
I emailed Paypal Merchant Services but have not had a response for some weeks now. Does anyone have any ideas?
I have upgraded the sandbox to pro.
I made a test using your parameters and generated a payment link, it worked for me(got redirected to templateC page and made a card payment). I used my own test pro account though. Are you seeing the error after you entered card info? If so you may create a fake credit card number on this page, step 4,
https://www.paypal-knowledge.com/infocenter/index?page=content&widgetview=true&id=FAQ1413&viewlocale=en_US&direct=en

Cannot get invoice in respose of CreateRecurringPaymentsProfile in paypal

My intention is to create a Recurring Profile and pass a company_id as custom parameter to be stored IPN database, where I can create a relation between payment and for which company it was done.
I have read that while creating Recurring Payment Profile to get some custom value in IPN database, you should pass it in PROFILEREFERENCE parameter and then retrieve it from rp_invoice_id in response.
I cannot get the desired output
My request:
$inputData = array(
'METHOD' => 'CreateRecurringPaymentsProfile',
'TOKEN' => $_GET['token'], //get from GetExpressCheckout
'PAYERID' => $billerInfo['PAYERID'], //from GetExpressCheckout response
'PROFILESTARTDATE' => date("Y-m-d h:i:s", strtotime("+5 seconds")), //2012-05-11T00:00:00Z #Billing date start, in UTC/GMT format
'DESC' => 'LeaveBuddy: subscription amount is $' . $bill .' for the provided service ($12 per user per year).', //#Profile description - same as billing agreement description
'BILLINGPERIOD' => 'Year', #Period of time between billings
'BILLINGFREQUENCY' => 1,#Frequency of charges
'AMT' => 10, //Todo: dynamically calculate the amt #The amount the buyer will pay in a payment period
'CURRENCYCODE' => 'USD',#The currency, e.g. US dollars
'COUNTRYCODE' => 'US',#The country code, e.g. US
'MAXFAILEDPAYMENTS' => '0',#Maximum failed payments before suspension of the profile
'PROFILEREFERENCE' => 'companyid=1', //my custom value
);
The response that I am getting is:
{"InstantPaymentNotification":{"id":"553db30b-ea1c-4f68-8b5d-4fe5cbdd56cb","notify_version":"3.8","verify_sign":"A--8MSCLabuvN8L.-MHjxC9uypBtAQZom1C7.mbS1Jv-J898ZO0eeOr9","test_ipn":"1","address_city":null,"address_country":null,"address_country_code":null,"address_name":null,"address_state":null,"address_status":null,"address_street":null,"address_zip":null,"first_name":"code","last_name":"booster","payer_business_name":null,"payer_email":"codebooster#gmail.com","payer_id":"XXXXXXXX","payer_status":"verified","contact_phone":null,"residence_country":"US","business":null,"item_name":null,"item_number":null,"quantity":null,"receiver_email":"boom#gmail.com","receiver_id":null,"custom":null,"invoice":null,"memo":null,"option_name1":null,"option_name2":null,"option_selection1":null,"option_selection2":null,"tax":"0.00","auth_id":null,"auth_exp":null,"auth_amount":null,"auth_status":null,"num_cart_items":null,"parent_txn_id":null,"payment_date":null,"payment_status":null,"payment_type":null,"pending_reason":null,"reason_code":null,"remaining_settle":null,"shipping_method":null,"shipping":"0.00","transaction_entity":null,"txn_id":"316859739","txn_type":"recurring_payment","exchange_rate":null,"mc_currency":null,"mc_fee":null,"mc_gross":10,"mc_handling":null,"mc_shipping":null,"payment_fee":null,"payment_gross":null,"settle_amount":null,"settle_currency":null,"auction_buyer_id":null,"auction_closing_date":null,"auction_multi_item":null,"for_auction":null,"subscr_date":null,"subscr_effective":null,"period1":null,"period2":null,"period3":null,"amount1":null,"amount2":null,"amount3":null,"mc_amount1":null,"mc_amount2":null,"mc_amount3":null,"recurring":null,"reattempt":null,"retry_at":null,"recur_times":null,"username":null,"password":null,"subscr_id":null,"case_id":null,"case_type":null,"case_creation_date":null,"created":"2015-04-27 03:54:51","modified":"2015-04-27 03:54:51"},"PaypalItem":[]}
So i cannot find any [rp_invoice_id] parameter here, and my invoice is also appearing null. Can any one tell me what I am missing?

The X-PAYPAL-APPLICATION-ID header contains an invalid value

I am using paypal adaptive payment on my project.But when i try to pay using preapproval i am getting this response from paypal
Array
(
[responseEnvelope.timestamp] => 2013-05-15T05:53:33.709-07:00
[responseEnvelope.ack] => Failure
[responseEnvelope.correlationId] => ec16bc5b116e0
[responseEnvelope.build] => 5867333
[error(0).errorId] => 560022
[error(0).domain] => PLATFORM
[error(0).subdomain] => Application
[error(0).severity] => Error
[error(0).category] => Application
[error(0).message] => The X-PAYPAL-APPLICATION-ID header contains an invalid value
[error(0).parameter(0)] => X-PAYPAL-APPLICATION-ID
)
And the transaction is failed.
Please help
Thanks
The appID for sandbox and live are different. For sandbox, everyone must use APP-80W284485P519543T. For live, you must use the ID that matches the app's credentials.

PayPal response missing tax

I'm working on an NVP API integration and the entire payment process is working properly. The response I get from PayPal upon completion doesn't provide all the proper information.
Here is the code I am sending PayPal
&PAYMENTREQUEST_0_AMT=44.48
&PAYMENTREQUEST_0_ITEMAMT=40
&PAYMENTREQUEST_0_TAXAMT=4.48
&PAYMENTREQUEST_0_SHPPINGAMT=0
&PAYMENTREQUEST_0_INVNUM=5193f0cca7e70
&PAYMENTREQUEST_0_CURRENCYCODE=USD
&PAYMENTREQUEST_0_DESC=Test payment desc
&L_PAYMENTREQUEST_0_AMT0=40
&L_PAYMENTREQUEST_0_QTY0=1
&L_PAYMENTREQUEST_0_NAME0=Test item
&L_PAYMENTREQUEST_0_NUMBER0=5191cd62462fb
&L_PAYMENTREQUEST_0_DESC0=Test item desc
&L_PAYMENTREQUEST_0_SHPPINGAMT0=0.00
&L_PAYMENTREQUEST_0_TAXAMT0=4.48
&RETURNURL=[REMOVED]
&CANCELURL=[REMOVED]
&BRANDNAME=Some Con 2014
&CUSTOMERSERVICENUMBER=000-000-0000
The order goes through and proper payment is processed, however the information given back is missing the tax information.
[TOKEN] => EC-1KS56755YX305151R
[SUCCESSPAGEREDIRECTREQUESTED] => false
[TIMESTAMP] => 2013-05-15T20:48:42Z
[CORRELATIONID] => 553a6a47ec1
[ACK] => Success
[VERSION] => 98
[BUILD] => 5956203
[INSURANCEOPTIONSELECTED] => false
[SHIPPINGOPTIONISDEFAULT] => false
[PAYMENTINFO_0_TRANSACTIONID] => 1XV29769HY7702037
[PAYMENTINFO_0_TRANSACTIONTYPE] => expresscheckout
[PAYMENTINFO_0_PAYMENTTYPE] => instant
[PAYMENTINFO_0_ORDERTIME] => 2013-05-15T20:48:41Z
[PAYMENTINFO_0_AMT] => 44.48
[PAYMENTINFO_0_FEEAMT] => 1.59
[PAYMENTINFO_0_TAXAMT] => 0.00
[PAYMENTINFO_0_CURRENCYCODE] => USD
[PAYMENTINFO_0_PAYMENTSTATUS] => Completed
[PAYMENTINFO_0_PENDINGREASON] => None
[PAYMENTINFO_0_REASONCODE] => None
[PAYMENTINFO_0_PROTECTIONELIGIBILITY] => Eligible
[PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE] => ItemNotReceivedEligible,UnauthorizedPaymentEligible
[PAYMENTINFO_0_SECUREMERCHANTACCOUNTID] => 3JTQYBPNDRWES
[PAYMENTINFO_0_ERRORCODE] => 0
[PAYMENTINFO_0_ACK] => Success
Why is PAYMENTINFO_0_TAXAMT coming back 0 when it is 4.48?
I'm also having an issue where the email that is sent upon purchase from PayPal is not listing the items purchased and only a general total amount. Notice description is not the item description but the overall order description.
-----------------------------------
Purchase Details
-----------------------------------
Description: Test payment desc
Unit price: $44.48 USD
Qty: 1
Amount: $44.48 USD
Subtotal: $44.48 USD
The tax is not being displayed because it is not getting passed over in your DoExpressCheckoutPayment API call. I checked the logs, and I only show that you passed it over in the SetExpressCheckout API call, but not the DoExpressCheckoutPayment API call. You would need to pass it over in the Do EC call if you are wanting it returned. This is also what is happening with your description. It is not getting passed over in the Do EC call.

paypal ipn payment_status processed vs completed

I am new to paypal integration and doing ipn integration right now.
I am a little confused regarding payment_status processed and completed values according to their site.
Completed: The payment has been completed, and the funds have been
added successfully to your account balance.
Processed: A payment has been accepted.
Dont really get this?
here are my questions
if it sends an ipn with payment status processed, will it send
another ipn with payment status completed?
when does it send a processed ipn and when does it send a completed
ipn?
for which status should you consider a item(s) paid for? completed or processed?
thanks in advance
I'm pretty sure the only time you'd see processed is if you send a payment to an account that doesn't exist yet, or if you send to an account where they have their settings configured to have them accept any payments they receive.
In such a case, when the payment takes place it will have a "status_n" of "unclaimed" and the payment_status would be processed. Note that the n would be the number of the payment in cases where you had more than 1. For example, with MassPay. In fact, here's a sample I was able to find in my IPN logs...
txn_type = masspay
payment_gross_1 = 1500.00
payment_date = 09:52:38 Dec 23, 2012 PST
last_name = Angell
mc_fee_1 = 1.00
masspay_txn_id_1 = 9N3213015V198645H
receiver_email_1 = info#acexlogics.com
residence_country = US
verify_sign = AueDyRcHXo48zG3juE2C-Z801Wi9AhrDKrUI2Dxtkt8T9UVV4DHECvEC
payer_status = verified
test_ipn = 1
payer_email = sandbo_1215254764_biz#angelleye.com
first_name = Drew
payment_fee_1 = 1.00
payer_id = ATSCG2QMC9KAU
payer_business_name = Drew Angell's Test Store
payment_status = Processed
status_1 = Unclaimed
mc_gross_1 = 1500.00
charset = windows-1252
notify_version = 3.7
mc_currency_1 = USD
unique_id_1 = 3
ipn_track_id = a8817fe5573f3
This particular IPN was from a MassPay request that included only a single receiver. It came back as "processed" and "unclaimed" because the receiver_email didn't have an existing PayPal account yet.
Here's a separate IPN for a MassPay request that included 3 receivers and all had accounts, so they all came back as completed.
[payer_id] => ATSCG2QMC9KAU
[payment_date] => 21:37:28 Jan 01, 2013 PST
[payment_gross_1] => 10.00
[payment_gross_2] => 10.00
[payment_gross_3] => 10.00
[payment_status] => Processed
[receiver_email_1] => andrew_1342623385_per#angelleye.com
[receiver_email_2] => usb_1329725429_biz#angelleye.com
[charset] => windows-1252
[receiver_email_3] => andrew_1277258815_per#angelleye.com
[mc_currency_1] => USD
[masspay_txn_id_1] => 53E82259BP7975932
[mc_currency_2] => USD
[masspay_txn_id_2] => 4AS03088H50506411
[mc_currency_3] => USD
[masspay_txn_id_3] => 6A492363UM676994C
[first_name] => Drew
[unique_id_1] =>
[notify_version] => 3.7
[unique_id_2] =>
[unique_id_3] =>
[payer_status] => verified
[verify_sign] => A2Kn5CkYqzBOhX.t-MhTsUEnQbXNAs-mp6LyPmPY1bKAQnyPlKUqiOZN
[payer_email] => sandbo_1215254764_biz#angelleye.com
[payer_business_name] => Drew Angell's Test Store
[last_name] => Angell
[status_1] => Completed
[status_2] => Completed
[status_3] => Completed
[txn_type] => masspay
[mc_gross_1] => 10.00
[mc_gross_2] => 10.00
[mc_gross_3] => 10.00
[payment_fee_1] => 0.20
[residence_country] => US
[test_ipn] => 1
[payment_fee_2] => 0.20
[payment_fee_3] => 0.20
[mc_fee_1] => 0.20
[mc_fee_2] => 0.20
[mc_fee_3] => 0.20
[ipn_track_id] => e1938454f1e98
I don't have time to setup a scenario where the account doesn't exist and is then created and accepted, but I'm fairly certain you would indeed get another IPN showing it was completed.
Long story short, I would make sure to look for "completed" as oppose to "processed" when handling post-payment processing.