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 .
Related
Using payflow .net dll I am trying to create a Recurring Billing Profile without forcing my clients to take on the PCI compliance burden of handling credit card data so here's what I'm currently doing...
get secure token
create sale transaction (record results)
Convert it to Recurring Billing Profile (starting in the future)
This all works however when PayPal tries to create a transaction using the RBP it gets Result Code 30, Duplicate, error 10536 - ...duplicate invoice id... I'm not setting an invoice id anywhere in my code. When in step 2 I create an authorization instead of a sale it works (although the trans type in the IPN ends up being "cart"???). So I assume this is a problem with converting a sale to a RBP. If that is not allowed then step 3 should stop me but it doesn't. So is there a way around this problem?
NOTE: When using Express Checkout with the paypalcoresdk and paypalmerchantsdk dlls I am able to create a sale transaction AND a RBP using the same token and it all works and the IPN tran type ends up being recurring_payment which is correct.
NOTE 2: The best solution would be for PayPal to allow me to create an RBP using a secure token. I have not been able to make that work.
NOTE 3: The reason I'm not using an Authorization transaction is because this would result in the client having loads of Auth transaction in PayPal that they could Capture at anytime resulting in duplicate payments.
To get rid of this error , Login to your Paypal account , go to Profile --> My selling Tools --> Block Payments . Here you will see something like " Block the payments with same invoice id " , put it to "No" and save the settings . It should be fine afterwards .
Regarding NOTE 3
I have found that I can set up an Authorization transaction with an amount of 0. Then in the transaction history it will have a status of Completed and no Capture button. Then when converting this to a Recurring Billing Profile PayPal allows you to set a different amount. I don't know if this imposes a limitation on the amount but my test of $500 worked.
Hope that helps someone
I am trying to create a recurring profile using express-checkout (Payum/paypal-express-checkout-nvp).
Howto from Payum
private function createAgreement(Purchase $purchase)
{
$storage = $this->payum->getStorage('Coachup\PaymentBundle\Entity\PaymentAgreement');
$agreementDetails = $storage->createModel();
$agreementDetails['L_BILLINGTYPE0'] = Api::BILLINGTYPE_RECURRING_PAYMENTS;
$agreementDetails['L_BILLINGAGREEMENTDESCRIPTION0'] = 'test';
$agreementDetails['PAYMENTREQUEST_0_AMT'] = 0;
$agreementDetails->setPurchase($purchase);
$storage->updateModel($agreementDetails);
$captureToken = $this->securityTokenFactory->createCaptureToken(
$this->paymentName,
$agreementDetails,
'payment_checkout_progress_payment',
['purchaseId' => $purchase->getId(), 'paymentType' => $this->getId()]
);
$agreementDetails['RETURNURL'] = $captureToken->getTargetUrl();
$agreementDetails['CANCELURL'] = $captureToken->getTargetUrl();
$storage->updateModel($agreementDetails);
return $captureToken->getTargetUrl();
}
A token seems to be generated with paypal, the user gets redirected to paypal (sandbox) and once i log in to confirm the agreement, i get a generic error message (loosely translated)
"The request can not be processed, please return to the store and choose another option".
Not even an error code...
Any help?
Its possible that the initial payment of 0.00 is failing, which is making it so the billing agreement is not created. Here is a way that you can override this and create the profile anyway. This comes directly from the PayPal documentation:
By default, PayPal does not activate the profile if the initial payment amount fails. To override this default behavior, set the FAILEDINITAMTACTION field to ContinueOnFailure. If the initial payment amount fails, ContinueOnFailure instructs PayPal to add the failed payment amount to the outstanding balance due on this recurring payment profile.
If you do not set FAILEDINITAMTACTION or set it to CancelOnFailure, PayPal creates the recurring payment profile. However, PayPal places the profile into a pending status until the initial payment completes. If the initial payment clears, PayPal notifies you by Instant Payment Notification (IPN) that it has activated the pending profile. If the payment fails, PayPal notifies you by IPN that it has canceled the pending profile.
If you created the profile using Express Checkout, the buyer receives an email stating that PayPal cleared the initial payment or canceled the pending profile.
Here is the direct link in case you need it:
Recurring Billing Integration Guide
I am performing tests in SANDBOX.
I am implementing Website Payment Standard on my website.
I have tested successfully Completed transactions (payment_status Completed) .
I need to test Failed and Denied transactions but I am not able to do it.
If there is a test card for Failed or Denied transactions in Sandbox, please provide.
I tried with an invalid credit card to create a Failed or Denied transaction and I got an error that appeared on the same page (I imagine that was a result of Javascript validation) but I did not receive any reply to my IPN listener on the server and there should have been a redirection to an URL specified in the HML form as URL for invalid operations.
I understand that a result of each transaction independently of its payment status should be received by my IPN listener. It receives Completed transactions so I imagine it should received Failed or Denied ones too.
I used IPN simulator (developer.paypal.com) to create Failed/Denied transactions and I did receive them with my IPN listener so I imagine it is not a problem with the listener. I just cannot create these transactions from my page directly.
Thanks and best regards,
Anna
You will have to enter error code at the place of amount https://developer.paypal.com/docs/classic/api/errorcodes/
When you will set error code number at the place of amount paypal detect what type of transaction it is.
profile = PAYPAL_EXPRESS_GATEWAY.recurring(10502, nil,
:description => plan.description,
:start_date => Time.now,
:period => 'Day',
:frequency => 1,
:auto_bill_outstanding => false,
:token => params[:token],
:max_failed_payments => 1
)
in above code I set 10502 at the place of payment and when you see the doc https://developer.paypal.com/docs/classic/api/errorcodes/
error code details are:
10502 Invalid Data This transaction cannot be processed. Please use a valid credit card. The credit card used is expired. Recurring Payments
and you will get APN with failed transction.
I hope this will help you
I have integrated Paypal ExpressCheckout using NVP in a site but I only receive information related to the transaction via GetExpressCheckoutDetails but not the billing information such as buyer name, address. I have used the v65 of the API and PHP. Is there a way to get/retrieve buyer information when they login to PayPal and pay using ExpressCheckout ?
An example how I used it.
$nvpstr = '&TOKEN=' . $token . etc ...
$resArray = hash_call("GetExpressCheckoutDetails", $nvpstr);
print_r($resArray);
But I receive only transaction details without buyer information.
Only the shipping information would be returned if you are requiring shipping. The billing information is not returned. If you are needing the billing information returned, you would need to contact PayPal Business Support or your account manager if you have one and request the option to be turned on to return the billing information. In addition to having this turned on, you also need to pass over the variable REQBILLINGADDRESS in your SetExpressCheckout API call and you need to set the value to “1”.
REQBILLINGADDRESS
(Optional) Is 1 or 0. The value 1 indicates that you require that the buyer’s billing address on file with PayPal be returned. Setting this element will return BILLTONAME, STREET, STREET2, CITY, STATE, ZIP, and COUNTRYCODE.
Limitations: One character.
My application uses the Adaptive Payment Service to send payments to users. If the user has no bank account attached to their PayPal account and their account is not verified, PayPal sends them an email and they need to click on a Claim button in that email to receive their payment.
The problem is that this process seems to change the Fees Payer initially set by the transaction. My app sets the fees payer to "SENDER" and in the example above, PayPal seemingly changes this to "RECEIVER".
Does anyone know why this would happen? Here is an excerpt from the code ... seems pretty straightforward to me ...
$payRequest = new PayRequest(new RequestEnvelope("en_US"), 'PAY', $cancelURL, 'USD', $receiverList, $returnURL);
$payRequest->feesPayer = 'SENDER';
$payRequest->senderEmail = $senderAccount;
$service = new AdaptivePaymentsService();
$response = $service->Pay($payRequest);
I finally submitted this question directly to PayPal support and eventually got back the following:
As per the Pay API reference;
https://www.x.com/developers/paypal/documentation-tools/api/pay-api-operation,
the 'Sender' cannot be the feesPayer for unilateral payments (payments
made to users who have not yet registered with PayPal). This is
probably why you are seeing it change to 'Receiver' instead.
So, apparently this is by design and there is no way around it.