Run Otto E-Commerce

228 views
Skip to first unread message

truong nguyen

unread,
Sep 30, 2016, 10:18:12 AM9/30/16
to General Open edX discussion
I installed E-commerce (I using native installation)
I follow the instruction :
https://openedx.atlassian.net/wiki/display/OpenOPS/How+to+Install+and+Start+the+E-Commerce+Service+in+Native+Installations
I checked,I have installed E-commerce service successfully.But When I browser to http://localhost:18130 (E-commerce site) it display :NOT FOUND
This is my ecommerce.yml file (/edx/etc/ecommerce.yml):
# This file is created and updated by ansible, edit at your peril

AFFILIATE_COOKIE_KEY: dev_affiliate_id
BROKER_URL: amqp://celery:cel...@10.0.2.15:5672
COMMERCE_API_URL: http://localhost:80/api/commerce/v1/
COMPREHENSIVE_THEME_DIRS: null
COURSE_CATALOG_API_URL: http://localhost:8008/api/v1/
DATABASES:
    default:
        ATOMIC_REQUESTS: true
        CONN_MAX_AGE: 60
        ENGINE: django.db.backends.mysql
        HOST: localhost
        NAME: ecommerce
        PASSWORD: password
        PORT: '3306'
        USER: ecomm001
DATABASE_OPTIONS:
    connect_timeout: 10
DEFAULT_SITE_THEME: null
ECOMMERCE_URL_ROOT: http://localhost:18130
EDX_API_KEY: PUT_YOUR_API_KEY_HERE                # --------------->>> Question 1:How I get EDX_API_KEY  ?                           ENABLE_COMPREHENSIVE_THEMING: false
ENROLLMENT_API_URL: http://localhost:80/api/enrollment/v1/enrollment
JWT_AUTH:
    JWT_ALGORITHM: HS256
    JWT_DECODE_HANDLER: ecommerce.extensions.api.handlers.jwt_decode_handler
    JWT_ISSUERS:
    - http://localhost:80/oauth2

    - ecommerce_worker
    JWT_LEEWAY: 1
    JWT_SECRET_KEY: lms-secret
    JWT_SECRET_KEYS:
    - lms-secret
    JWT_VERIFY_EXPIRATION: true
LANGUAGE_CODE: en-us
LMS_DASHBOARD_URL: http://localhost:80/dashboard
LMS_HEARTBEAT_URL: http://localhost:80/heartbeat
LMS_URL_ROOT: http://localhost:80
OAUTH2_PROVIDER_URL: http://localhost:80/oauth2
OSCAR_FROM_EMAIL: os...@example.com
PAYMENT_PROCESSOR_CONFIG:
    edx:
        cybersource:
            access_key: SET-ME-PLEASE
            cancel_page_url: http://127.0.0.1:8000/commerce/checkout/cancel/
            merchant_id: SET-ME-PLEASE
            payment_page_url: https://set-me-please
            profile_id: SET-ME-PLEASE
            receipt_page_url: http://127.0.0.1:8000/commerce/checkout/receipt/
            secret_key: SET-ME-PLEASE
            soap_api_url: https://set-me-please
            transaction_key: SET-ME-PLEASE
        paypal:                                                                 #--------------------------------->>>I use paypal                      
            cancel_url: http://127.0.0.1:8000/commerce/checkout/cancel/
            client_id: xxxxxxxxx
            client_secret: xxxxxx
            error_url: http://127.0.0.1:8000/commerce/checkout/error/
            mode: Sandbox
            receipt_url: http://127.0.0.1:8000/commerce/checkout/receipt/
PLATFORM_NAME: Your Platform Name Here
SECRET_KEY: Your secret key here            # -------------->>>                           Question 2:  How I get Secret key ?
SEGMENT_KEY: null
SOCIAL_AUTH_EDX_OIDC_ID_TOKEN_DECRYPTION_KEY: ecommerce-secret
SOCIAL_AUTH_EDX_OIDC_KEY: ecommerce-key
SOCIAL_AUTH_EDX_OIDC_LOGOUT_URL: http://localhost:80/logout
SOCIAL_AUTH_EDX_OIDC_SECRET: ecommerce-secret
SOCIAL_AUTH_EDX_OIDC_URL_ROOT: http://localhost:80/oauth2

