TOPIC:

Payment gateways 1 week 2 days ago #243515

  • Topic Author
  • Rokhi
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 60
  • Thanks: 1
Thanks for that info

Why would I not just build a common polipay response page within the BF set, populate response-specific wording in it from the if block and then move to the common polipay response page rather than passing the page number in via the URI? e.g., If cancelled, then introtext = "blahbla" and display common polipay response page.

And what is the recognised way to handle multiple pay options on something like an event application form. Should I dynamically change the submit button text on the application form to 'submit and pay by (insert method name - Polipay/Stripe/Paypal)' depending on a selection at the bottom of the form, or just process whatever payment method is chosen on submit. Or should the submit button take the applicant to a payments page within the BF application form package where they can choose a payment option and then select Pay now.

I know they are all options, just wondering if you know what is 'normal'

Please Log in or Create an account to join the conversation.

Payment gateways 1 week 1 day ago #243543

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9076
  • Karma: 167
  • Thanks: 737
You can of course pass the data to intro text.

You could replace the simple echos I did with some javascript that populates a div with an id in the page intro text.

The payment buttons themselves change the payment context.
So if you additionally have a paypal and stripe button, it would recognize it automatically based on where the user clicked on.

Except that you will have to disable your Poli Code in the begin submit piece if a different payment has been detected (since the poli implementation is a custom one).

To make your Poli integration work in the same way like PayPal and Strip, you can add a custom button and add a custom action to it like this:
ff_BUTTONNAME_action(element, action){
    document.getElementById('bfPaymentMethod').value='Poli';
    ff_validate_submit();
}

Replace BUTTONMAME with the name (not title) of your custom button.
This will basically populate the payment info and submit the form.

You can then check for the selected payment methode in the before form piece using ff_getSubmit:
if( ff_getSubmit('bfPaymentMethod') == 'Poli' ){
   
   // your poli code

}

Regards,
Markus
The following user(s) said Thank You: Rokhi

Please Log in or Create an account to join the conversation.

Payment gateways 3 days 8 hours ago #243869

  • Topic Author
  • Rokhi
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 60
  • Thanks: 1
is bfPaymentMethod a bf variable or a new hidden field?

Please Log in or Create an account to join the conversation.

Payment gateways 2 days 21 hours ago #243890

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9076
  • Karma: 167
  • Thanks: 737
It is a built-in variable as soon as you add a payment button to the form.

Please Log in or Create an account to join the conversation.

Payment gateways 5 hours 34 minutes ago #244121

  • Topic Author
  • Rokhi
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 60
  • Thanks: 1
If I just add a custom button for polipay, and no other payment elements, how does the form know to add bfPaymentMethod?

anyway - I added a stripe button, but bfPaymentMethod does not seem to be populated in the after submit or before form:

button action:
function ff_btnPoli_action(element, action)
{
    document.getElementById('bfPaymentMethod').value='Poli';
    ff_validate_submit();
   
} // ff_btnPoli_action

after submit:
print_r(ff_getSubmit('bfPaymentMethod')); // no value
print_r('test'); // prints

exit;

if( ff_getSubmit('bfPaymentMethod') == 'Poli' ){
print_r('Poli set'); /not fired
exit;
... etc poli code
before form:
if( ff_getSubmit('bfPaymentMethod') == 'Poli' ){// does not run
if( JRequest::getVar('poli_return', '') == 'true'  ){

Please Log in or Create an account to join the conversation.

Last edit: Post by Rokhi.

Payment gateways 1 hour 20 minutes ago #244128

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9076
  • Karma: 167
  • Thanks: 737
Hi,

sorry, please try:
// for setting
document.getElementById('bfPaymentMethod').value = 'Poli';

// for reading
if( JRequest::getVar('ff_payment_method', '') == 'Poli' ){

Regards,
Markus

Please Log in or Create an account to join the conversation.

Last edit: Post by TheMuffinMan.
Time to create page: 0.052 seconds

July Sale!

Discounts for all of our extensions + support. Ending July 31st!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!