making Order in Paypal Parallel Express Checkout - paypal

I am trying to place Order with Parallel Paypal Express Checkout. Here is the API implementation.
I am using PAYMENTREQUEST_0_PAYMENTACTION => Order in SetExpressCheckout and in DoExpressChecoutPayment and it gives error (this is required).
When I use PAYMENTREQUEST_0_PAYMENTACTION => Order in SetExpressCheckout and PAYMENTREQUEST_0_PAYMENTACTION => Sale in DoExpressChecoutPayment it works.
All goes well until DoExpressChecoutPayment. Please check this
DoExpressCheckoutPayment Request
(
[TOKEN] => EC-4U931568VK402050F
[PAYERID] => BFSU67Z2LX5FJ
[VERSION] => 97.0
[METHOD] => DoExpressCheckoutPayment
[USER] => 'user'
[PWD] => 'pwd'
[SIGNATURE] => 'sig'
[PAYMENTREQUEST_0_PAYMENTACTION] => ORDER
[PAYMENTREQUEST_0_AMT] => 200.00
[PAYMENTREQUEST_0_CURRENCYCODE] => EUR
[PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID] => vendortwo2#yhaoo.com
[PAYMENTREQUEST_0_PAYMENTREQUESTID] => 25935
[PAYMENTREQUEST_1_PAYMENTACTION] => ORDER
[PAYMENTREQUEST_1_AMT] => 22.00
[PAYMENTREQUEST_1_CURRENCYCODE] => EUR
[PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID] => vendorone#yahoo.com
[PAYMENTREQUEST_1_PAYMENTREQUESTID] => 25934
)
and response from this is:
(
[TOKEN] => EC-4U931568VK402050F
[SUCCESSPAGEREDIRECTREQUESTED] => false
[TIMESTAMP] => 2013-09-26T10:08:27Z
[CORRELATIONID] => 2381c85a926e3
[ACK] => Failure
[VERSION] => 97.0
[BUILD] => 7882219
[INSURANCEOPTIONSELECTED] => false
[SHIPPINGOPTIONISDEFAULT] => false
[PAYMENTINFO_0_PAYMENTSTATUS] => Failed
[PAYMENTINFO_0_SELLERPAYPALACCOUNTID] => vendortwo2#yhaoo.com
[PAYMENTINFO_0_SECUREMERCHANTACCOUNTID] => DRM9QQUAG9UNC
[PAYMENTINFO_0_PAYMENTREQUESTID] => 25935
[PAYMENTINFO_0_ERRORCODE] => 10001
[PAYMENTINFO_0_SHORTMESSAGE] => Internal Error
[PAYMENTINFO_0_LONGMESSAGE] => Internal Error
[PAYMENTINFO_0_SEVERITYCODE] => Error
[PAYMENTINFO_0_ACK] => Failure
[PAYMENTINFO_1_PAYMENTSTATUS] => Failed
[PAYMENTINFO_1_SELLERPAYPALACCOUNTID] => vendorone#yahoo.com
[PAYMENTINFO_1_SECUREMERCHANTACCOUNTID] => M7HT95CA3PUCE
[PAYMENTINFO_1_PAYMENTREQUESTID] => 25934
[PAYMENTINFO_1_ERRORCODE] => 10001
[PAYMENTINFO_1_SHORTMESSAGE] => Internal Error
[PAYMENTINFO_1_LONGMESSAGE] => Internal Error
[PAYMENTINFO_1_SEVERITYCODE] => Error
[PAYMENTINFO_1_ACK] => Failure
)
I have asked same question here.

Internal error came because wrong type of account ids are assigned to PAYMENTINFO_0_SELLERPAYPALACCOUNTID and PAYMENTINFO_1_SELLERPAYPALACCOUNTID in DoExpressCheckoutPayment request. Accounts assigned are personal, they should be paypal Business Accounts instead. that was the reason of "Internal Error". Thanks

Related

PayPal DoReferenceTransaction bug when charging specific amount of 100.10

