PHP Class Sonata\Component\Payment\Paypal

Inheritance: extends BasePaypal
显示文件 Open project: sonata-project/ecommerce Class Usage Examples

Public Methods

Method Description
encrypt ( $hash ) : string Default encryption method.
getPendingReasonsList ( ) : array
handleError ( Sonata\Component\Payment\TransactionInterface $transaction )
isAddableProduct ( Sonata\Component\Basket\BasketInterface $basket, Sonata\Component\Product\ProductInterface $product )
isBasketValid ( Sonata\Component\Basket\BasketInterface $basket )
isCallbackValid ( Sonata\Component\Payment\TransactionInterface $transaction ) From paypal documentation:.
sendConfirmationReceipt ( Sonata\Component\Payment\TransactionInterface $transaction )
sendbank ( Sonata\Component\Order\OrderInterface $order )

Method Details

encrypt() public method

Default encryption method.
public encrypt ( $hash ) : string
$hash
return string

getPendingReasonsList() public static method

public static getPendingReasonsList ( ) : array
return array

handleError() public method

public handleError ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

isAddableProduct() public method

public isAddableProduct ( Sonata\Component\Basket\BasketInterface $basket, Sonata\Component\Product\ProductInterface $product )
$basket Sonata\Component\Basket\BasketInterface
$product Sonata\Component\Product\ProductInterface

isBasketValid() public method

public isBasketValid ( Sonata\Component\Basket\BasketInterface $basket )
$basket Sonata\Component\Basket\BasketInterface

isCallbackValid() public method

1. A customer payment or a refund triggers IPN. This payment can be via Website Payments Standard FORMs or via the PayPal Web Services APIs for Express Checkout, MassPay, or RefundTransaction. If the payment has a “Pending” status, you receive another IPN when the payment clears, fails, or is denied. 2. PayPal posts HTML FORM variables to a program at a URL you specify. You can specify this URL either in your Profile or with the notify_url variable on each transaction. This post is the heart of IPN. Included in the notification is the customer’s payment information (such as customer name, payment amount). All possible variables in IPN posts are detailed in . When your server receives a notification, it must process the incoming data. 3. Your server must then validate the notification to ensure that it is legitimate. {@inheritdoc}
public isCallbackValid ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

sendConfirmationReceipt() public method

public sendConfirmationReceipt ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

sendbank() public method

public sendbank ( Sonata\Component\Order\OrderInterface $order )
$order Sonata\Component\Order\OrderInterface