start.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. ?>
  10. <html>
  11. <body>
  12. <?= Yii::$service->page->translate->__('You will be redirected to the PayPal website in a few seconds...'); ?>
  13. <img src="<?= $loader_img ?>" />
  14. <?php // https://www.paypal.com/cgi-bin/webscr ?>
  15. <form action="<?= $payment_url ?>" id="paypal_standard_checkout" name="paypal_standard_checkout" method="POST">
  16. <input id="business" name="business" value="<?= $account ?>" type="hidden"/>
  17. <input id="invoice" name="invoice" value="<?= $order['increment_id'] ?>" type="hidden"/>
  18. <input id="currency_code" name="currency_code" value="<?= $order['order_currency_code'] ?>" type="hidden"/>
  19. <input id="paymentaction" name="paymentaction" value="<?= $payment_action ?>" type="hidden"/>
  20. <input id="return" name="return" value="<?= $success_redirect_url ?>" type="hidden"/>
  21. <input id="cancel_return" name="cancel_return" value="<?= $cancel_url ?>" type="hidden"/>
  22. <input id="notify_url" name="notify_url" value="<?= $ipn_url ?>" type="hidden"/>
  23. <input id="cpp_header_image" name="cpp_header_image" value="<?= $paypal_logo_img ?>" type="hidden"/>
  24. <input id="item_name" name="item_name" value="<?= $store_name ?>" type="hidden"/>
  25. <input id="charset" name="charset" value="utf-8" type="hidden"/>
  26. <input id="amount" name="amount" value="<?= $order['grand_total'] ? (str_replace(',','',number_format($order['grand_total'],2))) : number_format(0,2) ?>" type="hidden"/>
  27. <input id="tax" name="tax" value="<?= $tax ?>" type="hidden"/>
  28. <input id="shipping" name="shipping" value="<?= $order['shipping_total'] ? (str_replace(',','',number_format($order['shipping_total'],2))) : number_format(0,2) ?>" type="hidden"/>
  29. <input id="discount_amount" name="discount_amount" value="<?= $order['subtotal_with_discount'] ? (str_replace(',','',number_format($order['subtotal_with_discount'],2))) : number_format(0,2) ?>" type="hidden"/>
  30. <?= $product_items_and_shipping ?>
  31. <input id="cmd" name="cmd" value="<?= $cmd ?>" type="hidden"/>
  32. <input id="upload" name="upload" value="<?= $upload ?>" type="hidden"/>
  33. <input id="tax_cart" name="tax_cart" value="<?= $tax_cart ?>" type="hidden"/>
  34. <input id="discount_amount_cart" name="discount_amount_cart" value="<?= $order['subtotal_with_discount'] ? (str_replace(',','',number_format($order['subtotal_with_discount'],2))) : number_format(0,2) ?>" type="hidden"/>
  35. <?= $address_html ?>
  36. <span class="field-row">
  37. <input id="submit_to_paypal_button" name="" value="<?= Yii::$service->page->translate->__('Click here if you are not redirected within 10 seconds ...'); ?>" type="submit" class=" submit"/>
  38. </span>
  39. </form>
  40. <script type="text/javascript">
  41. function func(){
  42. document.getElementById("paypal_standard_checkout").submit();
  43. }
  44. window.onload=func;
  45. </script>
  46. </body>
  47. </html>