error 550001 in paypal adaptive chained payment api - paypal

I am getting below response in PayPal Adaptive Payments API. I am not sure what does it means? Please help me with it.
Array
(
[responseEnvelope.timestamp] => 2014-01-27T01:07:55.101-08:00
[responseEnvelope.ack] => Failure
[responseEnvelope.correlationId] => 34213dd3fb305
[responseEnvelope.build] => 7935900
[error(0).errorId] => 550001
[error(0).domain] => PLATFORM
[error(0).subdomain] => Application
[error(0).severity] => Error
[error(0).category] => Application
[error(0).message] => User is not allowed to perform this action
[error(0).parameter(0)] => Fees Payer
)
Thanks

Well, it means exactly what it says. You don't have permissions to make the call based on certain criteria.
Do you have a valid, live App ID? If so, has it been fully approved to do everything you're trying to do? Are you making implicit or explicit authenticated payments? You may need to have your end users go through Permissions or setup a Preapproval profile in order to make payments on their behalf.

Related

PayFlow Recurring Payment

We use on the site delayed payment transaction, like this:
Authorization transaction using credit card details including CVV2 code.
Get PNREF.
Use PNREF as ORIGID in delayed transaction.
Success
But now we got a trouble with recurring payments because we didn't store CVV2 value.
As I understood I can use "Authorization transaction PNREF" just for one delayed transaction as ORIGID. So I trying to get new one, but using ORIGID of previous transaction instead of credit card credentials:
TENDER=C&TRXTYPE=>A&AMT=29&ORIGID=xxxxxxxx7278&USER=user&PWD=pass&VENDOR=vendor&PARTNER&PayPal&VERBOSITY=HIGH
And always get an error:
'RESULT' => '117',
'PNREF' => 'xxxxxxxx20F8',
'RESPMSG' => 'Failed merchant rule check',
'TRANSTIME' => '2015-11-22 21:51:53',
'AMT' => '19.00', 'CARDTYPE' => '0'
The way you are trying to use the old PNREF to charge the customer is known as reference transaction and needs to be turn on in the manager account .
In your manager account go to "Account Administration -->Transaction Settings" . Here just select "yes" for "Allow reference transactions" and wait for an hour to get the settings updated.
It should be fine afterwards .

DPRP is disabled for this merchant sandbox account

I created new sandbox account for buyer and tried CreateRecurringPaymentsProfile as Method.
it worked fine and created new recurring profile first time.
but now suddenly I am getting below Error:
Array
(
[TIMESTAMP] => 2015-05-18T21:11:41Z
[CORRELATIONID] => 1a8fea918c26d
[ACK] => Failure
[VERSION] => 98.0
[BUILD] => 16660223
[L_ERRORCODE0] => 11586
[L_SHORTMESSAGE0] => DPRP is disabled.
[L_LONGMESSAGE0] => DPRP is disabled for this merchant.
[L_SEVERITYCODE0] => Error
)
it is currently sandbox.
please let me know how can I resolve this issue?
DPRP = Direct Payment Recurring Payments
The DoDirectPayment API is enabled with Website Payments Pro 3.0, and that's what is used when creating recurring profiles with credit cards directly.
You need to get Website Payments Pro 3.0 activated on the sandbox account in order to run these transactions.
Did you create a new business sandbox account recently? New ones should have this enabled by default. If not, you can send a message to PayPal MTS and they can enable it for you.
You need to enable Website Payments Pro for the sandbox business account. In the current interface (2018) view this page:
https://developer.paypal.com/developer/accounts/
Find your Business account, expand it and click Profile. Under 'Account Type' there should be a link to 'Upgrade to Pro'.

PayPal REST API not returning payment_info

