fribse
  fribse
Contributor
  Tuesday, 10 January 2017
  11 Replies
  1.4K Visits
0
Votes
Undo
We've found a way to almost integrate with a payment method (mobilepay, which is huge in Denmark).
Via a URL, we can construct a URL that will make it start the app etc. as per their guidelines.
However, we have two problems.
1) The amount is in Danish Kroner, and that is assumed by the URL, so the Kr. that {BALANCE} returns together with the amount is not understood. We have changed the currency field to empty, but then it places a $ in the field.
2) The URL is to be encoded in a QR code, I have the QRCode Plant installed in Joomla, but it is apparently not triggered properly from the Attendance template found under Payments Config -> Manual -> Manual payment page layout.
8 years ago
·
#181436
Accepted Answer
0
Votes
Undo
ok - so what you want is for {BALANCE} to not include the currency code in its output? OR better still something like {RAWBALANCE} which doesn't include it.

add this at line c. 697 of administrator/components/com_rsvppro/libraries/attendeehelper.php

$message = str_ireplace("{RAWBALANCE}", $attendee->outstandingBalances['feebalance'], $message);

and
$ticketintro = str_ireplace("{RAWBALANCE}", $attendee->outstandingBalances['feebalance'], $ticketintro);
at line c. 1371 of administrator/components/com_rsvppro/libraries/jevrsvpparameter.php and similar changes for $tickettemplate and $ticketfooter in the same file.

then use {RAWBALANCE} where you don't need the currency symbol

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

8 years ago
·
#181397
0
Votes
Undo
Hello Frisbe,

In the php code you can do a str_replace see:
http://www.w3schools.com/php/func_string_str_replace.asp

to remove the kr or strip non numeric ones with preg_replace see:
http://stackoverflow.com/questions/4949279/remove-non-numeric-characters-exlcuding-periods-and-commas-from-a-string

So in the manual page, you want content plugins to run, is that right?

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

8 years ago
·
#181402
0
Votes
Undo
But it's a normal joomla text page, so how do I embed PHP code to remove the kr?
The QRCode Plant is a Joomla plugin.

It should activate the QRCode Plant plugin if the plugins were run on the manual page (it's a system plugin), and thus create the required QR code for the page.
8 years ago
·
#181431
0
Votes
Undo
I think we need a bit more context - have you created your own payment plugin for RSVP Pro or is this something that is being generated by javascript and system plugins?

\can you give us the code (or a screenshot) from where the KR is getting in the way?

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

8 years ago
·
#181433
0
Votes
Undo
I'm using the manual payment.

I've attached two images.
On the first, the currency field keeps getting filled in, so I have to delete it, every time I save the template.

On the second I have currently implemented it as a link, but what I would was to have this:
[qrcode]https://mobilepay.dk/da-dk/pages/betal.aspx?phone=0045XXXXXXXX&amount={BALANCE}&comment=Event:{EVENT}&lock=1[/qrcode]
Problem is, first, the QR CODE plugin is not run, and secondly that if the {BALANCE} gets currency integrated, the URL will not work.
8 years ago
·
#181436
Accepted Answer
0
Votes
Undo
ok - so what you want is for {BALANCE} to not include the currency code in its output? OR better still something like {RAWBALANCE} which doesn't include it.

add this at line c. 697 of administrator/components/com_rsvppro/libraries/attendeehelper.php

$message = str_ireplace("{RAWBALANCE}", $attendee->outstandingBalances['feebalance'], $message);

and
$ticketintro = str_ireplace("{RAWBALANCE}", $attendee->outstandingBalances['feebalance'], $ticketintro);
at line c. 1371 of administrator/components/com_rsvppro/libraries/jevrsvpparameter.php and similar changes for $tickettemplate and $ticketfooter in the same file.

then use {RAWBALANCE} where you don't need the currency symbol

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

8 years ago
·
#181450
0
Votes
Undo
Hey, that works perfectly!

Not really sure why, but the QRCode plugin also fires for the text now, and it makes it just perfect!

Can we PLEASE get this into the code :-)
8 years ago
·
#181465
0
Votes
Undo
The changes will be in the next release of RSVP Pro.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

8 years ago
·
#181488
0
Votes
Undo
THANKYOU!
  • Page :
  • 1
There are no replies made for this post yet.