Unfortunately I can't get a response from PayPal tech support via their ticket system so maybe someone else has seen this. I'm certain it's a bug. Here are two API calls:
This one worked successfully:
[USER] => ***
[PWD] => ***
[SIGNATURE] => ***
[VERSION] => 86
[METHOD] => DoReferenceTransaction
[AMT] => 101.10
[TAXAMT] => 0.00
[ITEMAMT] => 101.10
[CURRENCYCODE] => USD
[PAYMENTACTION] => SALE
[REFERENCEID] => ***
[DESC] => ***
And this one didn't (only difference is the amount):
[USER] => ***
[PWD] => ***
[SIGNATURE] => ***
[VERSION] => 86
[METHOD] => DoReferenceTransaction
[AMT] => 100.10
[TAXAMT] => 0.00
[ITEMAMT] => 100.10
[CURRENCYCODE] => USD
[PAYMENTACTION] => SALE
[REFERENCEID] => ***
[DESC] => ***
The error returned for the second one is this:
[TIMESTAMP] => 2017-06-20T19:10:03Z
[CORRELATIONID] => ff77dc0fdff4e
[ACK] => Failure
[VERSION] => 86
[BUILD] => 29297572
[L_ERRORCODE0] => 10010
[L_SHORTMESSAGE0] => Invalid Invoice
[L_LONGMESSAGE0] => Non-ASCII invoice id is not supported
[L_SEVERITYCODE0] => Error
Clearly the error is also nothing to do with the problem as I'm even submitting an invoice id. Basically any amount other than 100.10 seems to work.
What's even more strange is that amount matches the PayPal error code that gets returned!
This is all in using the Sandbox.
Many thanks!
It sounds like you have negative testing enabled in the sandbox account, which allows you to force errors so that you test them by passing in an AMT that matches the error code you want to trigger. See the link for more details on this including how to enable/disable it.

Adaptive Payment Partial Refund Functionality

I am sending the request like below and getting error in response. Please help me what I did wrong. Thanks .
My Request :-
requestEnvelope.errorLanguage=en_US&requestEnvelope.detailLevel=ReturnAll
&payKey=AP-0VR709562K128704J&receiverList.receiver(0).email=buyer#abc.com&receiverList.receiver(0).amount=14.00¤cyCode=GBP
My Response :-
Array
(
[responseEnvelope.timestamp] => 2017-02-24T05:50:55.589-08:00
[responseEnvelope.ack] => Failure
[responseEnvelope.correlationId] => 66bf1bad1aa91
[responseEnvelope.build] => 30051544
[error(0).errorId] => 589037
[error(0).domain] => PLATFORM
[error(0).subdomain] => Application
[error(0).severity] => Error
[error(0).category] => Application
[error(0).message] => The refund's receiver buyer#abc.com wasn't part of the payment request
[error(0).parameter(0)] => buyer#abc.com
)
I got a solution for this. In request We need to send receiver (seller) email not buyer email and it will automatically send refund to the appropriate receiver.
So the answer will be
requestEnvelope.errorLanguage=en_US
&requestEnvelope.detailLevel=ReturnAll
&payKey=AP-0VR709562K128704J
&receiverList.receiver(0).email=api_email#apiemail.com
&receiverList.receiver(0).amount=14.00
¤cyCode=GBP
and we will get the responce like
Array
(
[responseEnvelope.timestamp] => 2017-04-05T07:34:25.622-07:00
[responseEnvelope.ack] => Success
[responseEnvelope.correlationId] => 3a31df57541f3
[responseEnvelope.build] => 31096492
[currencyCode] => GBP
[refundInfoList.refundInfo(0).receiver.amount] => 19.02
[refundInfoList.refundInfo(0).receiver.email] => api_email#apiemail.com
[refundInfoList.refundInfo(0).refundStatus] => REFUNDED
[refundInfoList.refundInfo(0).refundNetAmount] => 18.37
[refundInfoList.refundInfo(0).refundFeeAmount] => 0.65
[refundInfoList.refundInfo(0).refundGrossAmount] => 19.02
[refundInfoList.refundInfo(0).totalOfAllRefunds] => 39.04
[refundInfoList.refundInfo(0).refundHasBecomeFull] => false
[refundInfoList.refundInfo(0).encryptedRefundTransactionId] => 00487139PD976194Y
[refundInfoList.refundInfo(0).refundTransactionStatus] => COMPLETED
)

PayPal DoCapture in Sandbox fails with 10609 error - Invalid TransactionID

