PagamentoCerto
[ class tree: PagamentoCerto ] [ index: PagamentoCerto ] [ all elements ]

Class: Payment_PagamentoCerto

Source Location: /Payment_PagamentoCerto-0.2.3/Payment/PagamentoCerto.php

Class Overview


This class is responsible for sending/receiving requests to/from the payment gateway.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 40]
This class is responsible for sending/receiving requests to/from the payment gateway.

The basic flow of the process of a payment transaction is:

  1. - Create an order (Payment_PagamentoCerto_Order)
  2. - Provide the order object to this class constructor
  3. - Start a transaction with startTransaction() method
  4. - Retrieve the transaction id (in case of failure, an exception is thrown)
  5. - Redirect the user to the payment gateway URL
  6. - After the user is done in the payment gateway, he/she will be redirected back to your store.
  7. - Fetch the transaction ID sent by the payment gateway ($_GET["tid"]) and display information about the order (getTransactionInfo())



[ Top ]


Class Variables

$order =

[line 47]

Object containing order information
  • Access: protected

Type:   mixed


[ Top ]

$paymentGatewayUrl =  'https://www.pagamentocerto.com.br/pagamento/pagamento.aspx'

[line 86]

Payment gateway webservice URL
  • Access: protected

Type:   mixed


[ Top ]

$sellerApiKey =

[line 61]

Seller API key
  • Access: protected

Type:   mixed


[ Top ]

$sellerWebserviceUrl =  'https://www.pagamentocerto.com.br/vendedor/vendedor.asmx?WSDL'

[line 78]

Payment gateway webservice URL
  • Access: protected

Type:   mixed


[ Top ]

$storePostbackUrl =

[line 71]

Postback URL of the store

This is where the payment gateway will redirect the user to, providing the transaction ID via GET

  • Access: protected

Type:   mixed


[ Top ]

$transactionId =

[line 54]

Transaction ID
  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 99]

void __construct( string $sellerApiKey, [string $storePostbackUrl = ''], [string $sellerWebserviceUrl = ''], [string $paymentGatewayUrl = ''])

Class constructor
  • Access: public

Parameters:

string   $sellerApiKey   —  API key (provided by PagamentoCerto)
string   $storePostbackUrl   —  Store postback URL
string   $sellerWebserviceUrl   —  Seller webservice URL
string   $paymentGatewayUrl   —  Payment gateway URL

[ Top ]

getSoapClient   [line 229]

SoapClient getSoapClient( string $url)

Returns an instance of a SoapClient
  • Access: protected

Parameters:

string   $url   —  Webservice URL (WSDL mode)

[ Top ]

getTransactionInfo   [line 155]

Payment_PagamentoCerto_Transaction getTransactionInfo( string $transactionId)

Returns information about a transaction
  • Access: public

Parameters:

string   $transactionId   —  Transaction ID

[ Top ]

getXml   [line 203]

string getXml( )

Returns an XML containing the order information
  • Access: protected

[ Top ]

redirectToPaymentGateway   [line 187]

void redirectToPaymentGateway( string $transactionId)

Redirects the user to the payment gateway
  • Access: public

Parameters:

string   $transactionId   —  Transaction ID

[ Top ]

setSoapClient   [line 217]

void setSoapClient( SoapClient $soapClient)

Sets a user-defined SOAP client
  • Access: public

Parameters:

mixed   $soapClient   —  User-defined SOAP client

[ Top ]

startTransaction   [line 123]

string startTransaction( Payment_PagamentoCerto_Order $order)

Starts a payment transaction and returns the transaction ID
  • Return: Transaction ID
  • Access: public

Parameters:

Payment_PagamentoCerto_Order   $order   —  Order information

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:36:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.