Invalid merchant configuration for paypal Direct Credit card payment - php

We have used DoDirectMethod to credit card payment and recurring payment with CreateRecurringPaymentsProfile Method. But Some how i can not get error "This transaction cannot be processed due to an invalid merchant configuration.".
I found some solution for this :
1)I have problem like : Features that are not enabled for live transactions
2) If for use of REST API ,
I need to change my country then how can i change country or currency.
3) In paypal errorcode i found : Occurs when you have not agreed to the billing agreement.
- Then how can i agreed billing agrrement- need steps for it.
Please help me by providing steps of configuration or any other solution.

PayPal is confusing peoples/developers completely, i am also getting the same issue from one month on one of our client's website, i was used DoDirectPayment, and it works like a charm for test transactions, but as i make it LIVE it is was showing the same issue, i found that too, to performing transactions in LIVE mode we need to 'Enable' this feature for Direct Credit Cards, but many times i requested them (PayPal) to enable that feature, but all time they just received my Application Online and reponsed that it will take about 24 hours. I have also added extra information like SSN, EIN all that but they are so lazy or not active to do that.
At one point they are saying we need Website Payments Pro but i have not found a single link to register that, I found PayPal Payments Pro link at many sites and even in their site, these guys have a huge documentation on that website payments pro and dodirect method but not a single link how to register for that service or how they enable that feature for 'Live' mode.
And today i found they updated their developers site and make things a little different, also provided an extra method "braintreegateway" in order to process, and i tried that too using their sandbox account, its working with only PHP 5.4 and above, so old PHP version servers are unable to get that. And they also need to register your details at their end.
If i have already a PayPal Business account why do i need to register at every single method.
Sucked

Related

PayPal: Instrument declined when in live mode using API

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/

What PayPal PHP-API functions to use as replacement for subscription-buttons?

I have a website coded in PHP that uses paypal buttons/IPN for subscriptions.
The method is limited and I need to replace it with the REST-API.
What the system needs to do:
Accept new user recurring-payment subscriptions
Be able to change plan pricing for new users
Be able to change plan pricing for existing users
Change subscription plans mid-subscription(If a user upgrades from pro to master the price goes up, and the opposite way it goes down).
The price difference between packages is 5$
Give periodic discounts for a limited amount of months.
The questions:
1.) What is the equivalent of recurring-payments in the PHP-API or REST-API? (I'd rather it auto-charges and notifies my IPN if possible)
2.) How can I automatically refund/charge an additional amount when the user upgrades/downgrades in the middle of a month?
3.) Is there a standalone PHP control-panel that can connect to the paypal API to manage the subscription packages + sales?
Thanks in advance!
If you are looking to use REST APIs, the best place to start is going to be at the REST API docs. For your situation, you can use the vault to set up a recurring payment system. You could also use the future payments API, but you will need to make sure you buy DPRP for your account. Contact PayPal Customer Support to enable DPRP.
With the Vault API, you can just create one time payments over and over with the token you get when storing a credit card.
There is an in-depth walkthrough using the SDK on the PayPal PHP SDK Wiki.
To do refunds, you can use the Refund REST API. All this assuming that you would be writing scripts to detect your user downgrading/upgrading. You would just need to store the amount they are paying each month in your DB.
There are some shopping carts out there that are implementing REST APIs. You might need to google search for something like that.
Hope that helps and gets you started in the right direction!

PayPal classical API with reoccuring payment in Laravel 4.2

