Thread Starter
SiKth
(@sikth)
Here is more information:
Here is a generated link:
https:/ /www.paypal.com/cgi-bin/webscr/?notify_url=https%3A%2F%2Fnldk.se%2F%3Fpage%3Dgf_paypal_ipn&charset=UTF-8¤cy_code=SEK&business=kontakt%40nl……..
Note the currency looks wrong, and when I change this to:
https:/ /www.paypal.com/cgi-bin/webscr/?notify_url=https%3A%2F%2Fnldk.se%2F%3Fpage%3Dgf_paypal_ipn&charset=UTF-8¤cy_code=SEK&business=kontakt%40nl……..
It works great! Hope this helps you to fix it, probably other have this issue. Let me know if I can assist more!
-
This reply was modified 8 years ago by
SiKth.
-
This reply was modified 8 years ago by
SiKth.
-
This reply was modified 8 years ago by
SiKth.
Thread Starter
SiKth
(@sikth)
Here is a solution. Finally.
In the file gravity-forms-payment-continue.php go to line 315 and find this function:
public function replace_merge_tags( $text, $form, $entry ) {
// Check that merge tag exists
if ( strpos( $text, $this->merge_tag ) === false ) {
return $text;
}
// Get the payment URL
$url = $this->get_payment_url($form, $entry);
// Replace the merge tag
$text = str_replace( $this->merge_tag, $url, $text );
return $text;
}
The $url outputs a link in the mail, if you put this link in a html it gets right.
Change line 323: $url = $this->get_payment_url($form, $entry);
To this: $url = '<a href="' . $this->get_payment_url($form, $entry) . '">Link to PayPal</a>';
This also look better 😉
Hope this helps someone!
-
This reply was modified 8 years ago by
SiKth.
Hey @sikth,
Your solution doesn’t change the generated URL, which comes straight from Gravity Forms. So if I had to guess, there was a Gravity Forms update that actually solved your issue!
That said, your solution definitely makes things prettier. I would still keep the plain URL in the email somewhere though, and not just in the a tag, for users who have an email client that blocks HTML.