edx启用支付功能

Posted on 2016-05-12(星期四) 00:00 in edx


edx启用支付功能

1、修改配置文件

在lms.env.json添加如下代码:

...
"FEATURES": {
...
"ENABLE_SHOPPING_CART": true,
"ENABLE_PAID_COURSE_REGISTRATION": true,
...
}
....

在lms.auth.json添加如下代码:

...
"CC_PROCESSOR": {
    "CyberSource2": {
        "ACCESS_KEY": "{fill in with access key provided by CyberSource}", 
        "PROFILE_ID": "{fill in with profile id provided by CyberSource}", 
        "PURCHASE_ENDPOINT": "{fill in with endpoint url provided by CyberSource}", 
        "SECRET_KEY": "{fill in with secret key provided by CyberSource}"
    }
}, 
"CC_PROCESSOR_NAME": "CyberSource2",
...

2、添加 course mode

登录django后台,找到Course modes然后点击Add course mode添加相关信息,具体如下:

  1. Course id: 相关联课程ID, 格式为"{org}/{course}/{run}", 例如 "foo/bar/baz"。
  2. Mode slug: 设置为 "honor"。
  3. Mode display name: 建议设置为"Honor Code"。
  4. Min Price: 课程最低价格。
  5. Currency: 价格单位 "usd" (US 美元). 也可以输入其他的 (列如 'chf' 为 瑞士法郎).
  6. Expiration Date/Date Time. 到期时间,推荐不填。

edx