Paypal's Sandbox API responds to a DoCapture with "Invalid TransactionID" error code 10609. The same operation works correctly in the PayPal live site. I think there might be some deprecated params that are rejected in the Sandbox, but accepted in the PayPal live site.
The ff. is POST data from IPN:
[mc_gross] => 1.05
[auth_exp] => 05:28:33 May 26, 2016 PDT
[protection_eligibility] => Ineligible
[payer_id] => SCBNBBCFDWQ54
[tax] => 0.00
[payment_date] => 05:28:33 Apr 26, 2016 PDT
[payment_status] => Pending
[charset] => windows-1252
[first_name] => SandboxStephen
[option_selection1] => Lc1tCoAwCAbgu3iCxtYHdpghtEKoUc2IEd09G_ulPq8oYYtPwh7hSuH0PMGYlMCYbrB_r8kUaK2JRXCuqc7JLzzLPxmEogPCcVEUllzZlKq-U95CFL-QhJtyPagb-ub9AA,,~7634f
[transaction_entity] => auth
[option_selection2] => VU7LDgIhEPuX-QACw_CavfoHxjPZAAdNBLO4h43x3wXjxfYybZNOVyZ-dUaG6wOWzooYnBZIQSiDQqH8upphvbe9PmMtJZcMS2YlpJF_ICLpA8rgR2DRqsFABq11qK1Gr9D82tK-baWmI6aWy3wxvMv5NC83tvR4661OJRlgeX8A~97b17
[option_selection3] => S7QytKoutjK3UspNLS5OTE9Vsi62MrBSUrKuBQA,~2c5b4
[option_selection4] => S7QytqoutjK3UkrPTCuJL8lXsi62MrBSAlGWUMG0ovxcJGFDA6h4am5iZg5cohYA~2aa63
[notify_version] => 3.8
[custom] =>
[payer_status] => verified
[business] => xxxxxxx#xxxxx
[quantity] => 1
[verify_sign] => AvzodxdQ1l47jbnC5iCE7iEjAVYEAnMT6fQE9TdHnShf4zX8V6L99Kpe
[payer_email] => xxxxxx#xxxx
[option_name1] => Transkey
[parent_txn_id] =>
[option_name2] => Syskey
[option_name3] => Message
[option_name4] => Gift
[txn_id] => 4R146799GX924083N
[payment_type] => instant
[remaining_settle] => 10
[auth_id] => 4R146799GX924083N
[last_name] => xxxxx
[receiver_email] => xxxxxxx#xxxxx
[auth_amount] => 1.05
[shipping_discount] => 0.00
[insurance_amount] => 0.00
[receiver_id] => F3XAHZBJYATHU
[pending_reason] => authorization
[txn_type] => web_accept
[item_name] => Test New Deal 2 (Topic)
[discount] => 0.00
[mc_currency] => USD
[item_number] =>
[residence_country] => US
[test_ipn] => 1
[shipping_method] => Default
[handling_amount] => 0.00
[transaction_subject] =>
[payment_gross] => 1.05
[auth_status] => Pending
[shipping] => 0.00
[ipn_track_id] => ff07a74b6ad10
The ff. are parameters for DoCapture:
[authorization_id] => 4R146799GX924083N
[amount] => 1.05
[invoice_id] => 9569
[currency] => USD
[CompleteCodeType] => Complete
[note] => Acuerdo de pago
The ff. is PayPal's response to DoCapture:
[AUTHORIZATIONID] => 4R146799GX924083N
[TIMESTAMP] => 2016-04-26T12:28:57Z
[CORRELATIONID] => 82d81683c3cc8
[ACK] => Failure
[VERSION] => 62
[BUILD] => 21669447
[L_ERRORCODE0] => 10609
[L_SHORTMESSAGE0] => Invalid transactionID.
[L_LONGMESSAGE0] => Transaction id is invalid.
[L_SEVERITYCODE0] => Error
I have tested the new PayPal security upgrades on the site and they work correctly. I specify a very old version (62) of the API, so that might be the problem, but I don't see what I need to change to get the Sandbox to work correctly.
Thanks.
It looks like you mix up the sandbox environment and live environment. You call DoCapture in the live environment, but the 4R146799GX924083N transaction is generated in sandbox environment.
When you call Docapture API, please make sure the API endpoint is https://api-3t.sandbox.paypal.com/nvp , the endpoint change to sandbox , not live.

Paypal : invalid token only in DoExpressCheckoutPayment method

