-1

I'm currently developing a web app that features online payments. We've settled on Stripe as the gateway. I initially thought Omnipay would be perfect, but I have to admit I find the documentation confusing -- For example where to find options that can be set or what's included in responses?

I actually have a test payment working with Omnipay, but once it's successful I can't see how to pull out the transaction details to store in the db:

if ($response->isSuccessful()) {
  // how to grab the transaction date, id other useful information to store.
  // How to see what is available?!
}

Also is the only documentation the general page in the git, I seem to be failing to navigate my way through it. General nerd fail at current time

MrTomTom
  • 337
  • 4
  • 12
  • You should consider cleaning up this question since you're really asking two things. I would remove the question about Omnipay vs. Stripe as it's a distraction. If you still want to ask your question specifically about using Omnipay then you should build that up with more details and leave out the subjective questions. – Iguananaut Dec 04 '13 at 17:29
  • Stack Overflow doesn't allow "this vs that" type questions as they lead to ongoing discussion. See the help pages for more details. You should remove the first part of your question and simply ask how to get the Omnipay transaction details. – Adrian Macneil Dec 04 '13 at 21:12
  • Ah well. Fail on etiquette by me then :'( -- Sorry. Fixed now – MrTomTom Dec 05 '13 at 00:47

1 Answers1

0

To get the transaction details from an omnipay response, there are a few methods you can use on the response object.

// how to grab the transaction date, id other useful information to store.
if ($response->isSuccessful()) {  
    // the transaction date is right now
    $date = gmdate();

    // the id
    $id = $response->getTransactionReference();

    // other useful information (the raw response from Stripe)
    $data = $response->getData();
}
Adrian Macneil
  • 13,017
  • 5
  • 57
  • 70