diff --git a/sales/tasks.py b/sales/tasks.py index 1966f9a..79f3e31 100644 --- a/sales/tasks.py +++ b/sales/tasks.py @@ -135,7 +135,7 @@ def pay_sellers_on_sold_items(): sale_total = sale.agreed_price_xmr - sale.platform_fee_xmr sale_account = aw.wallet.accounts[sale.escrow_account_index] - if sale_account.balances()[1] >= Decimal(sale.agreed_price_xmr): + if sale_account.balances()[1] >= Decimal(str(sale.agreed_price_xmr)): try: # Construct a transaction so we can get current fee and subtract from the total _tx = sale_account.transfer( diff --git a/web/templates/sales/get_sale.html b/web/templates/sales/get_sale.html index a5f18bf..0f2c774 100644 --- a/web/templates/sales/get_sale.html +++ b/web/templates/sales/get_sale.html @@ -8,138 +8,14 @@

Sale #{{ sale.id }} - {{ sale.item.name }}

- {% if request.user == sale.bid.bidder %} - {% if sale.payment_received == False %} -

Hello {{ sale.bid.bidder.username }},

-

- The seller accepted your bid and the sale process was initiated. - Please send funds to the below Monero escrow address (or use the QR code). -

-

Expected Payment (XMR): {{ sale.expected_payment_xmr }}

-

Escrow Address: {{ sale.escrow_address }}

- {% if incoming_transactions %} -

Incoming Payments:

- - {% endif %} - -
- -

Need a Wallet?

-

Try out these popular Monero wallet projects:

- -

Change your Mind?

-

You can cancel the sale and reopen the item for bidding. Any funds sent will be transferred again to your return address.

-

Cancel Sale

-
- {% elif sale.payment_received and sale.item_shipped == False %} -

Congratulations {{ sale.bid.bidder.username }},

-

Your funds have been confirmed!

-

- The seller has been notified of the proof of payment and has been provided with a link to your shipping address. - Please make sure it is correct and will result in successful package delivery. - You can edit the address here: Edit Shipping Address -

-

Address 1: {{ shipping_address.address1 }}

-

Address 2: {{ shipping_address.address2 }}

-

City: {{ shipping_address.city }}

-

State: {{ shipping_address.state }}

-

Country: {{ shipping_address.country }}

-

Zip: {{ shipping_address.zip }}

- {% elif sale.item_shipped and sale.item_received == False %} -

Congratulations {{ sale.bid.bidder.username }},

-

- The seller has shipped the item, now you need to wait for it to arrive. - When it does arrive please click the button below to confirm. -

-

Stay tuned for updates and thanks for using {{ site_meta.name }}!

- -
-
- -

Click here when you have received your package:

-

Confirm Item Received

-
- {% elif sale.item_received %} -

Hey {{ sale.bid.bidder.username }},

-

It sounds like your order was successful. The seller will be sent their funds from the transaction out of the escrow wallet. You are good to go!

-

If you found the site useful and had a good experience, please consider donating to the developer address provided at the bottom of the page.

-

Thanks for using {{ site_meta.name }}!

-
-

Please provide me with any feedback so I can make the process better in the future.

- - {% endif %} - {% endif %} - - {% if request.user == sale.item.owner %} - {% if sale.payment_received == False %} -

Hello {{ sale.item.owner.username }},

-

- You accepted bid #{{ sale.bid.id }} on your item "{{ sale.item.name }}" (#{{ sale.item.id }}). - A new sale has been initiated. -

-

- We are waiting for the buyer to send funds to the escrow address. - No action is needed from you at this time. Stay tuned for notifications. -

- {% elif sale.payment_received and sale.item_shipped == False %} -

Congratulations {{ sale.item.owner.username }},

-

- The bidder for your item has sent the proper amount of funds to the escrow wallet address. - You may now proceed with shipping the item they agreed to purchase from you. - You may need to wait some time for the buyer to provide their location: -

- {% if shipping_address %} -

Address 1: {{ shipping_address.address1 }}

-

Address 2: {{ shipping_address.address2 }}

-

City: {{ shipping_address.city }}

-

State: {{ shipping_address.state }}

-

Country: {{ shipping_address.country }}

