Jump to:

2082 Posts in 1002 Topics by 452 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » New Payment Type

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1048 Views
  • ccburns
    Avatar
    Community Member
    74 Posts

    New Payment Type Link to this post

    Hi Everyone,

    A client that I am working for at the moment wants to be able to accept Credit Card numbers (temporarily save them to the database) and process them offline with their merchant terminal. There are a number of reasons not to do this, but oh well what can you do... Anyway I decided that rather than go down the path of trying to hack in this functionality to the ecommerce module and save this data in the SilverStripe database that I would follow the paypal style method of doing this.

    Basically the checkout redirects the user to a new (completely separate page) on a subdomain (something like payments.domain.com) this subdomain collects the Credit Card details and saves to the separate database that the company can access to get the Credit Card number and then delete when processed.

    Now I have set this up by basically duplicating the PaystationHostedPayment.php which is working just fine. The problem is that when I try to redirect it back to the SilverStripe page to update the Payments table with "Failed" if they cancelled the transaction or "Paid" if they paid have paid.

    I have taken a look at the PayPalPayments class and tested on PayPal. If I click the CANCEL button I get the following URL which automatically redirects through SilverStripe updating the Payments table to "Failed" and then redirects to the order page in the individuals account which the payment status of "Failed"

    URL = http://domain.com/paypal/complete?custom=1- The "1-" at then end is the ID for the Payment row in the Payment table.

    Now with my class I have set the $URLSegment variable to be "manualprocessing" but if I use the URL

    http://domain.com/manualprocessing/complete?custom=1- (where "1-" is the correct Payment ID then I just get a 404 error page

    "Sorry, it seems you were trying to access a page that doesn't exist.
    Please check the spelling of the URL you were trying to access and try again."

    Any suggestions how I can make "manualprocessing" be an actual URL that will redirect. Is there something I have missed in the class? This is the last hurdle I have to jump to complete this site.

    Hopefully I haven't been tooooooooo long winded for you to help.

    Cheers,
    Colin

  • ccburns
    Avatar
    Community Member
    74 Posts

    Re: New Payment Type Link to this post

    Has anyone got any suggestions where I might look to work this out myself. Any tips would be really welcomed.

    Cheers,
    Colin

  • vstrazz
    Avatar
    Community Member
    63 Posts

    Re: New Payment Type Link to this post

    http://domain.com/manualprocessing/complete?custom=1

    manualprocessing needs to be a valid url. And the valid url of the class / page type that you are going to be running the function (complete) on.

    1048 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.