I'm creating an online shop and all seems to be good but my specified notify_url seems to not get called after the payment succeeded.
<?php
echo "
<form action='https://www.sandbox.paypal.com/cgi-bin/webscr' method='post'>
<input type='hidden' name='charset' value='utf-8'>
<input type='hidden' value='$price' name='amount' />
<input name='currency_code' type='hidden' value='EUR' />
<input name='shipping' type='hidden' value='0.00' />
<input name='tax' type='hidden' value='0.00' />
<input name='return' type='hidden' value='$nddaff/refill.php' />
<input name='cancel_return' type='hidden' value='$nddaff/refill.php' />
<input name='notify_url' type='hidden' value='http://domain.com/validationpaypal.php' />
<input name='cmd' type='hidden' value='_xclick' />
<input name='business' type='hidden' value='test-facilitator#gmail.com'/>
<input name='item_name' type='hidden' value='$name' />
<input name='custom' type='hidden' value='id=$id&type=$type' />
<input name='lc' type='hidden' value='FR' />
<input name='bn' type='hidden' value='PP-BuyNowBF' />
<input name='sub' value='Buy Now - $price"."€' type='submit' /></form>";
?>
Answer :
There were a bug in paypal sandbox yesterday, all works fine today !
Thanks all for helping !
Related
I have an issue with making PayPal sandbox payments. Whenever I try to make a payment it requires me to log into the buyer account, but when I do log in I get redirected to the buyer profile page. If I then try to repeat the payment again, it still asks me to log in and if I do login I once again get redirected to the buyer profile page.
The payments were working fine a day or two ago on a test server that hasn't had anything changed on it since then. I tried clearing cookies and going incognito as recommended by some people, but that didn't seem to help.
Has anyone else encountered this issue?
In answer to myself it seems that it's a problem with PayPal sandbox which is broken and nobody cares about it at PayPal!!! I waste 3 days on this problem. Grrrr
I also found this: https://www.paypal-community.com/t5/About-Business/Paypal-redirect-issue/m-p/1242652
AND this: https://www.paypal-community.com/t5/About-Payments/Something-change-with-paypal-sandbox-donations/m-p/1246095#M97864
I am seriously looking for an alternative to PayPal to manage my subscriptions buttons. Does anyone have any suggestions?
Best Regards,
HB
I Have the same issue with a subscription button... What's going on with PayPal?
My code is as follows:
<form action='https://www.sandbox.paypal.com/cgi-bin/webscr' method='post' target='_top'>
<input type='hidden' name='business' value='example-facilitator#example.com' />
<input type='hidden' name='cmd' value='_xclick-subscriptions' />
<input type='hidden' name='country' value='UK' />
<input type='hidden' name='no_note' value='1' />
<input type='hidden' name='charset' value='utf-8' />
<input type='hidden' name='lc' value='UK' />
<input type='hidden' name='no_shipping' value='1' />
<input type='hidden' name='sra' value='1' />
<input type='hidden' name='src' value='1' />
<input type='hidden' name='modify' value='0' />
<input type='hidden' name='usr_manage' value='0' />
<input type='hidden' name='invoice' value='INV-L1-2000002-1498316504' />
<input type='hidden' name='item_number' value='pln-l1s0p0' />
<input type='hidden' name='p3' value='1' />
<input type='hidden' name='t3' value='M' />
<input type='hidden' name='rm' value='0' />
<input type='hidden' name='return' value='http://www.example.com' />
<input type='hidden' name='cancel_return' value='http://www.example.com' />
<input type='hidden' name='shopping_url' value='http://www.example.com' />
<input type='hidden' name='item_name' value='Monthly subscription: Basic Plan' id='item_name-basic-monthly' />
<input type='hidden' name='currency_code' value='GBP' />
<select name='a3' id='a3-basic-monthly' style='font-size:110%;'>
<option value='5.00'>5.00 GBP (no options)</option>
<option value='9.80'>+ Options: 9.80 GBP</option>
</select>
<input style='width:170px; height:40px;' type='image' src='https://www.paypal.com/en_GB/i/btn/btn_subscribe_LG.gif' border='0' name='submit' alt='Purchase with PayPal' />
<img alt='' border='0' src='https://www.paypalobjects.com/en_GB/i/scr/pixel.gif' width='1' height='1' />
</form>
Best Regards,
HB
I have integrated below test php code to integrate gtpay payment in my site.But I am getting following error.
Response Description: Interface Integration Error
It is has key related problem given in the below gtpay integration manual.
https://ibank.gtbank.com/gtpay/IntegrationAPI/mman-tech.html
But I have tried several time to resolve this issue but not getting any solution. Please find the error.
<?php
$the_key = trim('17'.'5664879896'.'200'.'840'.'458742'.'D3D1D05AFE42AD50818167EAC73C109168A0F108F32645C8B59E897FA930DA44F9230910DAC9E20641823799A107A02068F7BC0F4CC41D2952E249552255710F');
$key = hash('sha512',$the_key,false);
?>
<form name="submit2gtpay_form" action="https://ibank.gtbank.com/GTPay/Tranx.aspx" target="_self" method="post">
<!-- <input type="hidden" name="hashkey" value="">-->
<input type="hidden" name="gtpay_mert_id" value="17" />
<input type="hidden" name="gtpay_tranx_id" value="5664879896" />
<input type="hidden" name="gtpay_tranx_amt" value="200" />
<input type="hidden" name="gtpay_tranx_curr" value="840" />
<input type="hidden" name="gtpay_cust_id" value="458742" />
<input type="hidden" name="gtpay_cust_name" value="Test Customer" />
<input type="hidden" name="gtpay_tranx_memo" value="Mobow" />
<input type="hidden" name="gtpay_no_show_gtbank" value="YES" />
<input type="hidden" name="gtpay_echo_data" value="TEST" />
<input type="hidden" name="gtpay_gway_name" value="" />
<input type="hidden" name="gtpay_hash" value="<?php echo trim($key); ?>" />
<input type="hidden" name="gtpay_tranx_noti_url" value="" />
<input type="submit" value="Pay Via GTPay" name="btnSubmit"/>
<input type="hidden" name="gtpay_echo_data" value="">
</form>
You are required to make the hash of [gtpay_mert_id,gtpay_tranx_id,gtpay_tranx_amt,gtpay_tranx_curr,gtpay_cust_id,gtpay_tranx_noti_url,hashkey] (Total 7 params).
You are making the hash key with only 6 params. You missed with the gtpay_tranx_noti_url(gtpay transaction notifying URL).
The gtpay_tranx_noti_url is a required field.
<?php
$the_key = trim('17'.'5664879896'.'200'.'840'.'458742'.'YES'.'D3D1D05AFE42AD50818167EAC73C109168A0F108F32645C8B59E897FA930DA44F9230910DAC9E20641823799A107A02068F7BC0F4CC41D2952E249552255710F');
$key = hash('sha512',$the_key,false);
?>
<form name="submit2gtpay_form" action="https://ibank.gtbank.com/GTPay/Tranx.aspx" target="_self" method="post">
<!-- <input type="hidden" name="hashkey" value="">-->
<input type="hidden" name="gtpay_mert_id" value="17" />
<input type="hidden" name="gtpay_tranx_id" value="5664879899" />
<input type="hidden" name="gtpay_tranx_amt" value="200" />
<input type="hidden" name="gtpay_tranx_curr" value="840" />
<input type="hidden" name="gtpay_cust_id" value="458742" />
<input type="hidden" name="gtpay_cust_name" value="Test Customer" />
<input type="hidden" name="gtpay_tranx_memo" value="Mobow" />
<input type="hidden" name="gtpay_no_show_gtbank" value="YES" />
<input type="hidden" name="gtpay_echo_data" value="TEST" />
<input type="hidden" name="gtpay_gway_name" value="" />
<input type="hidden" name="gtpay_hash" value="<?php echo trim($key); ?>" />
<input type="hidden" name="gtpay_tranx_noti_url" value="" />
<input type="submit" value="Pay Via GTPay" name="btnSubmit"/>
<input type="hidden" name="gtpay_echo_data" value="">
</form>
Its worked if error in gtpay_tranx_id duplicate entry...
Just change any value and reload it.
I've got a paypal form to request a payment that I'm testing in www.sandbox.paypal.com.
It works as I expect, except for tax and shipping costs, that are ignored and not shown in paypal cart and not computed in cart total amount.
In this case I only have one product, but buyers can add more products to their carts.
I can't understand where I'm going wrong.
<form method="post" name="paypal_form" action="https://www.sandbox.paypal.com/cgi-bin/webscr">
<input type='hidden' name='cmd' value='_cart'>
<input type='hidden' name='business' value='myEmail'>
<input type='hidden' name='charset' value='utf-8'>
<input type='hidden' name='currency_code' value='EUR'>
<input type='hidden' name='notify_url' value='http://mysite/shop/ipn_url.php'>
<input type='hidden' name='custom' value='xxxaasxdfd'>
<input type='hidden' name='return' value='http://mysite/shop/confirm_url.php'>
<input type='hidden' name='lc' value='IT'>
<input type='hidden' name='email' value='buyer#mysite'>
<input type='hidden' name='first_name' value='Test name'>
<input type='hidden' name='last_name' value='Test surname'>
<input type='hidden' name='zip' value='00000'>
<input type='hidden' name='no_note' value='1'>
<input type='hidden' name='cbt' value='Return to mysite'>
<input type='hidden' name='rm' value='2'>
<input type='hidden' name='cancel_return' value='http://mysite/shop/cancel_url.php'>
<input type='hidden' name='upload' value='1'><input type='hidden' name='amount_1' value='129.00'>
<input type='hidden' name='item_name_1' value='23-PROD11'>
<input type='hidden' name='item_number_1' value='120'>
<input type='hidden' name='tax' value='39.37'>
<input type='hidden' name='shipping' id='shipping' value='67.87'>
</form>
I found that the VAT and the shipping cost are visible and computed if I pass them for every single item in my cart.
<input type='hidden' name='shipping_1' id='shipping' value='67.87'>
<input type='hidden' name='tax_1' value='39.37'>
I've charged them on the first item as shipping_1 and tax_1 in the cart for all my items, in this way I'm sure that it will work for cart with one or more items.
I'm confounded why this won't work - the first select works, the second one doesn't. The first one though, does not provide any textual info about the selection.
<form action='https://www.sandbox.paypal.com/cgi-bin/webscr' method='post'>
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='business' value='payments#site.com'>
<select name='os0'>
<option value='25€ Individual'>Individual rate - 25€</option>
<option value='75€ Group'>Agency rate - 75€</option>
</select>
<input type='hidden' name='option_index' value='0'>
<input type='hidden' name='option_select0' value='25€ Individual'>
<input type='hidden' name='option_amount0' value='25.00'>
<input type='hidden' name='option_select1' value='75€ Group'>
<input type='hidden' name='option_amount1' value='75.00'>
<input type='hidden' name='currency_code' value='EUR'>
<input type='hidden' name='return' value='http://www.site.com/backtoyou/'>
<input type='submit' value='Pay with PayPal!'>
<img alt='' border='0' src='https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif' width='1' height='1'>
</form>
I am do not know .php at all but have a problem on one of my websites.
1. There are 2 forms for payment processing on a single page.
2. Each form has a separate submit button.
The problem.
I need to pass some of the user input from form one on to form two.
Note. this is on the same page.
Form 1
<input type="hidden" name="payfast_url" id="payfast_url" value="https://www."/>
<input type="hidden" name="merchant_id" id="merchant_id" value="xxxxx"/>
<input type="hidden" name="merchant_key" id="merchant_key" value="xxxxx"/>
<input type="hidden" name="return_url" id="return_url" value="payment_finished.html"/>
<input type="hidden" name="cancel_url" id="cancel_url" value="payment_cancelled.html"/>
<input type="hidden" name="notify_url" id="notify_url" value="/payment_notify.html"/>
<input type="hidden" name="item_name" id="item_name" value="Product name"/>
<input type="hidden" name="item_description" id="item_description"value="description"/>
<input type="hidden" name="email_confirmation" id="email_confirmation" value="1"/>
<input type="hidden" name="confirmation_address" id="confirmation_address" value=""/>
<input type="hidden" name="amount" id="amount" value="price" />
<input type="hidden" name="payment_id" id="payment_id" value="website_sales" />
<span class="formlable">Name</span><input name="name_first" id="name_first"type="text" value="" class="forminput"/>
<span class="formlable">Surname</span> <input name="name_last" id="name_last" type="text" value="" class="forminput"/>
<span class="formlable">E-Mail</span> <input type="text" name="email_address" id="email_address" value="" class="forminput"/>
<span class="formlable">Post Address</span> <input name="custom_str1" id="custom_str1" type="text" value="" class="forminput"/>
<span class="formlable">City</span><input name="custom_str2" id="custom_str2" type="text" value="" class="forminput"/>
<span class="formlable">Postal Code</span><input name="custom_str3" id="custom_str3" type="text" value="" class="forminput"/>
<input type="button" value="EFT Payment" onclick="quickPostPaymentToPayFast(document.getElementById('payfast_url').value);" id="button" method="post"/>
Form 2
<form name="CreditCards" action="https://www.mygate.co.za/.cfm" method="post"/>
<input type="hidden" name="Mode" id="Mode" value="0"/>
<input type="hidden" name="txtMerchantID" id="txtMerchant" value="xxxxxxx"/>
<input type="hidden" name="txtApplicationID" id="txtApplicationID" value="xxxxxxxx"/>
<input type="hidden" name="txtMerchantReference" id="txtMerchantReference" value="1234"/>
<input type="hidden" name="txtPrice" id="txtPrice" value="1234"/>
<input type="hidden" name="txtCurrencyCode" id="txtCurrencyCode" value="ZAR"/>
<input name="txtRedirectSuccessfulURL" value="success_failure.php" readonly="true" type="hidden"/>
<input name="txtRedirectFailedURL" value="success_failure.php" readonly="true" type="hidden"/ >
<input type="hidden" name="txtQty" id="txtQty" value="1"/>
<input type="hidden" name="txtItemDescr" id="txtItemDescr" value="descr"/>
<input type="hidden" name="txtItemAmount" id="txtItemAmount" value="449.00"/>
<input type="hidden" name="txtRecipient" value="<?php $_POST["name_first"]; ?>"/>
<input type="hidden" name="txtShippingAddress1" value="<?php $_POST["name_last"]; ?>"/>
<input type="hidden" name="txtShippingAddress2" value="<?php $_POST["email_address"]; ?>"/>
<input type="hidden" name="txtShippingAddress3" value="<?php $_POST["custom_str1"]; ?>"/>
<input type="hidden" name="txtShippingAddress4" value="<?php $_POST["custom_str2"]; ?>"/>
<input type="hidden" name="txtShippingAddress5" value="<?php $_POST["custom_str3"] ?>"/>
<input type="submit" id="button4" value="Credit card" />
</form>
name_first
name_last
email_address
custom_str1
custom_str2
Custom-str3
from the first form must be transfered into the second form as well
thanks
You should think of using some client-side JavaScript. I'd recommend using jQuery.
Not sure whether you have any experience in JS but that won't be very complex.
Basically, all you have to do is:
1) Read the value of the first input
email = $('#email_address').val()
2) Assign it to the other field (not sure what fields you want to assign)
$('#txtShippingAddress2').val(email)
Then just bind this code to your submit button or anywhere you need it.
You can find out more about jQuery at http://jquery.com/