Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phortune/provider/PhortunePaypalPaymentProvider.php
Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | switch ($controller->getAction()) { | ||||
)); | )); | ||||
$cancel_uri = $this->getControllerURI( | $cancel_uri = $this->getControllerURI( | ||||
'cancel', | 'cancel', | ||||
array( | array( | ||||
'cartID' => $cart->getID(), | 'cartID' => $cart->getID(), | ||||
)); | )); | ||||
$total_in_cents = $cart->getTotalPriceInCents(); | $price = $cart->getTotalPriceAsCurrency(); | ||||
$price = PhortuneCurrency::newFromUSDCents($total_in_cents); | |||||
$result = $this | $result = $this | ||||
->newPaypalAPICall() | ->newPaypalAPICall() | ||||
->setRawPayPalQuery( | ->setRawPayPalQuery( | ||||
'SetExpressCheckout', | 'SetExpressCheckout', | ||||
array( | array( | ||||
'PAYMENTREQUEST_0_AMT' => $price->formatBareValue(), | 'PAYMENTREQUEST_0_AMT' => $price->formatBareValue(), | ||||
'PAYMENTREQUEST_0_CURRENCYCODE' => $price->getCurrency(), | 'PAYMENTREQUEST_0_CURRENCYCODE' => $price->getCurrency(), | ||||
Show All 37 Lines |