简体   繁体   中英

Error in Paypal Do Direct Payment

I have integrated paypal direct payment code from here . It is working fine for me. when i change the credential. It is not working. I am using only sandbox credential and in code also i set environment into sandbox still it gives me fail message like this

    DoDirectPayment failed: Array
    (
    [TIMESTAMP] => 2015%2d04%2d15T07%3a07%3a57Z
    [CORRELATIONID] => 33533f9e698e3
    [ACK] => Failure
    [VERSION] => 51%2e0
    [BUILD] => 16204765
    [L_ERRORCODE0] => 10501
    [L_SHORTMESSAGE0] => Invalid%20Configuration
    [L_LONGMESSAGE0] => This%20transaction%20cannot%20be%20processed%20due%20to%20an%20invalid%20merchant%20configuration%2e
    [L_SEVERITYCODE0] => Error
    [AMT] => 1%2e00
    [CURRENCYCODE] => CAD
)

When I use default api credential It is working like a charm

Direct Payment Completed Successfully: Array
(
[TIMESTAMP] => 2015%2d04%2d15T07%3a30%3a11Z
[CORRELATIONID] => 92a0a29a332cc
[ACK] => Success
[VERSION] => 51%2e0
[BUILD] => 16204765
[AMT] => 1%2e00
[CURRENCYCODE] => CAD
[AVSCODE] => X
[CVV2MATCH] => M
[TRANSACTIONID] => 2BG0687660710122T
)

That means that DoDirectPayment is not enabled on your live account. This could be because you've never applied for Payments Pro (which needs to be approved) or you have been approved but you haven't agreed to the $30/mo they charge for it, which you would do from the overview page in your PayPal account when you login (if it hasn't been done already.)

Once Pro is approved and enabled on your account the DoDirectPayment API would be available to you, and then this error would go away.

Another possibility, though not as likely, is that you have been approved and even completed the agreement for Pro, but you were setup with PayFlow instead of the PayPal API. In this case you would have to contact PayPal and request that they enable "Website Payments Pro 3.0" for you. If they say they can't, you would have to redevelop your stuff to work with the PayFlow API instead of DoDirectPayment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM