Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Creating payment module


JP_Gonçalves

Recommended Posts

Hi guys!

 

I'm posting this because I need help to create a new payment module, I think it's possible, but I dont know how to "execute" the code...

 

So, the problem is:

 

I need to create a new payment module so that when the costumer finishes it's buy and goes for the payment area, he will pay with "points" instead of real money. those points must be earned by doing stuff for the community like posting videos on YT and etc..

 

I was thinking that I could creat a new column on the DB.. each user would have it's points on the DB, like a card, when you make a buy, the amount of points that you spent, gets taken from you of course..

 

The real problem is actually do the column and the new payment method, wich I have completly no idea how to do it.

 

If you guys can help me...

 

Thanks in advance,

João Pedro Gonçalves

Link to comment
Share on other sites

You need to think more. Is 1 point worth 1 dollar ? What happens if the buyer has 1000 points, but only buys $200 of stuff. The other 800 is ... ? What happens if the buyer has only 200 points, but is trying to buy $500 of stuff ? The other $300 is got from where.

 

Point is: this is not a payment module, this is a discount module. Discount the price of the products by the number of points they have available. Save any excess for future use.

Link to comment
Share on other sites

You need to think more. Is 1 point worth 1 dollar ? What happens if the buyer has 1000 points, but only buys $200 of stuff. The other 800 is ... ? What happens if the buyer has only 200 points, but is trying to buy $500 of stuff ? The other $300 is got from where.

 

Point is: this is not a payment module, this is a discount module. Discount the price of the products by the number of points they have available. Save any excess for future use.

No money will be involved in the transactions, but the points act like real money.. if youre buying something that costs 200 points and you have 1000 points, it'll remain 800 points..

 

What I need is to use points instead of money. that's all

Edited by JP_Gonçalves
Link to comment
Share on other sites

If no money is to be involved at all...

 

create a payment module that reads the person available points, if enough allow them to checkout and update the points on their account appropriately. If not enough points available, redirect back to the shopping cart page along with an appropriate message.

 

You need to also have a way to add points to a persons account.

 

All that is straightforward for any developer (who will likely want paying in something other than points) => http://www.oscommerce.com/forums/forum/79-commercial-support-enquiries/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...