I am working on Laravel 4.2 project. The project is about to provide the Video services to the dedicated customers.
The client wants to use PayPal payment gateway and I have never done this before. He has provided me a Personal and a Business account with Classical API credentials and signature.
The project requirement is once user sign-up, he will be charged certain amount (let us say $10 every month). For payment he must NOT be redirected to PayPal site that means everything should be done using my website only. Also we will NOT store any credit card details of the user and still the Payment should be done OR renewed automatically every month.
If user wants to turn of the the auto renewal of payment, he can.
I am not sure how to do this using PayPal classical API. Although I have downloaded the Omnipay/Omnipay package from git-hub, they asks there is no method to store the user's credit card details in PayPal Vault using this also to have a cron job for auto renewal. Since I don't want to store the credit card details, I am not sure how to do all this.
Please help me or guide me to do so. Is there any sample or example?
In order to take credit cards directly like you're asking you'll need to sign up with PayPal Payments Pro, which is $30/mo. Then you'll need to add the recurring billing feature to that, which is another $30/mo.
If that's not a problem, then after getting those things approved and active on your account, you would use the CreateRecurringPaymentsProfile API to create the subscription profiles.
This PayPal PHP SDK is available on Packagist and works with Composer, so it works wonderfully in Laravel.
The CreateRecurringPaymentsProfile sample is functional as-is (although, as I look at it now you'll need to update the expiration date of the credit card) so you would just need to replace all of the static data with your own dynamic data.
The template file is the same thing but it's completely empty and ready for you to populate with your own data.
Using that SDK you can have the profile creation working within minutes, so it's just a matter of having Pro w/ Recurring Payments enabled on your account.

Confirm Express Checkout on PayPal via PHP

This question asked before but didn't got any answer.Maybe things have been changed.
When you click the Express Checkout PayPal button on any webshop, it redirects you to a specific paypal login link, for paying the order.
I have been searching high and low for 3 weeks for a simple paypal php curl script that logs you in from this step, and confirms the payment, but have not been able to find anything.
I found out it is not possible to use the API for this, so its gotta be done by CURL.
I'm asking for this because I run a dropshipping website, and would like to automate certain steps, like placing and paying orders. A working code for this would help not just me, but all looking to automate buying in some form.
Thank's!
You can't log the buyer into PayPal when you redirect them to the site. The buyer has to enter their own account credentials themselves.
If you wanted to bill a buyer without requiring they log into PayPal each time you would need to use billing agreements (reference transactions) through Express Checkout. If you set up a billing agreement with a buyer you can charge a previously successful sale to bill them again for a different amount.
You cannot do what you want with Express Checkout, especially since nobody will ever enter the paypal details on your website (that is the entire point of paypal).
You can use either preapproved payments (buyers preappove payments being taken out of their account up to a certain ceiling), or reference transactions (you reference a new transaction to an older transaction. PayPal will then use the billing details of this earlier transaction to bill the user).
Preapproved payments is part of Adaptive Payments. Documentation is at https://developer.paypal.com/webapps/developer/docs/classic/adaptive-payments/integration-guide/APIntro/
You can find more details about Reference Transactions at https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECReferenceTxns
Note: Reference Transactions needs to be enabled on your account. This API call is not open to everyone due to the potential for abuse, so you may want to look into whether you're eligible for it before you start working on a full integation with it.
You can find more info here :https://www.paypal-community.com/t5/Merchant-services-Archive/Does-Paypal-have-a-quot-Token-Payments-quot-concept/td-p/325794
Also google "token payments" as that is what you need and most payment gateways usually support them.

CCAvenue Sandbox Site For Testing

I want to integrate CCAvenue payment gateway in my site. Is there any sandbox site available for CCAvenue to test payments? If any provide me the link.
CCAvenue removed the PDF from their website so I removed the official link.
Removed broken links. I found another copy but at this point it might be outdated.
https://docplayer.net/12395510-Ccavenue-world-integration-manual-version-1-0.html
Check this manual , it might be what are you looking for.
There is something about testing the integration on page 19.
I found another one which seems to be a more recent copy with a more up to date explanation.
https://jemds.com/data_pdf/1_CCAvenue%20Integration%20-%20Ver%202.0.pdf
From my experience, this is not a great app for sandboxing. If you download the manual (linked by #rgerculy you should see the information for integration. However, here is what must happen:
First, login to the merchant account and go to the integration section and download the sample code. There you'll see some PHP test code. You can probably save time by working this into your application.
Next, make sure to activate your remote merchant processing. By default, its deactivated.
Finally, it looks like you can use 4111-1111-1111-1111 to simulate a failure. To simulate success, you must use a real card for testing - less than $1USD - and put the term SUB-MERCHANT TEST in the extra notes text area.
There doesn't seem to be an easier way to do this, that I'm aware of. :(
To test your transaction on CCAvenue. Here is the step given by CCAvenue.
This section for all Clients. Now you're ready to test your account by doing Live transactions! Please keep in mind that you cannot test CCAvenue by using American Express or JCB credit card and also any of the Net Banking interfaces. Please use Mastercard, Visa, Diners Club or a Citibank eCard to do a test transaction. Also remember that while placing test orders, always put the words "SUB MERCHANT TEST" in the Instructions text box. After the transaction is successful, please log in to your CCAvenue account using your client ID and Password and cancel the test transaction. Please do not capture the transaction as this would constitute a "cash advance" against one's own cards, which our credit card companies and the payment gateways do not allow on the Internet.
Current Process:
Step one is to register in CCAvenue, and your account will be activated much sooner. And once your account is activated you will receive,
Merchant ID.
Link to activate your account and setup password for your CCAvenue account.
at your registered email address.
Once you activate your account and set up the password for your account, you can get the working key and access code in the dashboard.
To test your code, you can use https://test.ccavenue.com as form URL to CCAvenue website. All the transactions to this test URL will not be processed.
If you need to test your code from your local machine, you should write to CCAvenue service desk at service#ccavenue.com with your merchant ID and localhost URL to white-list. Else CCAvenue will throw error "Merchant Authentication Failed".
Hope this might help someone who is looking for a testing environment.
For testing ccavenue you have to mail your merchant id and register site to ccavenue help team and they will activate your account for test environment
By default: test account is not active in ccavenue. But the live payment gateway is active. You need to mail salessupport#ccavenue.com with merchant_id and domain names to be whitelisted. It will be activated in 24 hours.

Categories