Paypal express checkout api contact information not filled - paypal

Can anybody help me to fill paypal express checkout contact information i.e Email and Phone. I am using api and put the information PAYMENTREQUEST_0_EMAIL and PAYMENTREQUEST_0_SHIPTOPHONENUM but it didnot
Array
(
[TOKEN] => EC-73M07454JV691235C
[TIMESTAMP] => 2014-07-10T07:51:49Z
[CORRELATIONID] => 1fdcf61358cf8
[ACK] => Success
[VERSION] => 112.0
[BUILD] => 11811513
[REDIRECTURLDIGITALGOODS] => https://www.paypal.com/incontext?useraction=continue&token=EC-73M07454JV691235C
[REDIRECTURL] => https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=continue&token=EC-73M07454JV691235C
[ERRORS] => Array
(
)
[REQUESTDATA] => Array
(
[USER] =>
[PWD] =>
[VERSION] => 112.0
[BUTTONSOURCE] =>
[SIGNATURE] =>
[METHOD] => SetExpressCheckout
[MAXAMT] => 20.00
[RETURNURL] =>
[CANCELURL] =>
[ADDROVERRIDE] => 1
[LOCALECODE] => FR
[BRANDNAME] => Demo
[SOLUTIONTYPE] => Sole
[LANDINGPAGE] => Billing
[USERSELECTEDFUNDINGSOURCE] => CreditCard
[PAYMENTREQUEST_0_AMT] => 10.00
[PAYMENTREQUEST_0_CURRENCYCODE] => EUR
[PAYMENTREQUEST_0_SHIPPINGAMT] => 0.00
[PAYMENTREQUEST_0_TAXAMT] => 0.00
[PAYMENTREQUEST_0_SHIPTONAME] => Didier Gueret
[PAYMENTREQUEST_0_SHIPTOSTREET] => 4 rue de l´officialité BP 19
[PAYMENTREQUEST_0_SHIPTOCITY] => Valognes
[PAYMENTREQUEST_0_SHIPTOZIP] => 50700
[PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => FR
[PAYMENTREQUEST_0_EMAIL] => test#test.com
[PAYMENTREQUEST_0_SHIPTOPHONENUM] => 408-559-5948
[PAYMENTREQUEST_0_PAYMENTACTION] => Sale
[L_PAYMENTREQUEST_0_NAME0] => Commande
[L_PAYMENTREQUEST_0_AMT0] => 10.00
[L_PAYMENTREQUEST_0_NUMBER0] => 3423423
[L_PAYMENTREQUEST_0_QTY0] => 1
[PAYMENTREQUEST_0_ITEMAMT] => 10
)

Are you making sure to include the same parameter in the DoExpressCheckoutPayment request? If you don't include it there it won't show up in the final transaction details.

Related

PayPal REST completePurchase fee information

How can I get the fees from PayPal?
When I complete the purchase I can do $data = $response->getData(), and I get this information:
Array (
[id] => PAYID-LYUDPFA8E292123AP955374L
[intent] => sale
[state] => approved
[cart] => 3CN05415NR550735F
[payer] => Array (
[payment_method] => paypal
[status] => VERIFIED
[payer_info] => Array (
[email] => accounting-buyer#mobipium.com
[first_name] => test
[last_name] => buyer
[payer_id] => GTHZDZWYCELWU
[shipping_address] => Array (
[recipient_name] => test buyer
[line1] => 1 Main St
[city] => San Jose
[state] => CA
[postal_code] => 95131
[country_code] => US
)
[country_code] => US
)
)
[transactions] => Array (
[0] => Array (
[amount] => Array (
[total] => 1500.00
[currency] => EUR
[details] => Array (
[subtotal] => 1500.00
[shipping] => 0.00
[insurance] => 0.00
[handling_fee] => 0.00
[shipping_discount] => 0.00
)
)
[payee] => Array (
[merchant_id] => PCQDHVBJUD4WN
[email] => accounting-facilitator#mobipium.com
)
[description] => 5e2837933fdc3
[invoice_number] => 5e2837933fdc3
[item_list] => Array (
[shipping_address] => Array (
[recipient_name] => test buyer
[line1] => 1 Main St
[city] => San Jose
[state] => CA
[postal_code] => 95131
[country_code] => US
)
)
[related_resources] => Array (
[0] => Array (
[sale] => Array (
[id] => 9XL29023PP3022045
[state] => pending
[amount] => Array (
[total] => 1500.00
[currency] => EUR
[details] => Array (
[subtotal] => 1500.00
[shipping] => 0.00
[insurance] => 0.00
[handling_fee] => 0.00
[shipping_discount] => 0.00
)
)
[payment_mode] => INSTANT_TRANSFER
[reason_code] => RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION
[protection_eligibility] => ELIGIBLE
[protection_eligibility_type] => ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE
[receivable_amount] => Array (
[value] => 1500.00
[currency] => EUR
)
[exchange_rate] => 0.8627555079
[parent_payment] => PAYID-LYUDPFA8E292123AP955374L
[create_time] => 2020-01-22T11:53:12Z
[update_time] => 2020-01-22T11:53:12Z
[links] => Array (
[0] => Array (
[href] => https://api.sandbox.paypal.com/v1/payments/sale/9XL29023PP3022045
[rel] => self
[method] => GET
)
[1] => Array (
[href] => https://api.sandbox.paypal.com/v1/payments/sale/9XL29023PP3022045/refund
[rel] => refund
[method] => POST
)
[2] => Array (
[href] => https://api.sandbox.paypal.com/v1/payments/payment/PAYID-LYUDPFA8E292123AP955374L
[rel] => parent_payment
[method] => GET
)
)
)
)
)
)
)
[create_time] => 2020-01-22T11:52:52Z
[update_time] => 2020-01-22T11:53:12Z
[links] => Array (
[0] => Array (
[href] => https://api.sandbox.paypal.com/v1/payments/payment/PAYID-LYUDPFA8E292123AP955374L
[rel] => self
[method] => GET
)
)
)
I only can see the handling_fee field but when i access my facilitator account
https://gyazo.com/fc55e97066ee755efee7867a3c42e913
I can see the estimated field, how can i get this field?
I already do a integration with paypal and I can get that field from
$response['data']['transactions'][0]['related_resources'][0]['sale']['transaction_fee']['value'];
But this field sale doesn't have the transaction_fee field.
Payments in state=>approved must be executed in order to be in state=> completed.
Once a payment is completed or at least pending, its sale object , available at https://api.sandbox.paypal.com/v1/payments/sale/9XL29023PP3022045 in your example , should have details on financials. This is the identifier that has actual accounting value, and which will be persisted for years in the paypal.com account.
The payment object, id PAYID-LYUDPFA8E292123AP955374L in your example, is only used during the payment approval and execution process. It only needs to be kept around ~1 month for debug purposes, as it has no accounting value and will not be referenceable in paypal.com

Send CUSTOM variable to CreateRecurringPaymentsProfile

I am implementing Recurring Express checkout. The code for creating a profile is working. What I want to do now is pass it a custom value.
We can pass
DoExpressCheckout
and
SetExpressCheckout
using the the following name
PAYMENTREQUEST_n_CUSTOM
I want to do the same for CreateRecurringPaymentsProfile so that I can access it in IPN.
CRPP does not include the custom parameter like other API requests do, however, it does include the PROFILEREFERENCE parameter, which is meant to be treated like an invoice ID. Whatever value you pass here would come back in IPN as rp_invoice_id.
So what you can do is save a local invoice record in your DB that includes any related data you need, and then pass that ID in the profilereference parameter of your CRPP request. Then within your IPN script you pull this value from rp_invoice_id, and then pull any extra details you need about that invoice from your database using that ID value.
Here's a sample of an IPN that includes the rp_invoice_id.
Array
(
[mc_gross] => 6.45
[period_type] => Regular
[outstanding_balance] => 0.00
[next_payment_date] => 02:00:00 Feb 12, 2015 PST
[protection_eligibility] => Eligible
[payment_cycle] => Monthly
[address_status] => confirmed
[tax] => 0.00
[payer_id] => Q33PGJHM6K38Q
[address_street] => 375 HWY 21 n
[payment_date] => 02:12:06 Jan 12, 2015 PST
[payment_status] => Completed
[product_name] => USBSwiper Monthly Subscription
[charset] => windows-1252
[rp_invoice_id] => 1935
[recurring_payment_id] => I-FWEAAAAXPVJ
[address_zip] => 72616
[first_name] => Tester
[mc_fee] => 0.44
[address_country_code] => US
[address_name] => KARShop
[notify_version] => 3.8
[amount_per_cycle] => 6.45
[payer_status] => verified
[currency_code] => USD
[business] => payments#domain.com
[address_country] => United States
[address_city] => Berryville
[verify_sign] => AtjWedapewmudDbf6C3S0..Z.7glAyXhJISOoiYcafN1Zb.VrOX7O8VH
[payer_email] => tester#gmail.com
[initial_payment_amount] => 0.00
[profile_status] => Active
[amount] => 6.45
[txn_id] => 5G2211475Y5810638
[payment_type] => instant
[payer_business_name] => Testers, LLC
[last_name] => Testerson
[address_state] => AR
[receiver_email] => payments#domain.com
[payment_fee] => 0.44
[receiver_id] => M5VRAQYEFCSK6
[txn_type] => recurring_payment
[mc_currency] => USD
[residence_country] => US
[transaction_subject] => USBSwiper Monthly Subscription
[payment_gross] => 6.45
[shipping] => 0.00
[product_type] => 1
[time_created] => 14:56:25 Apr 12, 2011 PDT
[ipn_track_id] => 9318cc3589f1b
)

Magento sending blank token in paypal express checkout

I am using magento 1.7.2. I tried to use the paypal express checkout , every time I try to place order for first time, It is showing the error, "PayPal gateway has rejected request. Invalid token (#10410: Invalid token). ", when I logged the data to see the parameter it is sending blank token and blank payerID
2012-12-19T10:06:27+00:00 DEBUG (7): Array
(
[url] => https://api-3t.sandbox.paypal.com/nvp
[DoExpressCheckoutPayment] => Array
(
[TOKEN] =>
[PAYERID] =>
[PAYMENTACTION] => Authorization
[AMT] => 7.14
[CURRENCYCODE] => USD
[BUTTONSOURCE] => Varien_Cart_EC_US
[NOTIFYURL] => http://www.samit.com/hungermunch/chinagardenstore/paypal/ipn/
[RETURNFMFDETAILS] => 1
[ITEMAMT] => 6.84
[TAXAMT] => 0.30
[SHIPPINGAMT] => 0.00
[L_NUMBER0] => Fullmenu-001
[L_NAME0] => Chicken Salad (For 2 Persons)
[L_QTY0] => 1
[L_AMT0] => 5.95
[L_NUMBER1] => tips/gratiuty
[L_NAME1] => Tips/Gratuity
[L_QTY1] => 1
[L_AMT1] => 0.89
[BUSINESS] =>
[EMAIL] => rimalsamit#yahoo.com
[FIRSTNAME] => Samit
[LASTNAME] => Rimal
[MIDDLENAME] =>
[SALUTATION] =>
[SUFFIX] =>
[COUNTRYCODE] => US
[STATE] => CA
[CITY] => San Jose
[STREET] => 1 Main St
[ZIP] => 95131
[PHONENUM] => 9841669912
[SHIPTOCOUNTRYCODE] => US
[SHIPTOSTATE] => CA
[SHIPTOCITY] => San Jose
[SHIPTOSTREET] => 1 Main St
[SHIPTOZIP] => 95131
[SHIPTOPHONENUM] => 9841669912
[SHIPTOSTREET2] =>
[STREET2] =>
[SHIPTONAME] => Samit Rimal
[ADDROVERRIDE] => 1
[METHOD] => DoExpressCheckoutPayment
[VERSION] => 72.0
[USER] => ****
[PWD] => ****
[SIGNATURE] => ****
)
[response] => Array
(
[TIMESTAMP] => 2012-12-19T10:06:26Z
[CORRELATIONID] => 949b5ccdc7293
[ACK] => Failure
[VERSION] => 72.0
[BUILD] => 4181146
[L_ERRORCODE0] => 10410
[L_SHORTMESSAGE0] => Invalid token
[L_LONGMESSAGE0] => Invalid token.
[L_SEVERITYCODE0] => Error
)
[__pid] => 3828
)
When I tried to place order for second time, I found that there was a token in request,So is it possible to to set token manually in the start of the express checkout ? Or any solution for it?
Any help will be greatly appreciated.

PayPal Express Checkout Integration Response

I'm currently having a hard time trying to understand the response of my PayPal EC Integration.
GetExpressCheckoutDetails response is
[CHECKOUTSTATUS] => PaymentActionNotInitiated
but in DoExpressCheckout response, the
[PAYMENTINFO_0_PAYMENTSTATUS] => Completed
I'm confused, does this mean the buyer has been charged and the payment was successful or not? I cannot find answers in PayPal forum and portals either... weeeew
Below is the complete response details:
GetExpressCheckout response:
[TOKEN] => EC-76768931K5394210Y
[CHECKOUTSTATUS] => PaymentActionNotInitiated
[TIMESTAMP] => 2012-10-20T07:15:22Z
[CORRELATIONID] => 2b85ff556730a
[ACK] => Success
[VERSION] => 94.0
[BUILD] => 3926908
[EMAIL] => testpp_per_1348562981_per#gmail.com
[PAYERID] => 3PCFRVX65A7Y8
[PAYERSTATUS] => verified
[FIRSTNAME] => Test
[LASTNAME] => Peepee
[COUNTRYCODE] => US
[CURRENCYCODE] => PHP
[AMT] => 895.00
[ITEMAMT] => 895.00
[SHIPPINGAMT] => 0.00
[HANDLINGAMT] => 0.00
[TAXAMT] => 0.00
[INVNUM] => 1231313213213
[INSURANCEAMT] => 0.00
[SHIPDISCAMT] => 0.00
[L_NAME0] => Test Item
[L_QTY0] => 1
[L_TAXAMT0] => 0.00
[L_AMT0] => 895.00
[L_ITEMWEIGHTVALUE0] => 0.00000
[L_ITEMLENGTHVALUE0] => 0.00000
[L_ITEMWIDTHVALUE0] => 0.00000
[L_ITEMHEIGHTVALUE0] => 0.00000
[PAYMENTREQUEST_0_CURRENCYCODE] => PHP
[PAYMENTREQUEST_0_AMT] => 895.00
[PAYMENTREQUEST_0_ITEMAMT] => 895.00
[PAYMENTREQUEST_0_SHIPPINGAMT] => 0.00
[PAYMENTREQUEST_0_HANDLINGAMT] => 0.00
[PAYMENTREQUEST_0_TAXAMT] => 0.00
[PAYMENTREQUEST_0_INVNUM] => 1231313213213
[PAYMENTREQUEST_0_INSURANCEAMT] => 0.00
[PAYMENTREQUEST_0_SHIPDISCAMT] => 0.00
[PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED] => false
[L_PAYMENTREQUEST_0_NAME0] => Test Item
[L_PAYMENTREQUEST_0_QTY0] => 1
[L_PAYMENTREQUEST_0_TAXAMT0] => 0.00
[L_PAYMENTREQUEST_0_AMT0] => 895.00
[L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE0] => 0.00000
[L_PAYMENTREQUEST_0_ITEMLENGTHVALUE0] => 0.00000
[L_PAYMENTREQUEST_0_ITEMWIDTHVALUE0] => 0.00000
[L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE0] => 0.00000
[PAYMENTREQUESTINFO_0_ERRORCODE] => 0
DoExpressCheckout response:
[TOKEN] => EC-76768931K5394210Y
[SUCCESSPAGEREDIRECTREQUESTED] => false
[TIMESTAMP] => 2012-10-20T07:15:27Z
[CORRELATIONID] => ec7af38c18968
[ACK] => Success
[VERSION] => 94.0
[BUILD] => 3926908
[INSURANCEOPTIONSELECTED] => false
[SHIPPINGOPTIONISDEFAULT] => false
[PAYMENTINFO_0_TRANSACTIONID] => 02800680NT5556907
[PAYMENTINFO_0_TRANSACTIONTYPE] => expresscheckout
[PAYMENTINFO_0_PAYMENTTYPE] => instant
[PAYMENTINFO_0_ORDERTIME] => 2012-10-20T07:15:26Z
[PAYMENTINFO_0_AMT] => 895.00
[PAYMENTINFO_0_FEEAMT] => 49.91
[PAYMENTINFO_0_TAXAMT] => 0.00
[PAYMENTINFO_0_CURRENCYCODE] => PHP
[PAYMENTINFO_0_PAYMENTSTATUS] => Completed
[PAYMENTINFO_0_PENDINGREASON] => None
[PAYMENTINFO_0_REASONCODE] => None
[PAYMENTINFO_0_PROTECTIONELIGIBILITY] => Ineligible
[PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE] => None
[PAYMENTINFO_0_SECUREMERCHANTACCOUNTID] => K3TTNE7MKRJUN
[PAYMENTINFO_0_ERRORCODE] => 0
[PAYMENTINFO_0_ACK] => Success
Thanks a lot! :)
The payment does not take place until YOU call DoExpressCheckout.
In the first step (SetExpressCheckout + redirection to PayPal) the buyer is giving you authorization to charge him. It's now up to you to actually get his money by calling DoExpressCheckout.
If you call GetExpressCheckoutDetails after DoExpressCheckout, you should get a payment completed response.
Edit:
One reason you may want to call GetExpressCheckoutDetails before DoExpresCheckout, is to get the address that the buyer selected, in case it may change the totals, so it's still a valid use case.

Paypal internal service error on 81251 on SetMobileCheckout call

I have SetExpressCheckout calling fine fine however when I attempt to call SetMobileCheckout I keep getting an error.
Any ideas on why I am getting this internal service error?
Array
(
[SMCFields] => Array
(
[phonecountrycode] =>
[phonenum] =>
[amt] => 20.00
[currencycode] => USD
[taxamt] =>
[shippingamt] =>
[desc] => $40.00 value at Il Bastardo
[number] =>
[custom] =>
[invnum] =>
[returnurl] => http://mydomain.com/checkout/review
[cancelurl] => http://mydomain.com/checkout/cancel
[addressdisplay] =>
[sharephonenum] =>
[email] =>
)
Here is the response I receive on the call
Array
(
[ACK] => Failure
[L_ERRORCODE0] => 81251
[L_SHORTMESSAGE0] => Internal Error
[L_LONGMESSAGE0] => Internal Service Error
[L_SEVERITYCODE0] => Error
[ERRORS] => Array
(
[0] => Array
(
[L_ERRORCODE] => 81251
[L_SHORTMESSAGE] => Internal Error
[L_LONGMESSAGE] => Internal Service Error
[L_SEVERITYCODE] => Error
)
)
[REQUESTDATA] => Array
(
[USER] => sdk-three_api1.sdk.com
[PWD] => QFZCWN5HZM8VBG7Q
[VERSION] => 93.0
[BUTTONSOURCE] => AngellEYE_PHPClass
[SIGNATURE] => A-IzJhZZjhg29XQ2qnhapuwxIDzyAZQ92FRP5dqBzVesOkzbdUONzmOU
[METHOD] => SetMobileCheckout
[AMT] => 20.00
[CURRENCYCODE] => USD
[DESC] => $40.00 value at Il Bastardo
[RETURNURL] => http://mydomain.com/checkout/review
[CANCELURL] => http://mydomain.noo.com/checkout/cancel
)
Why are you using SetMobileCheckout? That API call is beyond deprecated. Mobile Express Checkout has long since replaced it.