I am using the REST API to authorize a PayPal transaction, and when it returns to confirm & execute the payment, I'd like to retrieve & display payer information such as name, address, phone, etc from their PayPal account for a checkout order confirmation page. (To avoid them having to type in all their billing/shipping address info, since this should be available from PayPal.)
Currently the return is only showing this for payer:
PayPal\Api\Payment Object
(
[_propMap:PayPal\Common\PPModel:private] => Array
(
[id] => PAY-2EC51985XH550123JKHG3C4Y
[create_time] => 2013-06-28T15:53:23Z
[update_time] => 2013-06-28T15:53:23Z
[state] => created
[intent] => sale
[payer] => PayPal\Api\Payer Object
(
[_propMap:PayPal\Common\PPModel:private] => Array
(
[payment_method] => paypal
)
)
[transactions] => Array
...
The documentation states:
payer_info object
This object is pre-filled by PayPal when the payment_method is paypal.
(see https://developer.paypal.com/webapps/developer/docs/api/#payerinfo-object)
Even after the payment is executed, I still receive no payer_info object from PayPal. I am wondering if PayPal is only returning the info I prepopulate before sending the user off to PayPal? e.g.:
$payer = new Payer();
$payer->setPayment_method('paypal');
Is there a way to retrieve the user's name/address/phone/etc (what I expected to be available from Payment::get($pay_id)->getPayer()->getPayerInfo()->getShipping_address()) using the REST API?
Or do I have to have the user duplicate their efforts and enter address information on my checkout page? I sure hope not, as this is one of the big advantages of using PayPal as a payment method.
I thought I would post an answer in case anyone else has this issue.
It does appear that the REST API fails to return the shipping information the majority of the time. Especially when using the GET /payments/payment endpoint. However I have seen it return shipping information from the POST /payments/payment/<PAYMENT_ID>/execute endpoint before.
Anyway, following the comments above it looks as if the OP ditched the REST API and went back to Express Checkout. Which is fair enough if you want to get the shipping data up front.
However, if you use the PayPal IPN in conjunction with the REST API it will provide the shipping and billing info on the callback. So you could collect the information at that point.
The only problem I see with doing this is that you can't confirm the address is correct with the user. PayPal however does show this information to the user as they make their way through payment and allows them to change it if necessary. So I believe it's safe to assume the data is accurate.

Get PayPal transaction fee without using IPN?

First of all I know there seems to be a few related questions about this which I have read but I can't find a definitive answer to my query. I hope its OK posting this here.
Related: receive more response data in ci-merchant library codeigniter
Related: How do I get the information returned in the IPN after a transaction in PayPal using ci_merchant library?
I basically want to get what the paypal IPN returns with CI Merchant.
Now I am calling purchase_return() which is great and returns something like this:
Merchant_paypal_api_response Object
(
[_status:protected] => complete
[_message:protected] =>
[_reference:protected] => XXXXX
[_data:protected] =>
[_redirect_url:protected] =>
[_redirect_method:protected] => GET
[_redirect_message:protected] =>
[_redirect_data:protected] =>
)
And I know that CI Merchant doesn't actually have a GetExpressCheckoutDetails call which would contain more details about the transaction.
But according to here: https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/integration-guide/ECGettingStarted/ that call wouldn't return anything to do with mc_fee or payment_fee anyway?
So I am simply asking is this at all possible to get the same sort of data that the paypal IPN returns without actually using it obviously.
Seems a bit backward to have to call the paypal IPN as well just to get additional details like mc_fee or payment_fee when I am already using the CI Merchant API method which is supposed to eliminate having to use the IPN? I can't believe the API doesn't return this sort of info.
Am I being completely mental here and missed the obvious? I just want to get the paypal fee for that transaction so I can do some accounting my end.
Is this possible?
Hope someone can shed some light.
Thanks,
You are right, CI-merchant doesn't support the GetExpressCheckoutDetails method, and that method doesn't actually return the fee.
You might have more luck looking into calling the PayPal GetTransactionDetails method, which seems to return the fee. You would need to alter CI-merchant to add this functionality, or just call it separately though.

Accept credit cards without PayPal creating account not working

Currently my host has this script and it does not work in accepting credit cards without creating a PayPal account. Any help to point out some reason why?
private function RedirectToPayPal($token)
{
$payPalURL = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=' . urlencode($token);
header("Location: ".$payPalURL);
exit;
}
$requestParams = array(
'RETURNURL' => site_url().'/payment/paypal/success_deposit/'.$order_id,
'CANCELURL' => site_url().'/payment/paypal/cancelled_deposit/'.$order_id,
'SOLUTIONTYPE' => 'Sole',
'LANDINGPAGE' => 'Billing'
);
You are using the correct variables, but keep in mind that not every account has the ability to offer their customers the ability to pay with a credit card without creating a PayPal account. I would have to look at the account you are using specifically. Can you provide me with the email address for the seller account, or the correlation ID of the API call, or the EC Token to locate the account information in our logs. Also, mention if this is for sandbox or live.