Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
yii2_fecshop
提交
11d53bf1
Y
yii2_fecshop
项目概览
OpenDocCN
/
yii2_fecshop
通知
18
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yii2_fecshop
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
11d53bf1
编写于
2月 17, 2017
作者:
R
root
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
paypal standard payment
上级
b91fba43
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
143 addition
and
2 deletion
+143
-2
app/appfront/modules/AppfrontController.php
app/appfront/modules/AppfrontController.php
+4
-2
app/appfront/modules/Payment/block/paypal/standard/Start.php
app/appfront/modules/Payment/block/paypal/standard/Start.php
+59
-0
app/appfront/modules/Payment/controllers/paypal/StandardController.php
...modules/Payment/controllers/paypal/StandardController.php
+1
-0
app/appfront/theme/base/front/assets/css/style.css
app/appfront/theme/base/front/assets/css/style.css
+31
-0
app/appfront/theme/base/front/payment/paypal/standard/start.php
...pfront/theme/base/front/payment/paypal/standard/start.php
+40
-0
app/appfront/theme/base/front/site/helper/error.php
app/appfront/theme/base/front/site/helper/error.php
+8
-0
未找到文件。
app/appfront/modules/AppfrontController.php
浏览文件 @
11d53bf1
...
...
@@ -53,9 +53,11 @@ class AppfrontController extends FecController
if
(
!
$this
->
blockNamespace
){
throw
new
\
yii\web\HttpException
(
406
,
'blockNamespace is empty , you should config it in module->blockNamespace or controller blockNamespace '
);
}
$viewId
=
$this
->
id
;
$viewId
=
str_replace
(
'/'
,
'\\'
,
$viewId
);
$relativeFile
=
'\\'
.
$this
->
blockNamespace
;
$relativeFile
.
=
'\\'
.
$this
->
id
.
'\\'
.
ucfirst
(
$blockName
);
$relativeFile
.
=
'\\'
.
$viewId
.
'\\'
.
ucfirst
(
$blockName
);
return
new
$relativeFile
;
}
...
...
app/appfront/modules/Payment/block/paypal/standard/Start.php
0 → 100644
浏览文件 @
11d53bf1
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
namespace
fecshop\app\appfront\modules\Payment\block\paypal\standard
;
use
Yii
;
use
fec\helpers\CModule
;
use
fec\helpers\CRequest
;
use
yii\base\InvalidValueException
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
class
Start
{
public
function
getLastData
(){
$increment_id
=
Yii
::
$service
->
order
->
getSessionIncrementId
();
$loaderImg
=
Yii
::
$service
->
image
->
getImgUrl
(
'images/loader.gif'
,
'appfront'
);
$paypalLogoImg
=
Yii
::
$service
->
image
->
getImgUrl
(
'custom/logo.png'
,
'appfront'
);
/*
$store_name = Store::getCurrentStoreLabel();
$paypal = Config::param("payment_method");
$submitAction = $paypal['paypal']['payments_standard']['redirect_url'];
$paypal_account = $paypal['paypal']['payments_standard']['user'];
$order_increment_id = $this->_order['increment_id'];
$order_currency = $this->_order['order_currency_code'];
$paymentaction = "sale";
$cmd = '_cart';
$upload = 1;
$return_url = Url::getUrl('paypal/standard/success');
$cancel_url = Url::getUrl('paypal/standard/cancel');
$notify_url = Url::getUrl('paypal/ipn');
$tax = 0.00;
$tax_cart = 0.00;
$amount = $this->_order['grand_total'];
$shipping = $this->_order['shipping_total'];
$discount_amount = $this->_order['subtotal_with_discount'];
$discount_amount_cart = $discount_amount;
*/
return
[
'loaderImg'
=>
$loaderImg
,
'paypalLogoImg'
=>
$paypalLogoImg
,
];
}
}
\ No newline at end of file
app/appfront/modules/Payment/controllers/paypal/StandardController.php
浏览文件 @
11d53bf1
...
...
@@ -33,6 +33,7 @@ class StandardController extends AppfrontController
}
}
...
...
app/appfront/theme/base/front/assets/css/style.css
浏览文件 @
11d53bf1
...
...
@@ -2676,4 +2676,35 @@ height: 33px;
color
:
#cc0000
;
}
.text-center
{
text-align
:
center
;
}
.image404
{
width
:
600px
;}
.content-404
h1
{
color
:
#363432
;
font-family
:
"Roboto"
,
sans-serif
;
font-size
:
41px
;
font-weight
:
300
;
}
.content-404
h1
{
color
:
#363432
;
font-family
:
"Roboto"
,
sans-serif
;
font-size
:
41px
;
font-weight
:
300
;
}
.content-404
p
{
color
:
#363432
;
font-family
:
"Roboto"
,
sans-serif
;
font-size
:
18px
;
}
app/appfront/theme/base/front/payment/paypal/standard/start.php
0 → 100644
浏览文件 @
11d53bf1
<html>
<body>
You will be redirected to the PayPal website in a few seconds
<img
src=
"
<?=
$loaderImg
?>
"
/>
<?php
// https://www.paypal.com/cgi-bin/webscr ?>
<
form
action
=
"<?=
$submitAction
?>"
id
=
"paypal_standard_checkout"
name
=
"paypal_standard_checkout"
method
=
"POST"
>
<
input
id
=
"business"
name
=
"business"
value
=
"<?=
$paypal_account
?>"
type
=
"hidden"
/>
<
input
id
=
"invoice"
name
=
"invoice"
value
=
"<?=
$order_increment_id
?>"
type
=
"hidden"
/>
<
input
id
=
"currency_code"
name
=
"currency_code"
value
=
"<?=
$order_currency
?>"
type
=
"hidden"
/>
<
input
id
=
"paymentaction"
name
=
"paymentaction"
value
=
"<?=
$paymentaction
?>"
type
=
"hidden"
/>
<
input
id
=
"return"
name
=
"return"
value
=
"<?=
$return_url
?>"
type
=
"hidden"
/>
<
input
id
=
"cancel_return"
name
=
"cancel_return"
value
=
"<?=
$cancel_url
?>"
type
=
"hidden"
/>
<
input
id
=
"notify_url"
name
=
"notify_url"
value
=
"<?=
$notify_url
?>"
type
=
"hidden"
/>
<
input
id
=
"cpp_header_image"
name
=
"cpp_header_image"
value
=
"<?=
$paypal_logo_img
?>"
type
=
"hidden"
/>
<
input
id
=
"item_name"
name
=
"item_name"
value
=
"<?=
$store_name
?>"
type
=
"hidden"
/>
<
input
id
=
"charset"
name
=
"charset"
value
=
"utf-8"
type
=
"hidden"
/>
<
input
id
=
"amount"
name
=
"amount"
value
=
"<?=
$amount
?>"
type
=
"hidden"
/>
<
input
id
=
"tax"
name
=
"tax"
value
=
"<?=
$tax
?>"
type
=
"hidden"
/>
<
input
id
=
"shipping"
name
=
"shipping"
value
=
"<?=
$shipping
?>"
type
=
"hidden"
/>
<
input
id
=
"discount_amount"
name
=
"discount_amount"
value
=
"<?=
$discount_amount
?>"
type
=
"hidden"
/>
<?=
$product_items
?>
<input
id=
"cmd"
name=
"cmd"
value=
"
<?=
$cmd
?>
"
type=
"hidden"
/>
<input
id=
"upload"
name=
"upload"
value=
"
<?=
$upload
?>
"
type=
"hidden"
/>
<input
id=
"tax_cart"
name=
"tax_cart"
value=
"
<?=
$tax_cart
?>
"
type=
"hidden"
/>
<input
id=
"discount_amount_cart"
name=
"discount_amount_cart"
value=
"
<?=
$discount_amount_cart
?>
"
type=
"hidden"
/>
<?=
$address_html
?>
.'
<span
class=
"field-row"
>
<input
id=
"submit_to_paypal_button_ffe6e6319afa1dc2e9e4d822e58ca9ca"
name=
""
value=
"'.Translate::__("
Click
here
if
you
are
not
redirected
within
10
seconds
").'..."
type=
"submit"
class=
" submit"
/>
</span>
</form>
<script
type=
"text/javascript"
>
function
func
(){
document
.
getElementById
(
"
paypal_standard_checkout
"
).
submit
();
}
window
.
onload
=
func
;
</script>
</body>
</html>
\ No newline at end of file
app/appfront/theme/base/front/site/helper/error.php
浏览文件 @
11d53bf1
...
...
@@ -11,6 +11,13 @@ $this->title = $name;
?>
<div
class=
"main container one-column"
>
<div
class=
"col-main"
>
<div
class=
"content-404 text-center"
>
<img
class=
"image404"
src=
"
<?=
Yii
::
$service
->
image
->
getImgUrl
(
'images/404.png'
,
'appfront'
)
?>
"
class=
"img-responsive"
alt=
""
/>
<h1><b>
OPPS!
</b>
We Couldn’t Find this Page
</h1>
<p>
Please contact us if you think this is a server error. Thank you..
</p>
<h2><a
href=
"
<?=
Yii
::
$service
->
url
->
homeUrl
();
?>
"
>
Bring me back Home
</a></h2>
</div>
<!--
<div class="site-error">
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
...
...
@@ -27,4 +34,5 @@ $this->title = $name;
</p>
</div>
-->
</div>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录