I'm starting to work with PayPal and my first work is to debug it on our website.
Actually when we go to the end of an order, it works fine but we get a stack in the logs : "Invalid token (#10410: Invalid Token)".
This happens when the doExpressCheckoutPayment is called and it seems like there's no token and no payerid so an error is thrown. All other information seem to be correctly filled.
Here's the debug result calling doExpressCheckoutPayment :
[DoExpressCheckoutPayment] => Array
(
[TOKEN] =>
[PAYERID] =>
[PAYMENTACTION] => Sale
[AMT] => 4.16
[CURRENCYCODE] => EUR
[BUTTONSOURCE] => Varien_Cart_EC_FR
[NOTIFYURL] => *
[RETURNFMFDETAILS] => 1
[ITEMAMT] => 3.36
[TAXAMT] => 0.80
[SHIPPINGAMT] => 0.00
[L_NUMBER0] => *
[L_NAME0] => *
[L_QTY0] => 1
[L_AMT0] => 4.10
[L_NUMBER1] =>
[L_NAME1] => Discount
[L_QTY1] => 1
[L_AMT1] => -0.74
[BUSINESS] =>
[EMAIL] => *
[FIRSTNAME] => *
[LASTNAME] => *
[MIDDLENAME] =>
[SALUTATION] =>
[SUFFIX] =>
[COUNTRYCODE] => *
[STATE] => *
[CITY] => *
[STREET] => *
[ZIP] => *
[PHONENUM] => *
[SHIPTOCOUNTRYCODE] => *
[SHIPTOSTATE] => *
[SHIPTOCITY] => *
[SHIPTOSTREET] => *
[SHIPTOZIP] => *
[SHIPTOPHONENUM] => *
[SHIPTOSTREET2] =>
[STREET2] =>
[SHIPTONAME] => *
[ADDROVERRIDE] => 1
[METHOD] => DoExpressCheckoutPayment
[VERSION] => 72.0
[USER] => ****
[PWD] => ****
[SIGNATURE] => ****
)
[response] => Array
(
[TIMESTAMP] => 2013-03-07T15:01:45Z
[CORRELATIONID] => 64adbc2375f59
[ACK] => Failure
[VERSION] => 72.0
[BUILD] => 5331358
[L_ERRORCODE0] => 10410
[L_SHORTMESSAGE0] => Invalid token
[L_LONGMESSAGE0] => Invalid token.
[L_SEVERITYCODE0] => Error
)
Problem is that just after this method is called, setExpressCheckout is called and it's a success so the order is correctly placed.
Here's the success response when calling setExpressCheckout :
[response] => Array
(
[TOKEN] => EC-5UG654898R029060W
[TIMESTAMP] => 2013-03-07T15:01:48Z
[CORRELATIONID] => 348b58c6200c1
[ACK] => Success
[VERSION] => 72.0
[BUILD] => 5331358
)
I don't understand why when doing a doExpressCheckoutPayment, a failure is thrown and when doing setExpressCheckout, no error is detected and the sale is accepted anyway....
Is there a problem in the order of the method call ? I mean, should setExpressCheckout not be called before doExpressCheckoutPayment ?
We're facing an other problem with PayPal and I hope that solving this problem will solve the other one....
Thanks you very much for your help guys !
Seb
The SetExpressCheckout should happen first -- the token you get back is what you redirect the customer's browser with, and when they return they'll have the token in the URL and that is when you can getExpressCheckoutDetails if you need to see their shipping address and associated info, and finally you run doExpressCheckoutPayment to commit the transactions.
To reiterate: You get a valid token from the setEC, you use this token in the redirect, you get this token back appended to the RETURNURL the customer returns to, and you reference this token in any subsequent getEC and doEC calls.

Paypal Adaptive payment implementation on live environment

We have implemented Adaptive payment method. This implementation is working fine on sandbox environment. But its showing the following response in Live environment. We are not clear with the response. Can please provide the details about this response.
Response:
{
Array
(["en" class
[send_method] => domestic;icon-uri
[content_ID] => marketing_us/request_money;icon-uri
[amp;from] => PayPal">Sign Up
2" width [label] => xuVFCJezswQQmbe91QM [guid] => ON [script] => 0"/>
escalateTab">Contact
[ ($("#mobile_number").val() !] => ''))
{
validPhoneNumber
[page] => main%3Amktg%3Apersonal%3A%3Ahome%3A%3A%3A
[tmpl] => core2HomeCExp.jsp
[pgst] => Unknown
[lgin] => out
[calc] => f91c2b0c39598
[rsta] => en_US
[md5h] => 7fbf0dfca87f30b51dc1d9cb8dae4318
[shfp] => %7C%7C
[usce] => + [pgtf] => Sparta [s] => ci [aver] => unverified [rstr] => unrestricted [pfid] => f91c2b0c39598
[bzsr] => main [bchn] => mktg [pgsf] => personal [ccpg] => usa [pgld] => Unknown [shir] => main_mktg_personal_" alt [pgrp] => main%3Amktg%3Apersonal%3A%3Ahome )
}