Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successful PDT response does not show as successful #4

Open
georgeboot opened this issue Mar 23, 2015 · 2 comments
Open

Successful PDT response does not show as successful #4

georgeboot opened this issue Mar 23, 2015 · 2 comments

Comments

@georgeboot
Copy link

When I run completePurchase() in the returnUrl, $response->isSuccessful() gives false.
My $response shows the following (it looks like the break on \n doesn't work propper:

object(Omnipay\PayFast\Message\CompletePurchasePdtResponse)[799]
protected 'status' => string 'SUCCESS
m_payment_id=order_123456
pf_payment_id=159175
payment_status=COMPLETE
item_name=Test
item_description=
amount_gross=10.00
amount_fee=-0.23
amount_net=9.77
custom_str1=
custom_str2=
custom_str3=
custom_str4=
custom_str5=
custom_int1=
custom_int2=
custom_int3=
custom_int4=
custom_int5=
name_first=Test
name_last=User+01
email_address=sbtu01%40payfast.co.za
merchant_id=10000103
' (length=386)
  protected 'request' => 
    object(Omnipay\PayFast\Message\CompletePurchaseRequest)[794]
      protected 'liveEndpoint' => string 'https://www.payfast.co.za/eng' (length=29)
      protected 'testEndpoint' => string 'https://sandbox.payfast.co.za/eng' (length=33)
      protected 'parameters' => 
        object(Symfony\Component\HttpFoundation\ParameterBag)[797]
          protected 'parameters' => 
            array (size=4)
              ...
      protected 'httpClient' => 
        object(Guzzle\Http\Client)[787]
          protected 'defaultHeaders' => 
            object(Guzzle\Common\Collection)[789]
              ...
          protected 'userAgent' => string 'Guzzle/3.9.3 curl/7.35.0 PHP/5.6.6-1+deb.sury.org~trusty+1' (length=58)
          private 'config' => 
            object(Guzzle\Common\Collection)[788]
              ...
          private 'baseUrl' => string '' (length=0)
          private 'curlMulti' => 
            object(Guzzle\Http\Curl\CurlMultiProxy)[811]
              ...
          private 'uriTemplate' => 
            object(Guzzle\Parser\UriTemplate\UriTemplate)[798]
              ...
          protected 'requestFactory' => 
            object(Guzzle\Http\Message\RequestFactory)[790]
              ...
          protected 'eventDispatcher' => 
            object(Symfony\Component\EventDispatcher\EventDispatcher)[793]
              ...
      protected 'httpRequest' => 
        object(Illuminate\Http\Request)[4]
          protected 'json' => null
          protected 'sessionStore' => null
          public 'attributes' => 
            object(Symfony\Component\HttpFoundation\ParameterBag)[7]
              ...
          public 'request' => 
            object(Symfony\Component\HttpFoundation\ParameterBag)[5]
              ...
          public 'query' => 
            object(Symfony\Component\HttpFoundation\ParameterBag)[6]
              ...
          public 'server' => 
            object(Symfony\Component\HttpFoundation\ServerBag)[10]
              ...
          public 'files' => 
            object(Symfony\Component\HttpFoundation\FileBag)[9]
              ...
          public 'cookies' => 
            object(Symfony\Component\HttpFoundation\ParameterBag)[8]
              ...
          public 'headers' => 
            object(Symfony\Component\HttpFoundation\HeaderBag)[11]
              ...
          protected 'content' => null
          protected 'languages' => null
          protected 'charsets' => null
          protected 'encodings' => null
          protected 'acceptableContentTypes' => 
            array (size=5)
              ...
          protected 'pathInfo' => string '/testGatewayReturn' (length=18)
          protected 'requestUri' => string '/testGatewayReturn?pt=8e143d88-7da5-0f2f-dc60-f8345023ff1b' (length=58)
          protected 'baseUrl' => string '' (length=0)
          protected 'basePath' => null
          protected 'method' => string 'GET' (length=3)
          protected 'format' => null
          protected 'session' => 
            object(Illuminate\Session\Store)[167]
              ...
          protected 'locale' => null
          protected 'defaultLocale' => string 'en' (length=2)
      protected 'response' => 
        &object(Omnipay\PayFast\Message\CompletePurchasePdtResponse)[799]
  protected 'data' => 
    array (size=1)
      'SUCCESS
m_payment_id' => string 'order_123456
pf_payment_id=159175
payment_status=COMPLETE
item_name=Test
item_description=
amount_gross=10.00
amount_fee=-0.23
amount_net=9.77
custom_str1=
custom_str2=
custom_str3=
custom_str4=
custom_str5=
custom_int1=
custom_int2=
custom_int3=
custom_int4=
custom_int5=
name_first=Test
name_last=User 01
email_address=sbtu01@payfast.co.za
merchant_id=10000103
' (length=363)
@hillelcoren
Copy link

It looks like this has been corrected, however the change was made after the last PayFast release (v2.1.1...master). Are there any plans to create a new PayFast release?

@shalomleib
Copy link

Hi, this change was made after the last PayFast release (v2.1.1...master).

Are there any plans to create a new PayFast release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants