成功付款后,提交表格详情(发送电子邮件)

时间:2016-09-23 12:47:41

标签: php redirect payment-gateway payment

我的付款整合工作完美。在此之前,我的表单将表单值提交给电子邮件。现在,我想要做的就是允许在此之前付款,并在付款成功后重定向到“成功网址”,然后将表单值提交给电子邮件。 那么如何存储这些值,然后在成功的网址页面上启用它们,并在成功付款后重定向到? 我的代码:

<form role="form" id="form-contact-agent" method="post" action="https://voguepay.com/pay/">
                                    <div class="form-group">
                                        <label for="form-contact-agent-name"><?php echo JText::_('COM_BT_PROPERTY_YOUR_NAME');?><em>*</em></label>
                                        <input type="text" class="form-control2" id="form-contact-agent-name" name="name" value="<?php echo $this->user->name; ?>" required>
                                    </div><!-- /.form-group -->
                                    <div class="form-group">
                                        <label for="form-contact-agent-email"><?php echo JText::_('COM_BT_PROPERTY_YOUR_EMAIL');?><em>*</em></label>
                                        <input type="email" class="form-control2" id="form-contact-agent-email" name="email" value="<?php echo $this->user->email; ?>" required>
                                    </div><!-- /.form-group -->
                                    <div class="form-group">
                                        <label for="form-contact-agent-phone"><?php echo JText::_('COM_BT_PROPERTY_YOUR_PHONE');?><em>*</em></label>
                                        <input type="text" class="form-control2" id="form-contact-agent-phone" name="phone" value="<?php echo $this->user->phone; ?>" required>
                                    </div><!-- /.form-group -->
                                    <div class="form-group">
                                        <label for="form-contact-agent-location"><em>Your Current Location*</em></label>
                                        <input type="text" class="form-control2" id="form-contact-agent-location" name="location" value="<?php echo $this->user->location; ?>" required>
                                    </div><!-- /.form-group -->
                                    <div class="form-group">
                                        <label for="form-contact-agent-proposed-location"><em>Proposed Property Location*</em></label>
                                        <input type="text" class="form-control2" id="form-contact-agent-proposed-location" name="proposedlocation" value="<?php echo $this->user->proposedlocation; ?>" required>
                                    </div><!-- /.form-group -->
                                    <div class="form-group">
                                        <label for="form-contact-agent-docs"><em>What documents are you applying for?*</em></label><br/>
                                        <input type="checkbox" class="form-control" name="documents[0]" value="Architectural Drawing" />Architectural Drawing<br/>
                                        <input type="checkbox" class="form-control" name="documents[1]" value="Structural Drawing" />Structural Drawing<br/>
                                        <input type="checkbox" class="form-control" name="documents[2]" value="Mechanical Drawing" />Mechanical Drawing<br/>
                                        <input type="checkbox" class="form-control" name="documents[3]" value="ElectricalDrawing" />Electrical Drawing<br/>
                                        <input type="checkbox" class="form-control" name="documents[4]" value="Bill of quantities" />Bill of quantities (BOQ)<br/>
                                        <input type="checkbox" class="form-control" name="documents[5]" value="Construction of building" />Construction of building<br/>
                                    </div><!-- /.form-group -->
                                    <br/>
                                    <div class="form-group">
                                    <input type="checkbox" class="form-control" name="terms" value="<?php echo $this->user->terms; ?>" required/>I agree to the Terms and Conditions 
                                    </div><!-- /.form-group -->
                                    <div class="form-group">
                                    <input type='hidden' name='v_merchant_id' value='demo' />
<input type='hidden' name='merchant_ref' value='SC-CommitmentFee' />
<input type='hidden' name='memo' value='SC- Design Commitment Fee' />
<input type='hidden' name='store_id' value='1' />
<input type='hidden' name='success_url' value='http://www.myexample.com/thank_you.html' />
<input type='hidden' name='fail_url' value='http://www.example.com/failed.html' />

<input type='hidden' name='total' value='1500' />
</div>
                                    <div class="form-group">
                                        <button name="submit" type="submit" class="btn pull-right btn-default" id="form-contact-agent-submit">Apply Now</button>
                                    </div><!-- /.form-group -->
                                    <div id="form-contact-agent-status"></div>

                                    <input type="hidden" name="agent_id" value="<?php echo $this->agent->id ?>">
                                    <input type="hidden" name="task" value="agent.sendmsg" />
                                    <input type="hidden" name="return" value="<?php echo base64_encode($this->uri->toString(array('path', 'query', 'fragment'))) ?>">
                                    <?php echo JHtml::_('form.token'); ?>
                                    <?php include '/components/com_bt_property/controllers/agent.php';?>
                                </form>

0 个答案:

没有答案