I have this error, is it related to Braintree configuration or something in code?
This is method for payment.
$request->user()->newSubscription('main', $plan->braintree_plan)->create($request->payment_method_nonce);
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact
support.
If you are in a Production account, a processor decline indicates that the customer’s bank has refused the transaction request. Sometimes you can tell why it was declined by reading the response code, but only the customer's bank can confirm the specific reason. You can read the full list of decline response codes in our Declines documentation.
In you are testing in a Sandbox environment, processor declines are triggered by passing a specific test amount that corresponds with a decline code.
Related
As per documentation what I had understood is, when we release funds from escrow, if there is any issue with sub-merchant if we setup a webhook for Disbursement Exception then it will be notified to us. Braintree will hit the endpoint url which we have configured in control panel with request parameters, I want to find for which transactions & sub-merchant issue is raised. From this doc its clear that transactions ids they will send in request parameters but its not clearly given about sub-merchant details anywhere in the doc.
I tried even sample payload, payload doesn't reflect actual request parameters. To know myself what parameters will be sent by Braintree when Disbursement Exception occurs I created a sub-merchant in sandbox using PHP SDK with destination as Braintree_Test_MerchantAccount::$bankRejectedUpdateFundingInformation, after that I created few sale transactions where funds has to release from escrow to newly create sub-merchant. From two days I'm waiting for that Braintree will hit endpoint url which I configured in control panel when it tries to release funds to sub-merchant but Braintee never hit endpoint url and still escrow status is Release Pending.
My question in-short: How to know for which sub-merchant disbursement exception is occurred when braintree webhook hit the endpoint url ?
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
In the case of a disbursement exception, the resulting webhook payload will still contain a disbursement object. The disbursement object will have a merchantAccount parameter, which contains info about the submerchant account for which disbursement failed, including id, the submerchant's merchant account ID. Here's the relevant page in the Braintree dev docs.
In code, here's what that looks like: once you've parsed the webhook notification and confirmed that $webhookNotification->kind is Braintree_WebhookNotification::DISBURSEMENT_EXCEPTION, then you can use
$webhookNotification->disbursement->merchantAccount->id
to get the ID. On the disbursement object, you also can get the reason for the failure with exceptionMessage, the list of transactions in the failed disbursement with transactionIds, and a suggested next step with followUpAction.
If you're using the latest version of the Braintree PHP SDK (currently 3.22.0), then on a sample notification, $webhookNotification->disbursement->merchantAccount->id will be set to "merchant_account_token".
We're currently using the rest API for PayPal (PHP) and everything was working fine in the sandbox. When we went live we continue to get the following message:
{"name":"INSTRUMENT_DECLINED","details":[],"message":"The instrument presented was either declined by the processor or bank, or it can't be used for this payment.","information_link":"https://developer.paypal.com/docs/api/#INSTRUMENT_DECLINED","debug_id":"8ad80896530bd"}
What does this mean and more importantly is there a reason this is not being caught as an exception in the php SDK. It seems to pass through without issues (using the exact same code as in the sample file for executing a payment). Is there a way to catch this?
Sounds like the payment method was turned down by the bank, or is not allowed for the attempted purchase. For instance prepaid debit cards are often now able to complete certain payments, and many cards are restricted geographically.
everything was working fine in the sandbox
The sandbox doesn't actually check with the bank whether a card is good, so it wouldn't have thrown the same error. The sandbox is for testing whether the code paths work as intended. The problem is not with your script.
In case other people look at this issue.
There is actually an official explanation and solution in the paypal documentation.
A buyer's funding source can fail for several reasons, including:
The billing address associated with the financial instrument could not
be confirmed. The transaction exceeds the card limit. The card issuer
denied the transaction. If a funding source fails, the Orders API
returns the INSTRUMENT_DECLINED error. Handle this error and provide
the buyer an opportunity to select a different payment option by
restarting the payment in the onApprove function.
https://developer.paypal.com/docs/platforms/checkout/add-capabilities/handle-funding-failures/
I have Integrated Paypal using php. I know there is return url ,that means when payment is received it will return to the url for our website.My Question is if payment is received and due to internet problem it does not return to our web page, how do I know that payment is received from a particular user?
If there is a network issue and PayPal cannot issue the IPN message, then according to their documentation, they will retry 15 times up to 4 days.
The IPN message service does not assume that your listener will receive all IPN messages. Because the Internet is not 100% reliable, IPNs can get lost or be delayed. To address these issues, the IPN message service includes a retry mechanism that re-sends a message at various intervals until your listener acknowledges receipt. An IPN message may be present up to four days after the original was sent. The maximum number of retries is 15.
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNIntro/
This item below might help. Instant Payment Notification should work, but in the case of a network failure, if the payment reached PayPal but the purchaser did not get back to your site to complete a purchase, then you should still receive an email from PayPal telling you that you have received a payment.
using paypal button - can my webpage tell if paypal transaction was successful or not?
You get a confirmation email with their name and email address - be aware that occasionally this may not be the user's current, most active email address. You can also log in to your PayPal dashboard to see all details as well, of course.
You can look up your payment details from the email and compare them to your own user records in your database. If the email they use for PayPal is not the same as the one they registered on your site with, you can still look up their name from the email - in practice it seems to happen extremely rarely that payments have such a problem in my personal experience
I set up a script which emails my users with a passcode to get to the online product they bought which is emailed to them so they can submit that later along with their email address. This is the first thing that happens on return to my script so at least if the site fails to respond properly they can get to what they bought later.
The script uses PHPMailer and cc's me with their passcode so I have it available to re-send to them if they write with a complaint. It doesn't help if the PayPal return for Instant Payment Notification fails completely but the other answers cover that very fully and detail the PayPal repeat attempt process well.
Instant Payment Notification scripts can be downloaded from PayPal for modification by yourself as per the article linked to above.
To be perfectly honest, this is one of PayPal Standard's largest holes. IPN is a POST callback (as is PDT) and they check to make sure they get a 200 response or else they retry (and you can use the IPN history in your PayPal account to resend missing IPNs). But this method still relies on you getting the callback in a timely manner and it's not foolproof. Worse, you need to verify the IPN call and that introduces yet another point of failure in calling PayPal to make sure they did indeed send you the IPN you got.
There's a couple of ways to deal with this
Audit your account regularly. This is a good idea in general, but for a small website this shouldn't be terribly hard. Match your invoices up to your PayPal payments. Obviously this doesn't scale well so...
Switch to Payments Pro. There's more hurdles to this (like more PCI compliance, SSL certificate, etc) but the major advantage is that the API is far less susceptible to the whims of the Internet and only involves one call for credit cards (you can ignore the IPN because the API tells you everything you need to know). The worst that can happen is you send a payment API call and fail to get a response. This is exceptionally rare as PayPal makes sure their API is 99.9% reliable (IPN relies on your server being reliable). Speaking from experience, Payments Pro has far fewer issues than IPN does.
In your application, you should have a status field for orders. If you haven't received the ipn, you wouldn't change the status to Paid.
After that, if you receive an email from Paypal that someone has paid, check the order number, and change the status manually.
how do I know that payment is received from a particular user?
Paypal will send an email both user and you.
Paypal offers 2 solutions for your problem.
PayPal IPN - it notifies the server with a POST request to a specific URL, whena transaction has been successful, declined, aborted by user and so on. Paypal provide an IPN Simulator (the worst simulator ever) in order to test its functionality. you may give it a try at : https://developer.paypal.com/developer/ipnSimulator/
Paypal WebHooks - The webhooks are the "New Kid in the Block",they are basically "user-defined HTTP callbacks that receive events for the subscribed event types. Webhooks are asynchronous, the order is not guaranteed, and idempotency may lead to the same event being sent more than once." as stated in the Paypal documentation.
You can read more about it on : https://developer.paypal.com/docs/integration/direct/rest-webhooks-overview/
For any further help, comment below and I shall try to help.
Cheers,
You have to use notify_url for this purpose
<input type="hidden" name="notify_url" value="https://domain-name.com/ipn.php">
I have had implemented the Commweb payment integration 3-Party with PHP on my site where users can pay with credit cards using master card payment gateway. From last couple of days I am receiving errors from my users that the transactions are failing. I just checked it today and I found that its throwing an error which I wasnt able to find in the implementation docs. The error message returned is:
E5000: No bank links are configured for merchant [merchant_id]
Anyone has idea on how to fix this issue? Please help...
URL for ref:
.../commweb/commweb_postreturn.php?Title=PHP+VPC+3-Party&button=Make+a+Credit+Card+Deposit&vpc_Amount=4300&vpc_BatchNo=0&vpc_Command=pay&vpc_Locale=en&vpc_MerchTxnRef=TESTERAC-454545&vpc_Merchant=TESTTERM01&vpc_Message=E5000%3A+No+bank+links+are+configured+for+merchant+%5BTESTER123%5D.&vpc_OrderInfo=CommWeb+Gateway+Payment&vpc_SecureHash=B38E67D6311C43D4AF0118270DEEB20E&vpc_TransactionNo=0&vpc_TxnResponseCode=7&vpc_Version=1
I have changed few parameters in the URL text which could expose my account details.
I have the exact error but I am using ANZ eGate. Give the bank technical support team a call and find out why... in my case it's account closing due to a long period of inactivity!
We are using Magento
I have got the below error in exception log file :
exception Mage_Core_Exception with message below:
PayPal NVP gateway errors: The transaction cannot complete successfully.
Instruct the customer to use an alternative payment method
(#10417: Transaction cannot complete).
Correlation ID: e9aa67915a70f.
Version: 60.0. in /home/necro/necroproduct.com/app/Mage.php:536
Can anybody help me to solve this error?
There is an error code in your log:
(#10417: Transaction cannot complete).
According to the documentation this simply means that the customer does not have enough funds on their account (or has no credit card linked) to pay for the item, as stated:
Account not associated with a usable funding source.
or
Credit card or Billing Agreement is required to complete payment.
So, unless you are willing to drop a credit card/billing agreement requirement (if you currently do so at all, that is) there is not much you can do on your end.