-

Zip: {{ shipping_address.zip }}

-
-

If you have shipped the item, and only if you have shipped the item, please confirm by clicking this button:

-

Confirm Item Shipped

- {% else %} -
-

The buyer has not provided a shipping address yet - check back later!

- {% endif %} - - {% elif sale.item_shipped and sale.item_received == False %} -

Hello {{ sale.item.owner.username }},

-

You've shipped the item, now you need to wait for the buyer to confirm they received it on their end.

-

Stay tuned for updates and thanks for using {{ site_meta.name }}!

- - {% elif sale.item_received %} -

Hey {{ sale.item.owner.username }},

-

The buyer confirmed receipt of their shipment which means things worked out. It's time for you to get paid!

-

Your payout address provided during item creation will be paid the accepted bid amount out of the escrow wallet. Please note, transaction fees will come out of the payout total.

-

Accepted Bid (XMR): {{ sale.bid.bid_price_xmr }}

-

Platform Fee (XMR): {{ sale.platform_fee_xmr }}

-

Network Fee (XMR): {{ sale.network_fee_xmr }}

-

Total Payout (XMR): {{ total_seller_payout }}

-

Payout Address: {{ sale.item.payout_address }}

-

Payout Transaction ID: {{ sale.seller_payout_transaction }}

-
-

If you found the site useful and had a good experience, please consider donating to the developer address provided at the bottom of the page.

-

Thanks for using {{ site_meta.name }}!

-
-

Please provide me with any feedback so I can make the process better in the future.

