PayPal ExpressCheckout (Payflow): Invalid vendor accountError Code: 26 - php

This is driving me crazy! I can't get the PayPal express (Payflow?) api to work....
paypal sandbox tells me:
Test Account: AAAA.B_CCCCCCCCCC_biz#XXXXX.com
API Username: AAAA.B_CCCCCCCCCC_biz_api1.XXXXX.com
API Password: DDDDDDDDDD
Signature: ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
in the paypayfunctions.php i wrote:
$API_User="AAAA.B_CCCCCCCCCC_biz#XXXXX.com";
$API_Password="DDDDDDDDDD";
$API_Vendor="AAAA.B_CCCCCCCCCC_biz#XXXXX.com";
$API_Partner="PayPal";
...
And when I test the service, all i get is "SetExpressCheckoutDetails API call failed. Error Message: Invalid vendor accountError Code: 26"
The PayPal documentation and examples are terribly complex, all I want to do is having a simple button that links to paypal to start the payment of XXX euro's to account YYYY....
Can anyone help me?
Thanks in advance!

Express Checkout and Payflow are two separate PayPal services. Your sandbox credentials (which include a signature) are for Express Checkout. The script asks for a partner, which is specific to Payflow.
What do you want to use? Express Checkout or Payflow? See the paragraphs below for more information on the two.
Are you sure the script is for Express Checkout?
Is the script connecting to the sandbox or live API? The Express Checkout sandbox API is located at https://api-3t.sandbox.paypal.com/nvp.
Express Checkout is primarily used for payments using a PayPal account. You can set up a sandbox environment at developer.paypal.com. Within the sandbox you can create test accounts, at sandbox.paypal.com. See the PayPal API Reference for more details.
Payflow is a payment gateway that allows you to pay using a credit card or checks, among others. PayPal accounts are not supported by Payflow. You can sign up for an account, which can be used for testing and real payments after you upgrade the account. See the User's Guide for Payflow Link (PDF) for more details.

Issue
PayPal returned result code 26 - Invalid vendor account when processing a transaction.
Cause
You may get result code 26 if:
You just activated your account.
A vendor account doesn't become active until at least an hour after it was created. Typically, a database update begins at 20 minutes past the hour and lasts about 20 minutes. If your account becomes active while the database is updating (after the 20-minute mark), you must wait until after the next hour's update before you can use it.
The login information is incorrect.
Verify the information you entered in the User, Vendor, Partner, and Password fields.
Check that you sent the correct Partner value.
The primary user's Merchant ID should be in the User field. For a secondary Payflow Pro user, the User field should contain the password assigned by the primary user.
All fields are case-sensitive.
**
The bank BIN number is unknown.
** For PayPal Australia (VSA) only, result code 26 indicates that the customer's credit card is issued by a credit union or small financial institution. The processor, FDRA, has no bank identification number (BIN) on file for the card, which triggers the error message,"No Universal Account - Response code 42." You must get another credit card or form of payment from your customer.
Solution
Check that all values in use are both correct values and proper case (all values are case-sensitive).

Related

Braintree API in PHP - enforce currency for transaction

I am trying to enforce a currency for a transaction via the Braintree API but I cannot see how this is done. Stripe is very easy, as the currency (AUD, USD) is passed to the Stripe server as part of the execution.
With Braintree what I can see is that the currency is dependent on the merchant account receiving the money. My app will allow a user to invoice their customer, so the user will select the presentment currency of the invoice. I want to lock this selection to their merchant account currency.
If I understood this correctly, then pushing a transaction of MYR 250 (for example) and having a customer pay for this, if the merchant account behind the transaction is a EUR account, then the customer was presented by my app a MYR 250 value, but his CC is debited a EUR 250 value.
Is there a way to do this with Braintree? I want to do this with the standard merchant accounts and not under the Master Merchant set up.
Alternatively, is there a way to confirm the currency of an account from the Merchant Id / keys that a user supplies my app?
I have read the entire API docs, but I cannot see how this is done. Did i miss something? It has been a long week already!
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
It's possible to have different presentment currencies and settlement currencies. To set this up, please check out this section and email the Braintree Accounts team directly: accounts#braintreepayments.com
To confirm the currency associated with a MerchantAccount, you can call MerchantAccount.find using a merchant_account_id. With the MerchantAccount object, you can check its currency_iso_code attribute.

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.

PayPal Payflow api gives error Insufficient permissions to perform transaction

I am using PHP Payflow library for payment. Its working fine with the default settings of user name, password and vendor, but when I put my vendor along with an user created at my manager site, I keep getting api error for sale method as:
RESULT 52
PNREF B70P6E0297BE
RESPMSG Insufficient permissions to perform transaction
pnref differs though. When I checked for daily transactions at manager site, all the transaction are listed there with result code as 52.
I tried to create profile of payer for recurring billing, but that too results with code 36 and txnresult code 5 and api error looks like
RESULT 36
RPREF R1056FBB4803
RESPMSG Transaction failed: Fail to obtain approval for the online transaction
TRXRESULT 5
TRXPNREF B70P6E02CD90
TRXRESPMSG Invalid merchant information: 10002-You do not have permissions to make this API call
HOSTCODE 10002
TRANSTIME 2014-09-01 04:12:28
FIRSTNAME John
LASTNAME Doe
AMT 3.00
ACCT 1111
EXPDATE 1215
CARDTYPE 0
This transaction also listed in daily transactions.
The user I am using for transaction has give API_FULL_TRANSACTION permission. I tried to change it to FULL_TRANSACTION but the result is same. I also tried the transaction with ADMIN permissions, but it also results with code 52.
What kind of permission do we need to set for user to perform the transaction?
For the result code = 52 , it seems that you have PayPal advanced account but you are trying to process the Payments directly on your website using the API's that is not allowed because with PayPal advanced you have to use PayPal Hosted checkout Pages . To get rid of this error you must have pro account or use the hosted checkout Pages .
And one more thing if you are in test mode , make sure to put the sandbox account email address in your manager account under Service settings --> Set Up --> PayPal sandbox email address . And this sandbox account should be a Pro account . You can create a sandbox account by logging to developer.paypal.com with your PayPal credentials --> Applications--> Sandbox accounts .
For the recurring billing error , can you post the parameters submitted to the PayPal ?
Your Payflow Manager account has to sync with your PayPal Sandbox account. then it is ready to begin accepting Test/Sandbox transactions.
If you do not see the PayPal Express Checkout section on the Set Up page, you will need to contact Merchant Technical Support. Url : https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ1961&expand=true&locale=en_US

Paypal sendbox test account issue with no funds

I have problem with paypal sendbox testing account. I am trying to reproduce failing transaction when there is no enough funds but even when i make PERSONAL test account with 0$ i always get transaction complited and money is always transferd on BUSSINESS account. When i try to pay i get this message:
PayPal will use Discover XXXX-XXXX-XXXX-0295 to fund this transaction
if your bank does not have enough funds.
So every time it draws money from that card, but when i try to delete that card from PERSONAL user i am rejected.
Do you know what can cause this problem? :/
You can create test accounts without bank / balance / card.
Though if that's the case and the account doesn't have any funds, the buyer will be asked to add a card to his account prior to being redirected back to your site.
If you'd like to test a card decline (which is different than testing a PayPal account with no funds), enable 'Negative testing' on your buyer test account and set the 'amount' the AMT='104.86 for API error code 10486, or AMT=106.06 for API error code 10606.
See also https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/ht_ec_fundingfailure10486/ for more details about testing the API error 10486.

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.

Categories