Skip to content

Fix Import Order #8

@skeet70

Description

@skeet70

If done following the docs, the client only works with the test sandbox credentials. The Processor and PaymentMethods explicitly have to be imported after the config/creds are set in a view. Should be laid out more plainly in the docs that this is required, or should be fixed so that import order doesn't matter.

ex:

import samurai.config as config
config.merchant_key = 'merchant_key'
config.merchant_password = 'mechant_password'
config.processor_token = 'processor_token'
from samurai.payment_method import PaymentMethod
from samurai.processor import Processor

^ Works.

from samurai.payment_method import PaymentMethod
from samurai.processor import Processor
import samurai.config as config
config.merchant_key = 'merchant_key'
config.merchant_password = 'mechant_password'
config.processor_token = 'processor_token'

^ Doesn't

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions