PHP 인터페이스 Sonata\Component\Payment\PaymentInterface

파일 보기 프로젝트 열기: sonata-project/ecommerce 0 사용 예제들

공개 메소드들

메소드 설명
applyTransactionId ( Sonata\Component\Payment\TransactionInterface $transaction ) return the transaction id from the bank.
callback ( Sonata\Component\Payment\TransactionInterface $transaction ) : Response
encodeString ( string $value ) : string encode value for the bank.
getCode ( ) : string
getName ( ) : string
getOrderReference ( Sonata\Component\Payment\TransactionInterface $transaction ) : string return the order reference from the transaction.
getTransformer ( $name ) : BaseTransformer Gets the transformer for $name.
handleError ( Sonata\Component\Payment\TransactionInterface $transaction ) : Response Method called when an error occurs.
isAddableProduct ( Sonata\Component\Basket\BasketInterface $basket, Sonata\Component\Product\ProductInterface $product ) return true if the product can be added to the basket.
isBasketValid ( Sonata\Component\Basket\BasketInterface $basket ) : boolean return true is the basket is valid for the current bank gateway.
isCallbackValid ( Sonata\Component\Payment\TransactionInterface $transaction ) : boolean
isRequestValid ( Sonata\Component\Payment\TransactionInterface $transaction ) : boolean Test if the request variables are valid for the current request.
sendConfirmationReceipt ( Sonata\Component\Payment\TransactionInterface $transaction ) : Response,,Symfony\Component\HttpFoundation Send post back confirmation to the bank when the bank callback the site.
sendbank ( Sonata\Component\Order\OrderInterface $order ) : Response Send information to the bank, this method should handle everything when called.

메소드 상세

applyTransactionId() 공개 메소드

return the transaction id from the bank.
public applyTransactionId ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

callback() 공개 메소드

public callback ( Sonata\Component\Payment\TransactionInterface $transaction ) : Response
$transaction Sonata\Component\Payment\TransactionInterface
리턴 Symfony\Component\HttpFoundation\Response

encodeString() 공개 메소드

encode value for the bank.
public encodeString ( string $value ) : string
$value string
리턴 string the encoded value

getCode() 공개 메소드

public getCode ( ) : string
리턴 string

getName() 공개 메소드

public getName ( ) : string
리턴 string

getOrderReference() 공개 메소드

return the order reference from the transaction.
public getOrderReference ( Sonata\Component\Payment\TransactionInterface $transaction ) : string
$transaction Sonata\Component\Payment\TransactionInterface
리턴 string

getTransformer() 공개 메소드

Gets the transformer for $name.
public getTransformer ( $name ) : BaseTransformer
$name
리턴 Sonata\Component\Transformer\BaseTransformer

handleError() 공개 메소드

Method called when an error occurs.
public handleError ( Sonata\Component\Payment\TransactionInterface $transaction ) : Response
$transaction Sonata\Component\Payment\TransactionInterface
리턴 Symfony\Component\HttpFoundation\Response

isAddableProduct() 공개 메소드

return true if the product can be added to the basket.
public isAddableProduct ( Sonata\Component\Basket\BasketInterface $basket, Sonata\Component\Product\ProductInterface $product )
$basket Sonata\Component\Basket\BasketInterface
$product Sonata\Component\Product\ProductInterface

isBasketValid() 공개 메소드

return true is the basket is valid for the current bank gateway.
public isBasketValid ( Sonata\Component\Basket\BasketInterface $basket ) : boolean
$basket Sonata\Component\Basket\BasketInterface
리턴 boolean

isCallbackValid() 공개 메소드

public isCallbackValid ( Sonata\Component\Payment\TransactionInterface $transaction ) : boolean
$transaction Sonata\Component\Payment\TransactionInterface
리턴 boolean true if callback ok else false

isRequestValid() 공개 메소드

WARNING : this methods does not check if the callback is valid
public isRequestValid ( Sonata\Component\Payment\TransactionInterface $transaction ) : boolean
$transaction Sonata\Component\Payment\TransactionInterface
리턴 boolean true if all parameter are ok

sendConfirmationReceipt() 공개 메소드

Send post back confirmation to the bank when the bank callback the site.
public sendConfirmationReceipt ( Sonata\Component\Payment\TransactionInterface $transaction ) : Response,,Symfony\Component\HttpFoundation
$transaction Sonata\Component\Payment\TransactionInterface
리턴 Response,,Symfony\Component\HttpFoundation

sendbank() 공개 메소드

Send information to the bank, this method should handle everything when called.
public sendbank ( Sonata\Component\Order\OrderInterface $order ) : Response
$order Sonata\Component\Order\OrderInterface
리턴 Symfony\Component\HttpFoundation\Response