SOCIAL_AUTH_REDIRECT_IS_HTTPS: false
STATIC_ROOT: /edx/var/ecommerce/staticfiles
SUPPORT_URL: SET_ME_PLEASE
THEME_SCSS: sass/themes/default.scss
TIME_ZONE: UTC
PLEASE ANWSER 2 QUESTION ABOVE!
THANK YOU  (^-^) !

truong nguyen

unread,
Sep 30, 2016, 11:14:02 AM9/30/16
to General Open edX discussion

This is my ecommerce site







Vào 21:18:12 UTC+7 Thứ Sáu, ngày 30 tháng 9 năm 2016, truong nguyen đã viết:

Jason Onoda

unread,
Sep 30, 2016, 8:55:02 PM9/30/16
to General Open edX discussion
customers don't utilize the ecommerce site via <site>:18130, but instead through the LMS. The interfaces for course-level administrative use is <site>:18130/courses and <site>:18130/coupons.

As for the other questions, EDX_API_KEY needs to be the same as what is found in your lms.env.json file. Not sure about secret key. When I was configuring my setup, I didn't change it.

Are you also installing this on a virtual machine local to your computer? I'm not sure how the port forwarding in and out of the VM in that situation would differ from setting it up on AWS.

Another observation-- check the IP and ports on the paypal configuration since that is url that paypal will return users in the cancel, error, and receipt states.

truong nguyen

unread,
Oct 1, 2016, 4:58:41 AM10/1/16
to General Open edX discussion
Hi Onoda !
Thank you for yours reply!
Now I understand flag EDX_API_KEY, I Install E-commerce service on a VM local to my computer,I changed port forwarding in and out of the VM,thank yours suggestion.
All what I want to do that is implement a PaidCourses:Student can enroll a course after they paid money for their course which they want.
I know there are two way to paid:
First, ShoppingCart, I follow the instruction :https://github.com/edx/edx-platform/wiki/Shopping-Cart
But when I set course to honor,after I want to add a course to shoppingcart it don't take me to payment page,I use PayPal and I configured PayPal intergration in ecommerce.yml file (/edx/etc/ecommerce.yml)
I don't know why.
Folow me the reseason is in my payment processors folder (/edx-platform/lms/djangoapps/shoppingcart/processors) does not exist PayPal (PayPal.py )
Second,E-commerce that I want to implenment for Paidcourses.








Vào 07:55:02 UTC+7 Thứ Bảy, ngày 01 tháng 10 năm 2016, Jason Onoda đã viết:

Jason Onoda

unread,
Oct 1, 2016, 7:44:19 PM10/1/16
to General Open edX discussion

truong nguyen

unread,
Oct 1, 2016, 10:31:15 PM10/1/16
to General Open edX discussion



Thank Onoda for pointing to the docs,very helpful,great!
Above is my E-commerce site,beautiful:

Vào 06:44:19 UTC+7 Chủ Nhật, ngày 02 tháng 10 năm 2016, Jason Onoda đã viết:

truong nguyen

unread,
Oct 3, 2016, 12:40:11 AM10/3/16
to General Open edX discussion
Hi Onoda!
I have two problems need yours help.
First:
I have read the docs which you provided above,but I don't understand how to create Enrollment Code after I Enable Enrollment Code for a course (index:6.3.4.2. Link:http://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/ecommerce/create_products/create_enrollment_codes.html#create-enrollment-codes)
What is enrollment page for the course? 
Follow me that is LMS page,right?
Second: Checkout with paypal
 When I login (Superuser) LMS page to enroll a course,it redirected me to E-commerce site (http://localhost:18130/basket)
But when I click to button Checkout with Paypal,it don't redirect me to Paypay payment page.
I configured payment processor use Paypal (client id,client secret,.....) here is my problem.Link  :https://lh3.googleusercontent.com/-ZSDq_72lI-U/V_Hfdjew_EI/AAAAAAAAAE0/0Oo2Ik_rGVcRyzRn5gfIwlAh-Nh-g_drgCLcB/s1600/Capture.JPG
When I login LMS page,not superuser,not staff.I enroll a course it also redirect me to E-commerce site (http://localhost:18130/basket/single-item/?sku=BB3ECA9) but it display:An error occurred while retrieving enrollment details. Please try again.

 



Vào 06:44:19 UTC+7 Chủ Nhật, ngày 02 tháng 10 năm 2016, Jason Onoda đã viết:
Reply all
Reply to author
Forward
0 new messages