5 users online. Create an account or sign in to join them.Users

Search

I have discovered a small issue with the code that reconciles the data return by PayPal with matching fields in the originating entry. I am trying to store the date data returned using a date field but it appears to only support text fields.

Has anyone updated the event.paypalpaymentsipn.php code to support different field types? Guessing I would need to check the field type (looks like this isn’t returned from SQL select) or just hack to match payment_date then edit:

$entry->setData($field['id'], array(
        'handle'    => Lang::createHandle($value),
        'value'  => $value
    )
);

Can I just not pass a handle for my date fields? Appreciate everyones help I haven't delved too deep into Symphony's inner workings.

hi all :)

i am currently trying to implement this in a site i am working on. i am having a problem comprehending the IPN feedback coming in ... not coming in ;)

Your IPN data must include an invoice field that matches an entry ID in your site otherwise the data will be discarded (this means when testing via the PayPal sandbox you'll have to manually set the invoice value).

where do i have to include the invoice field? in my form?

a currently have this form

<form method="post" action="" enctype="multipart/form-data">
  <input name="MAX_FILE_SIZE" type="hidden" value="5242880" />

  <input name="fields[amount]" type="hidden" value="3" />
  <input name="fields[customer]" type="hidden" value="37" />

  <input name="paypal-payments[cmd]" value="_xclick" type="hidden" />
  <input name="paypal-payments[notify_url]" value="{$root}/confirm/" type="hidden" />
  <input name="paypal-payments[amount]" value="amount" type="hidden" />
  <input name="paypal-payments[currency_code]" value="EUR" type="hidden" />

  <input name="action[save-order]" type="submit" value="Submit" />
</form>

which saves an entry in the order section and redirects to the paypal site. this is all going well and i can finish the transaction (all in the sandbox). but this is not logged under Paypal Payments.

If I use the "Instant Payment Notification (IPN) simulator" from the sandbox, and provide an entry id in "Advanced and custom information - > invoice", this gets saved to the logs.

I am lost. Maybe someone has had the same problem and can point my error out.

thanks a lot!
daniel

ah... when you try for hours its almost always something simple *g notify-url did not point to the right page because its a subpage in this setup.

thanks anyways.

p.s. another thing i am wondering. is there a way to redirect the user back to the site after he finishes his transaction on the paypal site?

thanks!
daniel

ok, i'm sorry guys! i rtfm now and redirecting from paypal should be no problem with the return parameter.

thanks
daniel

How did you get notify-url to work? Currently I have to rely on the user to return to the screen with the following code.

<input name="paypal-payments[return]" value="{$root}/register/" type="hidden" />
<input name="paypal-payments[rm]" value="2" type="hidden" />

I had the following code set up, but I never got the date back. paypal was just a hidden page.

<input name="paypal-payments[notify_url]" value="{$root}/paypal/" type="hidden" />

hi koolaid,

i don't really know if i understand you correctly. seems to me you did everything right already.

the url you provide with notify_url is just the page IPN data is sent to. to redirect a user back from paypal to your site you need to specify a return url and allow automatic redirects from your paypal account.

  • login to paypal
  • go to my profile
  • seller options
  • website payment options
  • automatic redirects

the options may be named slightly different. i have a german account so had to translate ;)

cheers
daniel

azzagazz,

I can get the automatic redirects to work by changing the settings in my paypal account. I also enabled the IPN piece and set my notification url to "{$root}/paypal/"(this page is hidden which shouldn't make a difference, it just doesn't show in the navigation)

In my settings in symphony I just have a blank page with the "PayPal Payments: Save IPN data" event enabled on that page. Is there something I am missing? I have tried both the IPN tester in the developer tools section as well as using the sand box to fill out a transaction on my website.

The only way for me to get transaction page to populate with IPN data is to rely on the user being redirected back to one of my pages and to have the option rm = 2, which will have paypal post data to the redirection page.

Thanks,

Mike

Nevermind its working now for some reason...

Hello,

what does mean Paypal Country in the preferences block? I see UK Australia and USA. I reside in Italy and would use PP mainly for local residents, is it possible?

Thanks...

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details