My paypal payment completed successfully but after payment,I don't get transaction detail like transaction id, currency, price, item,receipt no etc...
before 15 days its working properly. but now its not working.
<form target="paypal" action="https://www.sandbox.paypal.com/cgi-
bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="kin#kinskards.com">
<!-- Specify a PayPal Shopping Cart Add to Cart button. -->
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Birthday - Cake and
Candle">
<input type="hidden" name="amount" value="3.95">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="cancel_return"
value="http://localhost/PayPalDemo/PayPalDemoCancel.php">
<input type="hidden" name="return"
value="http://localhost/PayPalDemo/PayPalDemo/Succes.php">
<!-- Display the payment button. -->
<input type="image" name="submit"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_addtocart_120x26.png"
alt="Add to Cart">
<img alt="" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
</form>
You must pass notify_url parameter like cancel_return.
<input type="hidden" name="notify_url" value="http://localhost/PayPalDemo/PayPalDemoPayment.php" />
Also you must set this URL in sandbox account in IPN section. Refer this https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSimulator/
Related
I have this paypal button:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="myPayPalAccount#gmail.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="item-to-buy">
<input type="hidden" name="amount" value="5">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="return" value="mywordpressblog.com/return-url/">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="Pay Now">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
How can I get all the payment details in my return url (mywordpressblog.com/return-url/) which is a custom WordPress page?
I need at least to know if payment was successful or not and display a consequent message and make an update on the database.
Thanks in advance for your suggestions.
mywordpressblog.com/return-url/ --> only redirect to page successful so if you check detail payment after done can use IPN Paypal.
Document Dev on Paypal or other search
i have following problem.
I integrated Paypal to my website. Now I want to test the PayPal settings. I test it in the sandbox enviroment. So the paying is working very well and after the payment the site redirects to my success.php site.
and there i have a problem.
Normaly it should show something like mywebsite.de/success.php?tx=83437E384950D&st=Completed&amt=10.00&cc=USD&cm=&item_number=1
but it only shows
mywebsite.de/success.php
my code looks like this
paypalURL = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; //Test PayPal API URL
$paypalID = 'mywebsite#site.de'; //Business Email
<center><form action="<?php echo $paypalURL; ?>" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo $paypalID; ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="1 Monat Premium Mitgliedschaft">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="49.99">
<input type="hidden" name="currency_code" value="EUR">
<!-- Specify URLs -->
<input type='hidden' name='cancel_return' value='http://mywebsite.de/index.php'>
<input type='hidden' name='return' id='return' value='http://mywebsite.de/success.php/'>
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_buynowCC_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form></center>
What did I wrong hand how do i get the invformation of paypal for my success page??
Pass the rm variable with value as 2, refer the below:
<input type="hidden" name="rm" value="2">
Once you pass rm=2 then you will see the below variables after the buyer redirect to your website:
http://mywebsite.de/success.php/?amt=10.84&cc=USD&item_name=XXXXX&st=Completed&tx=XXXXXXX
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'm trying to set up a button that offers buyers the option of inserting multiples
of an item and forces them to enter a shipping address here's the code:
<form action="<?php echo($paypal_url); ?>" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo($paypal_email_address); ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo($item_name3); ?>">
<input type="hidden" name="amount" value="<?php echo($item_price3); ?>">
<input type="hidden" name="currency_code" value="<?php echo($item_currency3); ?>">
<input type="hidden" name="custom" value="<?php echo($mask); ?>">
<input type="hidden" name="undefined_quantity" value="1">
<input type="hidden" name="return" value="<?php echo($paypal_return); ?>">
<input type="hidden" name="notify_url"value="http://www.mywebsite.co.uk/ipn2.php">
<input type="hidden" name="cancel_return" value="<?php echo($cancel_return); ?>">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="2">
<!-- Display the payment button. -->
<input type="image" src="/img/PocketMask.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online." />
I'm in the process of testing it in the sandbox and the quantity option works fine but there doesn't appear to be an option for shipping address, if anyone could help me with this I'd really appreciate it.
The no_shipping variable determines whether or not you receive the shipping address with the transaction details after a payment completes. There isn't a shipping address field that would appear on the checkout page. The buyer would need to log into their account to select the shipping address to use to complete the payment.
Paypal have CUSTOM param in its API... I want multi-dimension array pass in CUSTOM field...
<form id="paypal_form" action="https://sandbox.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="user#paypal.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Hot Sauce-12 oz. Bottle">
<input type="hidden" name="amount" value="10">
<input type="hidden" name="currency_code" value="USD">
<!-- Prompt buyers to enter their desired quantities. -->
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="notify_url" value="http://www.myurl.com" />
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online" />
<input type="hidden" value="1" name="custom[]" />
<input type="hidden" value="11" name="custom[]" />
</form>
its working fine with single custom field but multi custom field is not working...
you should pass all values like 1,2,3,4,5,6....
return url you will get custom string and convert it to array of string