TOPIC:

Re:How to Use PayPal with Classic Forms 12 years 1 week ago #8574

  • iamwaggle
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 2
  • Thanks: 2
Hey! I figured it out myself! I hope this helps someone! ~Justin

Put Ken's code above in the "After Submit" area instead of the "Before Submit" area in the "Edit Form" section under the "Submit Pieces" tab. Set your return URL to something like this:
http://YOURSITEHERE.com/index.php?option=com_facileforms&ff_name=arcRNEW12&ff_page=1&Itemid=$this->record_id.
If you want a thank you page, add a page to the form and change the $ff_page here to 2.

Put the following code in the "Before Form" area under the "Form Pieces" tab.
if(!$_REQUEST['tx'] == ''){

if ($_REQUEST['test'] == 1){
$test = 1;
}else{
$test = 0;
}

$time_offset ="0"; // Change this to compensate for timezone differences (-3 = -3 hours)
$time_a = ($time_offset * 60 * 60);
$datetime = date("Y-m-d H:i:s",time() + $time_a);


$this->execPieceByName('ff_InitLib');

    ff_query(
        "update `#__facileforms_records` ". 
        "SET " . 
        "`paypal_tx_id` = 'PayPal: " . $_REQUEST['tx'] . "', ".
        "`paypal_payment_date` = '" .  $datetime . "', ".
        "`paypal_testaccount` = '" . $test . "' " . 
        "WHERE `id`=" . $_REQUEST['Itemid'] . " AND `paypal_tx_id`='' " .
        "LIMIT 1" 
    );
}
The following user(s) said Thank You: wartime

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

Last edit: Post by iamwaggle.

Re:How to Use PayPal with Classic Forms 12 years 1 week ago #8583

  • Topic Author
  • arc_admin
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 22
  • Thanks: 4
Hi rewing,

Apologies, but my test site is cluttered enough without installing 'guest packages'.

If you describe the problem in detail perhaps I can help, or maybe someone else will have an idea. Or, I'll be happy to have a look on your own site if you give me credentials to look (I'm not a mad hacker, don't worry).

Cheers,
Ken
The following user(s) said Thank You: wartime

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

Re: How to Use PayPal with Classic Forms 9 years 8 months ago #65105

  • pattford
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 17
  • Thanks: 1
I'm using these scripts successfully with a Classic form -- minor modifications added. However, I would like to restrict Admin Email function to ONLY send notification if the payment is successful (as seen in the Quickmode examples). If the payment is not successful (e.g., the user canceled out in Paypal before completing the payment) no form data should be emailed to the Admin.

My form uses scripts found in this forum topic "How to use Paypal with Classic form", including the added script to record the successful Paypal validation in the form record. This last script is in the "Before Form" piece.

To send the Admin an email with the form data ONLY WHEN payment is successful, how do I get the form data for building the email, and where do I place the code to send the email? For example, if I add the SendMail to the "Before Form" piece as part of the successful payment routine, how do I retrieve the form data to build the email? I'm assuming that because this piece is "Before Form", the data is no longer accessible via $this->maildata and _FF_DATA_VALUE ...... is that correct?
The following user(s) said Thank You: wartime

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

Re: How to Use PayPal with Classic Forms 8 years 8 months ago #86236

  • stuartjbarr
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 2
I've followed the above instructions, and added the code to the Begin Submit piece as described at the start of this thread. I do have Paypal integration basically working, such that I can submit a payment.

However, on successful payment, I would like to submit the values, and have the emails sent, as is done in QuickMode using the Paypal integration, which is where this thread seems to have ended 1 year ago.

Does anybody know how to do this?

Thanks,
Stuart
The following user(s) said Thank You: wartime

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

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.041 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

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!