• Resolved SiKth

    (@sikth)


    Hi,
    The link changes the currency to USD, when my page is in Swedish SEK. Any idea why? Also my Gravity Form settings is in SEK.

    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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&currency_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 6 years, 10 months ago by SiKth.
    • This reply was modified 6 years, 10 months ago by SiKth.
    • This reply was modified 6 years, 10 months 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 6 years, 10 months ago by SiKth.
    Plugin Author eclev91

    (@eclev91)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wrong currency’ is closed to new replies.