I have been searching and reading up about this issue for hours now and I do not have a clue why no one has an answer to this apart from changing the provider etc which is not wanted.
I also found this Paypal Sandbox recurring payment with initial amount pending
which is the exact same issue that i have right now and there seems to be someone called "PayPal_Patrick " who replied to that question but they've removed all their comments for some reason!
any way, I am just trying to figure out why the first initial paypal recurring payment shows as pending!
I get the IPN response and my IPN enters the data into mysql database as it should but the payment status shows as pending!
when I look into the paypal sandbox account, I see the payment status as pending too. so there must be something that stops the paypal to create the recurring profile immediately!
here is my simple form that will allow the user to create a recurring payment:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="mysandboxemail#gmail.com">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="cbt" value="Return to The Store">
<input type="hidden" name="cancel_return" value=" <?php echo $actual_link ?>">
<input type="hidden" name="custom" value="This is a custom field!!!">
<input type="hidden" name="item_name" value="ACCOUNT UPGRADE">
<input type="hidden" name="a3" value="5.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
could someone please help me out with this issue?
Thanks
Here it is for future reference:...
All you have to do is to change the settings of your Paypal account so it accepts payment from all currencies.
Related
I'm doing my project with laravel 5 and here I have to do payment with paypal. I got this code and doing well with my payments. But when someone goto paypal and if he return without doing payment cancel_return works.It's fine. But I don't know how to handle the $_GET when return Here is my route also
Route::get('/paypal/cancel','Paypal\PaypalController#paypalCancel');
I'm using this code to move to paypal page with my sandbox account.
form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="paypal">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="cbt" value="Return to example" />
<input type="hidden" name="business" value="xxx#gmail.com" />
<input type="hidden" name="item_name" value="{{$data['p_name']}}" />
<input type="hidden" name="amount" value="{{$data['tot']}}">
<input type="hidden" name="button_subtype" value="services" />
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="return" value="{{url('/paypal/return')}}" />
<input type="hidden" name="notify_url" value="{{url('/paypal/notify')}}"/>
<input type="hidden" name="cancel_return" value="{{url('/paypal/cancel')}}" />
<input type="hidden" name="currency_code" value="USD"/>
<input type="hidden" name="image_url" value="" />
<input type="hidden" id="custom" name="custom" value="{{$data['id']}}"/>
<input type="hidden" class="btn btn-primary" style="width:100%" alt="PayPal - The safer, easier way to pay online!"/>
</form>
Just tell me what should I have do when user cancel his payment in paypal login and return..Thanks..
If a user cancels payment in PayPal, the next action is up to you. You can either display a "Payment was canceled" page to inform the user that they canceled the payment, or you can prompt them to try payment again.
The cancel_return URL is purely there so developers can show a friendly message when payment has been canceled.
We are facing some issue with paypal business account, under sandbox everything is working fine, bellow is the form we are using for live:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" id="paypalForm">
<input type="hidden" value="_xclick" name="cmd">
<input type="hidden" value="email#email.com" name="business">
<input type="hidden" value="1" name="quantity">
<input type="hidden" value="website" name="item_name">
<input type="hidden" value="MDAW" name="item_number">
<input type="hidden" value="0.3" name="amount">
<input type="hidden" value="0" name="shipping">
<input type="hidden" value="http://www.website.com/ipn.php" name="notify_url">
<input type="hidden" value="USD" name="currency_code">
<input type="hidden" value="http://website.com/orderconfirm.php" name="return">
<input type="hidden" value="12" name="custom"> <a class="btn btn-primary" href="selectpixel.php"><i class="fa fa-angle-double-left"></i> Back</a>
<button id="btnOrderForm" class="btn btn-success" type="button">Make Payment via PayPal</button>
</form>
Bellow is the IPN URL where we are receiving custom values correctly while go through sandbox:
http://www.website.com/ipn.php
But we're not sure what is happening with live paypal, we are not able to go back to our site and not even receive custom variable on ipn.php file even after successful transaction.
IPN url is same as sandbox and other then that everything is same.
When the user clicks a 'pay now' button, that will redirect you on paypal and then from payal after payment it messed in case of live paypal transaction, the user can pay successfully but it is not returing back to website and IPN is not hit back to http://website.com/ipn.php url for updating information.
Firstly, your link (http://www.website.com/ipn.php) showing "HTTP 404 - File not found" when access. So, you are quested to modify this page to the available one. You can go to the link (https://github.com/paypal/ipn-code-samples) for PayPal's latest IPN sample code, and then update accordingly to your IPN script page.
Secondly, you can refer to the link (https://developer.paypal.com/docs/classic/button-manager/integration-guide/ButtonManagerHTMLVariables/?mark=html) for the HTML variable for PayPal button. The variable "return" is for the function to redirect your customers to a page after they finish the payment. The variable "notify_url" is designed for PayPal IPN which is for the function to notify the back end of your web server about the transaction information. You can go to the link below for the detais about PayPal IPN (https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/)
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="email#email.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Test_Item">
<input type="hidden" name="item_number" value="MDAW">
<input type="hidden" name="amount" value="0.3">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="return" value="http://website.com/orderconfirm.php">
<input type="hidden" name="notify_url" value="http://website.com/orderconfirm.php">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="cn" value="Add special instructions to the seller">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="weight_unit" value="lbs">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
I am developing online store application with Laravel 4.2 + Knockoutjs and I want to make test payments with paypal. So I have created new Paypal Sandbox account. Then I login and go to Dashboard->Accounts where I created buyer and seller accounts: test-facilitator#gmail.com and test-buyer#gmail.com. Following this documentation https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/ this is my form:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<fieldset>
<input id="buy" name="submit" type="submit" class="btn btn-primary" value="Buy" id="">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="test-facilitator#gmail.com">
<input type="hidden" name="item_name" value="My online store">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="amount" data-bind="value: amount">
<input type="hidden" name="notify_url" value="my_notify_url">
<input type="hidden" name="return" value="my_return_url">
<input type="hidden" name="cancel_return" value="my_cancel_url">
</fieldset>
</form>
So I am clicking the button, redirected to paypal and I am trying to login with my test-buyer#gmail.com with the password I have set in the sandbox account. And here is the problem - Paypal says that my credentials are wrong. How should I proceed my test payment, what am I doing wrong ?
The problem is that your form action is posting to https://www.paypal.com/....
Your action url should be https://www.sandbox.paypal.com/cgi-bin/webscr
I'm adding PayPal to my checkout form. Rather than using the API, I just use a form script. However, I'm not getting the response variables from PayPal after the payment has been made. I would like to confirm the amount of money I received to see if the user has paid the amount he should've paid.
Since I dont receive the response variables from paypal, I cannot see whether the user has indeed paid the good amount of money. Am I doing something wrong? I see alot of people have problems with it and none of them had the answer.
My form:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" >
<input type="hidden" name="business" value="seller#seller.com">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="item_name" value="<?php echo $_amount_credits ?> credits">
<input type="hidden" name="item_number" value="<?php echo $_invoice_id ?>">
<input type="hidden" name="amount" value="<?php echo $_total_amount ?>">
<input type="hidden" name="lc" value="NL">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cbt" value="Go back to http://domain.com">
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="return" value="http://domain.com/index.php?payment=success&transaction_id=<?php echo $_GET['tx'] ?>"/>
<input type="hidden" name="cancel_return" value="http://domain.com/index.php?payment=canceled&transaction_id=<?php echo $_GET['tx'] ?>"/>
<input type="submit" class="button blue _quick_order_overview _payment_paypal" name="submit" value="Pay via PayPal">
</form>
You should use Instant Payment Notification (IPN) for this sort of thing. There are lots of good templates for this available on GitHub/Packagist, etc.
IPN will POST transaction data to a listener script you have setup on your server any time a transaction happens on your PayPal account. This would be for payments, refunds, disputes, cleared e-checks, etc. You can automate all sorts of tasks based on the different txn_type's that IPN sends you.
Here is my paypal buy now html code:
<form name="_xclick" action="https://www.paypal.com/ca/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="alex#xumanii.com">
<input type="hidden" name="item_name" value="Bewolf Shooping Cart">
<input type="hidden" name="amount" value="<? echo $grandtotal2;?>">
<input type="hidden" name="add" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="member_id" value="<? echo $info['member_id'];?>">
<input type="hidden" name="return" value="http://www.bewolfclothing.com/thankyou.php">
<input type="hidden" name="notify_url" value="http://www.bewolfclothing.com/notify_paypal2.php">
<input type="hidden" name="cancel_return" value="http://www.bewolfclothing.com/mycart.php">
<input type="hidden" name="undefined_quantity" value="0">
<div class="submit-container"><input class="submit-button" type="submit" name="submit" value="CHECK OUT" /></div>
</form>
In my paypal account, under profile, my selling tools, I have set the AUTO RETURN to ON and I put the thankyou page in there.
After the purchase, it goes to the thankyou page, but the $_REQUEST['tx'] for the paypal transaction ID is not working and the notify_url NEVER gets called.
I searched online and saw that lots of people seem to have trouble with that, but I couldn't find a solution.
notify_url is used to Instant Payment Notification and the url should always be a live URL.
To get the tx ID, you need to
-Auto Return is set to ON
-Valid Return URL
-Payment Data Transfer is set to ON
and in your "http://www.bewolfclothing.com/thankyou.php"
$tx_id = $_GET['tx']; //gives you tx id