Forums

Using paypal example and paypal setup

ArnKor 12 Nov, 2015
Hello,

i followed the tutorials and used the paypal example to realise a payment. In order to do that a created a paypal account and two sandbox adresses.

Clicking my paypal link to purchase the product works well and all data is shown at my paypal account.

What i do not understand is:

Where do I configure the callback url for IPN? I just found a simulater which i do not know to configure as it seems not to work entering the following URL:
http://www.YOUR-DOMAIN.com/index.php?option=com_chronoforms&chronoform=FORM_NAME&event=ipn


Replacing the placeholder of course. Sending the IPN ends with: Handshake established but there is no data send via my configured email action...

What am I missing here?
GreyHead 13 Nov, 2015
Hi ArnKor,

If you are using ChronoForms v5 then the URL should include $option=com_chronforms5 - the 5 is missing in your URL.

You can set this either in your PayPal account - not recommended if you expect tot use more than one form. Or as notify_url parameter in the PayPal ReDirect or PayPal Pro action.

Bob
ArnKor 13 Nov, 2015
Hello Bob,

thanks for that hint. I missed the 5. I Also added it to Paypal Redirect - Trial action > advanced. As shown on the screenshot. To capture any answer from paypal I added an email action to every possible outcome. Please see also screenshot.

But still no answer from paypal after using the form and confirming the process in the paypal sandbox account. May be there is a syntax error in the paypal notify_url?

Thank you & kindest regards,
AK
GreyHead 14 Nov, 2015
Hi ArnKor,

I would always set the Notify URL in the form as that way it can be changed from form to form. As far as I can see you can't set an IPN Notify URL in the current Sandbox accounts. You can use the IPN Simulator though.

To check the response please add an email before the PayPal Listener action, address the email to yourself and add this code
<?php
echo'<div>$_POST: '.print_r($_POST, true).'</div>';
?>
You can add other things as well but that should dump into the email all of the data being returned from PayPal in the IPN request.

I believe that there may be a bug in the PayPal Listener that doesn’t correctly identify successful transactions from PayPal. You can test this by leaving all the PayPal Listener boxes empty and adding an email after the PayPal Listener with code like this to dump all of the form variables.
<?php
echo'<div>$form->data: '.print_r($form->data, true).'</div>';
?>


Bob
ArnKor 16 Nov, 2015
Hello Bob,

your explanation was helpful: I did what you suggested and received both email - before any action in IPN event and after all actions - the last email contains this output:
$form->data: Array ( [option] => com_chronoforms5 [chronoform] => ambiente-paypal [event] => ipn [payment_type] => instant [payment_date] => Mon Nov 16 2015 13:58:01 GMT-0200 (BRST) [payment_status] => Pending [address_status] => confirmed [payer_status] => verified [first_name] => John [last_name] => Smith [payer_email] => buyer@paypalsandbox.com [payer_id] => TESTBUYERID01 [address_name] => John Smith [address_country] => United States [address_country_code] => US [address_zip] => 95131 [address_state] => CA [address_city] => San Jose [address_street] => 123 any street [business] => seller@paypalsandbox.com [receiver_email] => seller@paypalsandbox.com [receiver_id] => seller@paypalsandbox.com [residence_country] => US [item_name] => something [item_number] => AK-1234 [quantity] => 1 [shipping] => 3.04 [tax] => 2.02 [mc_currency] => USD [mc_fee] => 0.44 [mc_gross] => 12.34 [mc_gross1] => 12.34 [txn_type] => web_accept [txn_id] => 632442010 [notify_version] => 2.1 [custom] => xyz123 [invoice] => abc1234 [test_ipn] => 1 [verify_sign] => AFcWxV21C7fd0v3bYYYRCpSSRl31A04A-Z.5BLCxY4m6rSepyjbM--8Q [ip_address] => 173.0.81.33 )


So this seems to work. What are the next steps? You said there may be a bug. How to implement DB save with the new informations now? How to decide there is a bug and how do i handle this in further implementation?

Thanks & kindest regards,
AK
GreyHead 16 Nov, 2015
Hi ArnKor,

Notice that the critical element here is [payment_status] => Pending That means that this payment has not been completed successfully yet. This isn't unusual and usually PayPal will re-check the IPN URL later to confirm success.

The question here is why is it showing Pending - is that what you set up in the SandBox?

Bob
ArnKor 18 Nov, 2015
Hello Bob,

thank you for your answer & your patience.

I think the paypal IPN simulater works fine: I changed the status type to << processed >> and it is showing the same field values in the email. Am I right?

And if I am right could you have a look on my other questions please:

What are the next steps? You said there may be a bug. How to implement DB save with the new informations now? How to decide there is a bug and how do i handle this in further implementation?

Thank you & kindest regards,
AK
GP 02 Dec, 2015
Good morning, I apologize for my English.

I have a problem with the process paypal chronofroms, that once made the payment not received the email with all and in form. I also used a totarial explaining this, and although I have taken all the steps is not working.

You can help me?
GreyHead 02 Dec, 2015
Hi GP,

How exactly do you have the PayPal parts of the form set up?

Bob
This topic is locked and no more replies can be posted.