-
  • Github -
  • Twitter
  • -
  • Reddit
  • - {% endif %} + {% if sale.payment_received == False %} + {% include 'sales/get_sale/no_payment_received.html' %} + {% elif sale.payment_received and sale.item_shipped == False %} + {% include 'sales/get_sale/payment_received_not_shipped.html' %} + {% elif sale.item_shipped and sale.item_received == False %} + {% include 'sales/get_sale/shipped_not_received.html' %} + {% elif sale.item_received %} + {% include 'sales/get_sale/item_received.html' %} {% endif %} diff --git a/web/templates/sales/get_sale/item_received.html b/web/templates/sales/get_sale/item_received.html new file mode 100644 index 0000000..5ba11ee --- /dev/null +++ b/web/templates/sales/get_sale/item_received.html @@ -0,0 +1,32 @@ +{% if request.user == sale.bid.bidder %} +

    Hey {{ sale.bid.bidder.username }},

    +

    It sounds like your order was successful. The seller will be sent their funds from the transaction out of the escrow wallet. You are good to go!

    +

    If you found the site useful and had a good experience, please consider donating to the developer address provided at the bottom of the page.

    +

    Thanks for using {{ site_meta.name }}!

    +
    +

    Please provide me with any feedback so I can make the process better in the future.

    + +{% elif request.user == sale.item.owner %} +

    Hey {{ sale.item.owner.username }},

    +

    The buyer confirmed receipt of their shipment which means things worked out. It's time for you to get paid!

    +

    Your payout address provided during item creation will be paid the accepted bid amount out of the escrow wallet. Please note, transaction fees will come out of the payout total if there are no platform fees!

    +
    +

    Accepted Bid (XMR): {{ sale.bid.bid_price_xmr }}

    +

    Platform Fee (XMR): {{ sale.platform_fee_xmr }}

    +

    Network Fee (XMR): {{ sale.network_fee_xmr }}

    +

    Total Payout (XMR): {{ total_seller_payout }}

    +

    Payout Address: {{ sale.item.payout_address }}

    +

    Payout Transaction ID: {{ sale.seller_payout_transaction }}

    +
    +

    If you found the site useful and had a good experience, please consider donating to the developer address provided at the bottom of the page.

    +

    Thanks for using {{ site_meta.name }}!

    +
    +

    Please provide me with any feedback so I can make the process better in the future.

    +
  • Github +
  • Twitter
  • +
  • Reddit
  • +{% endif %} diff --git a/web/templates/sales/get_sale/no_payment_received.html b/web/templates/sales/get_sale/no_payment_received.html new file mode 100644 index 0000000..b51d822 --- /dev/null +++ b/web/templates/sales/get_sale/no_payment_received.html @@ -0,0 +1,42 @@ +{% if request.user == sale.bid.bidder %} +

    Hello {{ sale.bid.bidder.username }},

    +

    + The seller accepted your bid and the sale process was initiated. + Please send funds to the below Monero escrow address (or use the QR code). +

    +

    Expected Payment (XMR): {{ sale.expected_payment_xmr }}

    +

    Escrow Address: {{ sale.escrow_address }}

    + {% if incoming_transactions %} +

    Incoming Payments Found:

    + + {% endif %} + +
    + +

    Need a Wallet?

    +

    Try out these popular Monero wallet projects:

    + +

    Change your Mind?

    +

    You can cancel the sale and reopen the item for bidding. Any funds sent will be transferred again to your return address.

    +

    Cancel Sale

    +
    +{% elif request.user == sale.item.owner %} +

    Hello {{ sale.item.owner.username }},

    +

    + You accepted bid #{{ sale.bid.id }} on your item "{{ sale.item.name }}" (#{{ sale.item.id }}). + A new sale has been initiated. +

    +

    + We are waiting for the buyer to send funds to the escrow address. + No action is needed from you at this time. Stay tuned for notifications. +

    +{% endif %} diff --git a/web/templates/sales/get_sale/payment_received_not_shipped.html b/web/templates/sales/get_sale/payment_received_not_shipped.html new file mode 100644 index 0000000..59896d5 --- /dev/null +++ b/web/templates/sales/get_sale/payment_received_not_shipped.html @@ -0,0 +1,36 @@ +{% if request.user == sale.bid.bidder %} +

    Congratulations {{ sale.bid.bidder.username }},

    +

    Your funds have been confirmed!

    +

    + The seller has been notified of the proof of payment and has been provided with a link to your shipping address. + Please make sure it is correct and will result in successful package delivery. + You can edit the address here: Edit Shipping Address +

    +

    Address 1: {{ shipping_address.address1 }}

    +

    Address 2: {{ shipping_address.address2 }}

    +

    City: {{ shipping_address.city }}

    +

    State: {{ shipping_address.state }}

    +

    Country: {{ shipping_address.country }}

    +

    Zip: {{ shipping_address.zip }}

    +{% elif request.user == sale.item.owner %} +

    Congratulations {{ sale.item.owner.username }},

    +

    + The bidder for your item has sent the proper amount of funds to the escrow wallet address. + You may now proceed with shipping the item they agreed to purchase from you. + You may need to wait some time for the buyer to provide their location: +

    + {% if shipping_address %} +

    Address 1: {{ shipping_address.address1 }}

    +

    Address 2: {{ shipping_address.address2 }}

    +

    City: {{ shipping_address.city }}

    +

    State: {{ shipping_address.state }}

    +

    Country: {{ shipping_address.country }}

    +

    Zip: {{ shipping_address.zip }}

    +
    +

    If you have shipped the item, and only if you have shipped the item, please confirm by clicking this button:

    +

    Confirm Item Shipped

    + {% else %} +
    +

    The buyer has not provided a shipping address yet - check back later!

    + {% endif %} +{% endif %} diff --git a/web/templates/sales/get_sale/shipped_not_received.html b/web/templates/sales/get_sale/shipped_not_received.html new file mode 100644 index 0000000..9711791 --- /dev/null +++ b/web/templates/sales/get_sale/shipped_not_received.html @@ -0,0 +1,22 @@ +{% load static %} + +{% if request.user == sale.bid.bidder %} +

    Congratulations {{ sale.bid.bidder.username }},

    +

    + The seller has shipped the item, now you need to wait for it to arrive. + When it does arrive please click the button below to confirm. +

    +

    Stay tuned for updates and thanks for using {{ site_meta.name }}!

    + +
    +
    + +

    Click here when you have received your package:

    +

    Confirm Item Received

    +
    +{% elif request.user == sale.item.owner %} +

    Hello {{ sale.item.owner.username }},

    +

    You've shipped the item, now you need to wait for the buyer to confirm they received it on their end.

    +

    Stay tuned for updates and thanks for using {{ site_meta.name }}!

    + +{% endif %}