Anybody having this problem? Suddenly paypal is not returning POST data to the notify_url. Array is completely empty and it happens when payment is made through new paypal checkout system.
Below is the final page after payment is made. When I click continue booking, it should have redirected to notify_url with POST data for validation and stuff but data is an empty array.
My request code is listed below. Can anybody please take a look at it and tell me whether some variable is missing or i am doing something wrong?
<form method="post" name="paypal_form" action="http://www.sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" name="business" value="ayaz.a_1286483626_biz#gmail.com" />
<input type="hidden" name="cmd" value="_xclick" />
<!-- the next three need to be created -->
<input type="hidden" name="return" value="https://system1.smanager.net/SM/lib/booking_system/response.php" />
<input type="hidden" name="cancel_return" value="https://system1.smanager.net/SM/lib/booking_system/paypal_ipn.php?cancelled=true" />
<input type="hidden" name="notify_url" value="https://system1.smanager.net/SM/lib/booking_system/response.php" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="lc" value="US" />
<input type="hidden" name="bn" value="toolkit-php" />
<input type="hidden" name="cbt" value="Continue Back to Booking System" />
<!-- Payment Page Information -->
<input type="hidden" name="no_shipping" value="" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="cn" value="Comments" />
<input type="hidden" name="cs" value="" />
<!-- Product Information -->
<input type="hidden" name="item_name" value="TestProduct" />
<input type="hidden" name="amount" value="10.23" />
<input type="hidden" name="quantity" value="1" />
<input type="hidden" name="item_number" value="1234" />
<input type="hidden" name="undefined_quantity" value="" />
<input type="hidden" name="on0" value="" />
<input type="hidden" name="os0" value="" />
<input type="hidden" name="on1" value="" />
<input type="hidden" name="os1" value="" />
<!-- Shipping and Misc Information -->
<input type="hidden" name="shipping" value="0.0" />
<input type="hidden" name="shipping2" value="" />
<input type="hidden" name="handling" value="" />
<input type="hidden" name="tax" value="6" />
<input type="hidden" name="custom" value="somedata" />
<input type="hidden" name="invoice" value="" />
<!-- Customer Information -->
<input type="hidden" name="first_name" value="ayaz" />
<input type="hidden" name="last_name" value="alavi" />
<input type="hidden" name="address1" value="Address" />
<input type="hidden" name="address2" value="" />
<input type="hidden" name="city" value="" />
<input type="hidden" name="state" value="abc" />
<input type="hidden" name="zip" value="" />
<input type="hidden" name="email" value="ayaz.a_1286483582_per#gmail.com" />
<input type="hidden" name="night_phone_a" value="" />
<input type="hidden" name="night_phone_b" value="" />
<input type="hidden" name="night_phone_c" value="" />
</form>
</body>
Thanks.
I have also face same problem.
Please set the following settings in Your business account.
In Website Payment Preferences
=> Auto Return: On
=> Set Return URL
=> Payment Data Transfer: On.
Please try this, this may help you.
All the best.
Kanji
Related
my php code generates html form which is submitting automatically with redirection of customers:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" name="vm_paypal_form" id="vmPaymentForm" accept-charset="UTF-8">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<input type="hidden" name="business" value="bolpav#example.com" />
<input type="hidden" name="custom" value="otmjboutim6sl98u6olis61nm7" /
><input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="return" value="http://example.com/devportal/index.php?option=com_virtuemart&view=vmplg&task=pluginresponsereceived&on=3L99030&pm=1&Itemid=166&lang=" />
<input type="hidden" name="notify_url" value="http://example.com/devportal/index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang=" />
<input type="hidden" name="cancel_return" value="http://example.com/devportal/index.php?option=com_virtuemart&view=vmplg&task=pluginUserPaymentCancel&on=3L99030&pm=1&Itemid=166&lang=" />
<input type="hidden" name="rm" value="1" />
<input type="hidden" name="bn" value="VirtueMart_Cart_PPA" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="image_url" value="http://example.com/devportal/images/virtuemart/vendor/" />
<input type="hidden" name="item_name" value="Order Number: 3L99030" />
<input type="hidden" name="lc" value="EN" />
<input type="hidden" name="a3" value="105" />
<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="srt" value="52" />
<input type="hidden" name="sra" value="1" />
<input type="submit" value="Please wait while redirecting to PayPal" />
</form>
After this form is submited i see page with order number, price and message : ". To complete your checkout using PayPal, please log in." After i click Login button then it redirects me to login page . But after i login then it open dasboard and forgets about payment . So payment procedure gets broken. I am using Sanbox business account for seller and sandbox personal account for customer. Can anybody help?
It seems to be a known issue at PayPal's end. The engineering team is working on this for a fix. Will update here once it gets fixed.
I am using PayPal standard payment and using following code.
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="quantity_1" value="1">
<input type="hidden" name="item_name_1" value="Sasha">
<input type="hidden" name="amount_1" value="545.71">
<input type="hidden" name="business" value="<merchant-email-id>">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="address_override" value="0">
<input type="hidden" name="custom" value="48">
<input type="hidden" name="first_name" value="test11">
<input type="hidden" name="last_name" value="test21">
<input type="hidden" name="email" value="<buyer-email-id>">
<input type="hidden" name="address" value="Santa clara">
<input type="hidden" name="city" value="Santa clara">
<input type="hidden" name="state" value="CA">
<input type="hidden" name="zip" value="95050">
<input type="hidden" name="country" value="USA">
<input type="hidden" name="phone" value="1023456789">
<input type="hidden" name="notify_url" value="<complete-url>" />
<input type="hidden" name="return" value="<complete-url>" />
<input type="hidden" name="cancel_return" value="<complete-url>" />
<input type="submit" value="Submit">
</form>
When I press submit and go to PayPal sandbox screen then it shows blank page. Is it under maintenance or there could be issue from my end. Few days earlier same above form was working but from last 3-4 days PayPal sandbox page showing blank.
I am not getting is it problem from my end or their end?
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="seller#designerfotos.com">
<input type="hidden" name="item_name" value="hat">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="15.00">
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Doe">
<input type="hidden" name="address1" value="9 Elm Street">
<input type="hidden" name="address2" value="Apt 5">
<input type="hidden" name="city" value="Berwyn">
<input type="hidden" name="state" value="PA">
<input type="hidden" name="zip" value="19312">
<input type="hidden" name="night_phone_a" value="610">
<input type="hidden" name="night_phone_b" value="555">
<input type="hidden" name="night_phone_c" value="1234">
<input type="hidden" name="email" value="jdoe#zyzzyu.com">
<input type="image" name="submit"
src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
alt="PayPal - The safer, easier way to pay online">
</form>
Link:- https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/
Note:- Please above link and use this form. And check results or check below form
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="seller#designerfotos.com">
<input type="hidden" name="item_name" value="Memorex 256MB Memory Stick">
<input type="hidden" name="item_number" value="MEM32507725">
<input type="hidden" name="amount" value="3">
<input type="hidden" name="tax" value="1">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="currency_code" value="USD">
<!-- Enable override of buyers's address stored with PayPal . -->
<input type="hidden" name="address_override" value="1">
<!-- Set variables that override the address stored with PayPal. -->
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Doe">
<input type="hidden" name="address1" value="345 Lark Ave">
<input type="hidden" name="city" value="San Jose">
<input type="hidden" name="state" value="CA">
<input type="hidden" name="zip" value="95121">
<input type="hidden" name="country" value="US">
<input type="image" name="submit"
src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
alt="PayPal - The safer, easier way to pay online">
</form>
Hi I am using paypal recurring subscription for my one opencart website
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="test#eyelook.com">
<input type="hidden" name="item_name_1" value="1 • DAY ACUVUE DEFINE with Lacreon">
<input type="hidden" name="item_number_1" value="1DAY-DEFINE-30">
<input type="hidden" name="amount_1" value="50.00">
<input type="hidden" name="quantity_1" value="1">
<input type="hidden" name="weight_1" value="50">
<input type="hidden" name="on0_1" value="RIGHT EYE">
<input type="hidden" name="os0_1" value=" ">
<input type="hidden" name="on1_1" value="Colour">
<input type="hidden" name="os1_1" value="Accent Style BLACK">
<input type="hidden" name="on2_1" value="Base Curve">
<input type="hidden" name="os2_1" value="8.5">
<input type="hidden" name="on3_1" value="Power">
<input type="hidden" name="os3_1" value="-0.00">
<input type="hidden" name="on4_1" value="Diameter">
<input type="hidden" name="os4_1" value="14.2">
<input type="hidden" name="on5_1" value="Subscription">
<input type="hidden" name="os5_1" value="Every 2 Months">
<input type="hidden" name="item_name_2" value="Shipping, Handling, Discounts & Taxes">
<input type="hidden" name="item_number_2" value="">
<input type="hidden" name="amount_2" value="3.00">
<input type="hidden" name="quantity_2" value="1">
<input type="hidden" name="weight_2" value="0">
<input type="hidden" name="currency_code" value="SGD">
<input type="hidden" name="first_name" value="Test Niyaz">
<input type="hidden" name="last_name" value="Hussain">
<input type="hidden" name="address1" value=" sdsdsds">
<input type="hidden" name="address2" value="">
<input type="hidden" name="city" value="dsdsd">
<input type="hidden" name="zip" value="121323">
<input type="hidden" name="country" value="NE">
<input type="hidden" name="address_override" value="0">
<input type="hidden" name="email" value="niyak2#gmail.com">
<input type="hidden" name="invoice" value="12898 - Test Niyaz Hussain">
<input type="hidden" name="lc" value="en">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="return" value="http://eyelookgood.com/index.php?route=checkout/success">
<input type="hidden" name="notify_url" value="http://eyelookgood.com/index.php?route=payment/pp_standard/callback">
<input type="hidden" name="cancel_return" value="http://eyelookgood.com/index.php?route=checkout/checkout">
<input type="hidden" name="paymentaction" value="sale">
<input type="hidden" name="custom" value="12898">
<input type="hidden" name="bn" value="OpenCart_2.0_WPS">
<input type="button" onclick="checkSubscription();" value="Confirm Order" class="btn btn-primary">
</form>
I have contacted the paypal guys. They said it's a setting issue. May I know what is the error in the above code? Please help me out for this issue please?
You must use in your html form parameters "p3" and "t3".
p3: Specify an integer value in the allowable range for the units of duration that you specify with t3.
t3: Regular subscription units of duration.
Allowable values are:D – for days; allowable range for p3 is 1 to 90W – for weeks; allowable range for p3 is 1 to 52M – for months; allowable range for p3 is 1 to 24Y – for years; allowable range for p3 is 1 to 5
Also the cmd parameter must be _xclick-subscriptions instead _cart
Follow this example:
<form method="post" name="formName" id="submitThisForm" action="https://www.paypal.com/cgi-bin/webscr" >
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="your#papypamail.com" />
<input type="hidden" name="item_name" value="Your Membership" />
<input type="hidden" name="a3" value="0.01">
<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="hidden" name="item_number" value="2" />
<input type="hidden" name="custom" value="SECURITYCODE" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="quantity" value="1" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="return" value="page going after payment" />
<input type="hidden" name="cancel_return" value="" />
<input type="hidden" name="cbt" value="ITEM DESCRIPTION" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="notify_url" value="your_listener_file.php" />
The allowable range for parameter "p3" is 1 to 24.
In your case must set
<input type="hidden" name="p3" value="1">
AND
<input type="hidden" name="t3" value="M">
It is appear you are not created a subscription button because the value="_s-xclick" is missing. For subscription button you shopuld specified below variable in your button code ;
<input type="hidden" name="cmd" value="_s-xclick">
You can have a reference here.
I am new in PayPal integration. I need monthly PayPal recurring payment for users. I already have instant payment working with this method:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" name="form_paypal" id="paypal_form">
<input type="hidden" name="amount" value="<?php echo $amount; ?>" />
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="lc" value="USA" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="business" value="test#gmail.com">
<input type="hidden" name="custom" value='<?php echo $custom;?>' />
<input type="hidden" name="first_name" value= "Anonymous" />
<input type="hidden" name="last_name" value="User" />
<input type="hidden" name="payer_email" value="customer#example.com" />
<input type="hidden" name="item_number" value="123" / >
<input type="hidden" name="item_name" value="test.co Services" / >
<input type="hidden" name="notify_url" value="http://test.co/pg_return.php" / >
<input type="submit" value="Pay" name="pay" id="paypal_submit">
</form>
What do I need to change to integrate recurring payment in my panel? Please help me! If needed I will provide more info!
Based on your example, here's how to set up subscription/recurring payment using the same method:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" name="form_paypal" id="paypal_form">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<input type="hidden" name="business" value="test#gmail.com">
<input type="hidden" name="a3" value="<?php echo $amount; ?>" />
<input type="hidden" name="t3" value="M" >
<input type="hidden" name="p3" value="1" >
<input type="hidden" name="src" value="1" >
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="lc" value="US" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="custom" value="<?php echo $custom;?>"/>
<input type="hidden" name="first_name" value= "Anonymous" />
<input type="hidden" name="last_name" value="User" />
<input type="hidden" name="item_number" value="123" / >
<input type="hidden" name="item_name" value="test.co Services" / >
<input type="hidden" name="notify_url" value="http://test.co/pg_return.php" / >
<input type="submit" value="Pay" name="pay" id="paypal_submit">
</form>
Note that I have made several changes. "a3" denotes the amount of subscription and "p3" indicates the unit of duration (that is, M = monthly, D = daily and so on). To make the subscription recurs indefinitely, set "src" and "p3" to 1.
For reference, you can read on PayPal documentation link here: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#id08A6HI00JQU
I have to submit this form to a payment processing gateway on my PHP page. All the credit card payment information will be taken on the next screen but the gateway needs the "HostedKey" and "Gateway_ID" need to be invisible from public code view as well.
<form action="nextpage.php" method ="POST" target="_blank">
Patient Account Number:
<input type="text" name="CustRefID" id="CustRefID">
<input type="hidden" name="HostedKey" id="HostedKey" value="ZZZZZZ" />
<input type="hidden" name="Gateway_ID" id="Gateway_ID" value="XXXXXX" />
<input type="hidden" name="IndustryCode" id="IndustryCode" value="2" />
<input type="hidden" name="Amount" id="Amount" value="" />
<input type="hidden" name="RecurringType" id="RecurringType" value="N" />
<input type="hidden" name="RecurringAmount" id="RecurringAmount" value="" />
<input type="hidden" name="CURL" id="CURL" value="back to my site" />
<input type="hidden" name="AVSRequired" id="AVSRequired" value="Y"/>
<input type="hidden" name="CVV2Required" id="CVV2Required"value="Y"/>
<input type="hidden" name="EmailRequired" id="EmailRequired" value="Y"/>
<input type="hidden" name="PostRspMsg" id="PostRspMsg" value="Y"/>
<input type="hidden" name="SECCode" id="SECCode" value="1" />
<input type="hidden" name="Descriptor" id="Descriptor" value="Online" />
<input type="Submit" name="Submit" id="Submit" value="Pay Online Now" />
</form>
I tried something like this. It hid the Key and ID but the form did not pass on the hidden session variables.
<strong>Patient Account Number: </strong>
<form action="nextpage.php" method"post">
<input type="text" name="CustRefID"/>
<input type="hidden" name="HostedKey" id="HostedKey" value="" />
<input type="hidden" name="Gateway_ID" value="<?php ($Gateway_ID); ?>" />
<input type="hidden" name="HostedKey" value="<?php ($HostedKey); ?>" />
<input type="submit" name="Submit" value="Submit" />
</form>
<?php
if (isset($_POST['Submit']))
{ $_session['CustRefID'] = $_POST['CustRefID'];}
{ $_session['HostedKey'] = $_POST['xxxxxx'];}
{ $_session['Gateway_ID'] = "zzzzzz";}
?>
<strong><? echo $_session['CustRefID'];?></strong>
Any help would be great. My programmer is out sick...
You have repetition in your HTML. Change it to this:
<input type="hidden" name="Gateway_ID" value="<?php ($Gateway_ID); ?>" />
<input type="hidden" name="HostedKey" value="<?php ($HostedKey); ?>" />
2. You didn't specify what POST info should go in the SESSION. Change it to this:
{
$_SESSION['CustRefID'] = $_POST['CustRefID'];
$_SESSION['HostedKey'] = $_POST['HostedKey'];
$_SESSION['Gateway_ID'] = $_POST['HostedKey'];
}