I have api for Paypal DoDirect Method on NVP [Direct Credit Card Payment], and I'm using php as base language.
I'm getting success with the transaction Or the response says so. But its not updating in the sandbox account.
include_once(drupal_get_path('module','payment_details').'/paypal_do_direct.php');
$paypalDoDirect = new PaypalDoDirect();
$paypalDoDirect->setApiUserName('crazyheartram_api1.gmail.com');
$paypalDoDirect->setApiPassword('1377690526');
$paypalDoDirect->setApiSignature('Afm3wtXOE0L1wd2UrjZtljZHC-wnAWHTSwJ-b7-rw3qPcLGaMSLINqP8');
$paypalDoDirect->setCreditCardType($cardType);
$paypalDoDirect->setEnvironment('sandbox');
$paypalDoDirect->setAmount($amount);
$paypalDoDirect->setCardExpMonth($expirationDate);
$paypalDoDirect->setCardExpYear($expirationYear);
$paypalDoDirect->setCardVerificationValue($cvv);
$paypalDoDirect->setFirstName($firstName);
$paypalDoDirect->setLastName($lastName);
$paypalDoDirect->setPayerEmail($email);
$paypalDoDirect->setCreditCardNumber($creditCardNumber);
$response= $paypalDoDirect->MakePayment();
I shared my sandbox bussiness-pro account details below:
Username: crazyheartram_api1.gmail.com
Password: 1377690526
Signature: Afm3wtXOE0L1wd2UrjZtljZHC-wnAWHTSwJ-b7-rw3qPcLGaMSLINqP8
And I did the transaction using my another personal account.
Credit card number: 4351521550740304
Credit card type: Visa
Expiration date: 7/2018
My expectation is, it should deduct the amount from personal account and credit it to the merchant (business-pro) account.
Any help highly appreciated. Thanks
EDITED
I'm using same code as mentioned in below url,
Payment Api using class
I just found this question, its exactly the same question as that of mine.
https://drupal.stackexchange.com/questions/82788/seperate-payment-integeration-for-selected-plan-type-using-drupal-form-with-payp
The DoDirectPayment call charges credit cards directly; it does not deduct from a PayPal account - even if that card is attached to an existing PayPal account. Therefore it doesn't show up as a transaction in your 'buyer' PayPal account.
Related
My client uses the PayPal NVP API for processing both PayPal and credit cards payments. That appears to be deprecated or PayPal is encouraging upgrading to REST. I convinced my client to do the upgrade and while implementing it I noticed the following:
Important: The use of the PayPal REST /payments APIs to accept credit
card payments is restricted. Instead, you can accept credit card
payments with Braintree Direct.
That puts a serious wrench in my work.
A little more searching around and I find this option for accepting credit card payments with the REST API:
Guest payments with a credit card that is stored in the PayPal vault
This would imply to me that the Vault must be used on conjunction with guest payments. Can anyone confirm if that is the case?
It looks like to enable guest checkout payments "PayPal Account Optional" must be turned on which I have confirmed is on in my sandbox account.
The presumption I am now going on is credit card payments with the REST API will work as long as this option is on in the merchant's account, however, I don't find this clearly stated anywhere and I don't want to continue on swapping out APIs for my client if credit card payments via REST won't work now or at some point in the future. I also find it odd I don't find any example API calls in the Payments API using a credit card. I had to figure that one out on my own with a little help from Google.
I appreciate anyone's experience using the REST Payments API to process credit card payments given it's stated that it's "restricted".
Recently I visited Paypal Rest API page https://developer.paypal.com/docs/integration/direct/payments/. I noticed an IMPORTANT message there please find below screenshot:
If this API now restrict to process Card Payment then Is Billing Plan and Agreement API (for Recurring/Subscription Payment) also restrict Card payment?
Please help me
The ability to process direct credit card transactions via PayPal REST API for new integrations has been restricted. That means that the "payment_method":"credit_card" option is no longer allowed to be use with any new REST API integrations, including for the Billing Plan and Billing Agreement API's.
We apologize for any inconvenience.
I have setup recurring billing with Paypal REST API, and the merchant account is set in Singapore, but i don't see an "Pay with Debit or Credit Card" option in the popup checkout page.
I have seen the answer in this thread: Paypal credit card REST api error mention that it's only available for Pro UK merchant account.
So anyone can suggest me any ideas i can deal with this problem?
The reason why the buyer receives that error is because of it a guest checkout. Guest Checkout is not a 100% that is offered to your with your current account. Guess Checkout provide the buyer to pay with credit card but it is not a 100% success due to few factors that will reject the transaction such as:
1. If the buyer uses a credit card that already attached to a PayPal account.
2. If the buyer uses an email that is already attached to a PayPal account.
3. If the buyer already attempts multiple time on the same credit card and they received a decline or incorrect information was entered. Then, the credit card will be blocked or put under risk from our end.
These are the reason of the error that your buyer is seeing. To resolve this, they would need to have/create a PayPal account or use a different credit card to make the purchase. Some other merchant they might have a Pro account which only available for US, Canada, New Zealand and Australia. You may refer to the link here.
https://developer.paypal.com/docs/classic/products/payflow-gateway/?mark=payflow%20country
They have to use a direct credit card integration.
thank you.
I created a PayPal account and also created a sandbox personal account as well as business account.
From business account api credentials I got username:111abc.org , pwd :111, signature:A--hhshshhhhshsss. Using these details from test accounts I Formatted my API requests '
define('API_USERNAME', '111abc.org');
define('API_PASSWORD', '111');
define('API_SIGNATURE', 'A--hhshshhhhshsss');
define('API_ENDPOINT', 'https://api-3t.sandbox.paypal.com/nvp');
define('PAYPAL_URL', 'https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token=');
when I logged into the paypal account in my site it shows for adding the credit card no:, I copied it from business account api credentials ,But it shows an error like this
This credit card has been denied by the bank that issued your credit card.
For details on why your card was denied, please contact your credit card issuer's customer service department. Or, you may want to try adding a different credit card.
How can I test my paypal with sandbox account?
Try using another test credit card number, you can generate these from the sandbox. Otherwise, I provided some test Visa credit card numbers below.
4024007128707576
4539805151652124
4539139443918832
4716590741304528
4929181369786890
4539585085827139
4024007104385751
4485728803730862
4716879534966209
4556279316725340
Im new in PayPal and I just want to ask, what is functional diference between API calls dononreferencedcredit and direct payment?
I understand it, that both send money to credit card, is it correct?
EDIT:
Is it possible to send money from my paypal account to credit/debit card or bank account of someone else using Paypal payments Standard? Or is it possible using PRO version? Exists any API or anything else for it?
DoDirectPayment takes money from a card and DoNonReferenceCredit issues a credit to a card.
In most cases you'd be more interested in DoDirectPayment and RefundTransaction, as the RefundTransaction API call will refund whatever type of transaction, charged via whichever funding source (be it card, bank, PayPal balance, et cetera).
DoNonReferencedCredit would only apply for a limited set of use cases; e.g. if you wish to disburse funds directly to someone's credit card. However, even this can already be handled by the MassPay API call where MassPay disburses it to the PayPal balance of the receiver, and the receiver can do with these funds as they please.
To me it seems that dononreferencedcreditissues credit to a card, while it's not being referenced in the original transaction. See this page for more information.
DoNonReferencedCredit is definitely the way to go if you do not want or do not have a reference to the original transaction. PayPal accounts do not allow NonReferenceCredits by default, you will have to contact business support to have this option enabled on your account.
You will receive the following error if NonReferenceCredits are not enabled on your account.
"Invalid merchant information: 10002-You do not have permissions to make this API call"