Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 06 09:42

    kinglozzer on 3

    [CVE-2022-29254] Add extra vali… Update unit tests to use Guzzle… Add test to capture payments re… and 1 more (compare)

  • Jun 06 09:41

    kinglozzer on 3.2.1

    (compare)

  • Jun 06 09:41

    kinglozzer on 3.2

    [CVE-2022-29254] Add extra vali… (compare)

  • Jun 06 09:41

    kinglozzer on 3.1.4

    (compare)

  • Jun 06 09:41

    kinglozzer on 3.1

    [CVE-2022-29254] Add extra vali… (compare)

  • Jun 06 09:41

    kinglozzer on 3.0.2

    (compare)

  • Jun 06 09:41

    kinglozzer on 3.0

    [CVE-2022-29254] Add extra vali… (compare)

  • Jun 06 09:40

    kinglozzer on 2.5.2

    (compare)

  • Jun 06 09:40

    kinglozzer on 2

    [CVE-2022-29254] Add extra vali… Merge pull request #2 from silv… (compare)

  • May 11 09:24
    jinjie closed #237
  • May 11 09:24
    jinjie commented #237
  • May 11 08:29
    dhensby commented #237
  • May 11 08:08
    jinjie opened #237
  • Apr 05 07:58
    kinglozzer deleted #211
  • Apr 04 12:10
    kinglozzer commented #211
  • Apr 04 12:05
    tahlialouisa deleted #236
  • Mar 30 10:10
    kinglozzer edited #236
  • Mar 28 16:16
    kinglozzer commented #211
  • Mar 28 16:15
    kinglozzer commented #236
  • Mar 28 16:05
    kinglozzer opened #236
Morven Lewis-Everley
@mlewis-everley
Well at the moment you set the payment identifier as a URL param and then retrieve the URL from that
the payment identifier is never sent to the payment gateway
so therefore they never send it back
so you have no payment identifier to retrieve
Roman Schmid
@bummzack
I know. But you'd establish a transaction ID with the payment provider first
Morven Lewis-Everley
@mlewis-everley
if you did that, you would remove the developers ability to add their own transaction ID
for example, on my ecommerce system, we generate an order ID and the payment is linked to the order
then we send the order ID to the payment gateway
Roman Schmid
@bummzack
no… it doesn't matter what the transaction ID is, as long as you can retrieve a payment from that ID
But normally, payment providers supply their own ID, which is the TransactionReference
don't you get that with the barclays gateway?
Morven Lewis-Everley
@mlewis-everley
You can only pass them an OrderID
Roman Schmid
@bummzack
yeah, but you're never able to pass the TransactionReference yourself
you should get that from the payment provider
eg. the omnipay response should contain that
Morven Lewis-Everley
@mlewis-everley
They send you back a PAYID
But that is the reference to the Barclays transaction
so I am not sure how you could use that to identify the omnipay payment
but I guess this won't be established prior to the server-server callback, right?
Either way… with your order ID, you should be able to look up the payment. Right?
Morven Lewis-Everley
@mlewis-everley
Yea I can do it that way, but I would essentially have to write some form of custom handler to retrieve the order and find the payment
which was why I meant I am not sure what I can do on this module
Roman Schmid
@bummzack
Yes. Finding the payment based on the payload from the payment provider has to be customisable…
Morven Lewis-Everley
@mlewis-everley
The only sensible thing I can think of is to create some sort of ResponseFactory
then you can write your own custom PaymentResponse class
and the controller would have to hand over taking payments to that class
sorry, I mean the controller would hand over completing the process
Roman Schmid
@bummzack
I mean, you could also make this part of your ecommerce module instead of the omnipay module… since it's very specific.
Morven Lewis-Everley
@mlewis-everley
Well, I may make it part of this specific project
Roman Schmid
@bummzack
I don't think the architecture has to be that complicated. There's response customisations for notifications in place already
Morven Lewis-Everley
@mlewis-everley
I don't generally work with Barclays :-)
Roman Schmid
@bummzack
for that we just pass the response to extensions which can customise the response for the gateway
Morven Lewis-Everley
@mlewis-everley
Yea, I can write an extension like that once I have the payment (which I can do in my own project using the OrderID)
Morven Lewis-Everley
@mlewis-everley
Right, trying to run unit tests and I get an error
ERROR [User Error]: Uncaught Error: Call to undefined method Mock_PxPayCompleteAuthorizeRequest_5b5460cb::send() IN GET /ss-3/dev Line 105 in /home/morven/Projects/ss-3/omnipay/code/Service/AuthorizeService.php
Trace
=====
SilverStripe\Omnipay\Service\AuthorizeService->complete()
BasePurchaseServiceTest.php:424

BasePurchaseServiceTest->testGatewayCompleteMethodFailure()

ReflectionMethod->invokeArgs(AuthorizeServiceTest,Array)
TestCase.php:987

PHPUnit_Framework_TestCase->runTest()
TestCase.php:838

PHPUnit_Framework_TestCase->runBare()
TestResult.php:648

PHPUnit_Framework_TestResult->run(AuthorizeServiceTest)
TestCase.php:783

PHPUnit_Framework_TestCase->run(PHPUnit_Framework_TestResult)
TestSuite.php:779

PHPUnit_Framework_TestSuite->runTest(AuthorizeServiceTest,PHPUnit_Framework_TestResult)
TestSuite.php:749

PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult,,Array,Array,)
TestSuite.php:708

PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult,,Array,Array,)
TestRunner.php:349

PHPUnit_TextUI_TestRunner->doRun(PHPUnit_Framework_TestSuite,Array)
Command.php:176

PHPUnit_TextUI_Command->run(Array,1)
Command.php:129

PHPUnit_TextUI_Command::main()
phpunit:63
I don't think this is related to anything I have done
Roman Schmid
@bummzack
how do you run the tests?
Morven Lewis-Everley
@mlewis-everley
I have php unit installed via composer
added orders/tests to phpunit.xml
I am also using the sqlite db
I am only running the tests on omnipay directly though
IE: # ./phpunit orders/tests '' db=sqlite3
Sorry, I mean # ./phpunit omnipay/tests '' db=sqlite3
Roman Schmid
@bummzack
have you tried ./vendor/bin/phpunit ./omnipay '' db=sqlite3?
Are you using PHPStorm btw?
tests complete normally if I run it this way…
Morven Lewis-Everley
@mlewis-everley
PHPStorm IDE?