setPayMethod

@access        public
@param        $payMethod string
@return        boolean
330112
public function setPayMethod($payMethod)
    {
        $payMethod = strtoupper($payMethod);
        switch ($payMethod) {
            case 'CCVISAMC':
                $this->payMethod = 'CCVISAMC';
                $retval = true;
                break;

            case 'CCAMEX':
                $this->payMethod = 'CCAMEX';
                $retval = true;
                break;

            case 'CCDINERS':
                $this->payMethod = 'CCDINERS';
                $retval = true;
                break;

            case 'CCJCB':
                $this->payMethod = 'CCJCB';
                $retval = true;
                break;

            case 'WIRE':
                $this->payMethod = 'WIRE';
                $retval = true;
                break;

            case 'CASH':
                $this->payMethod = 'CASH';
                $retval = true;
                break;

            default:
                $this->payMethod = null;
                $retval = false;
        }

        return $retval;
    }
633388
public function setExpressCheckout($request)
    {
        $caller = $this->getCaller();
        $caller->setRequest($request);

        $response = oxNew(\OxidEsales\PayPalModule\Model\Response\ResponseSetExpressCheckout::class);
        $response->setData($caller->call('SetExpressCheckout'));

        return $response;
    }
1110761
public function setPaymentMethod(ComSubscriptionsDomainPaymentMethodInterface $method)
    {
        $this->_payment_method = $method;
        $this->method = (string) $method;

        return $this;
    }
691026
public function doExpressCheckoutPayment($request)
    {
        $caller = $this->getCaller();
        $caller->setRequest($request);

        $response = oxNew(\OxidEsales\PayPalModule\Model\Response\ResponseDoExpressCheckoutPayment::class);
        $response->setData($caller->call('DoExpressCheckoutPayment'));

        return $response;
    }
1233715
public function setExpressCheckout($data, $subscription = false)
    {
        $this->setItemSubTotal($data);

        $this->post = $this->setCartItems($data['items'])->merge([
            'PAYMENTREQUEST_0_ITEMAMT'       => $this->subtotal,
            'PAYMENTREQUEST_0_AMT'           => $data['total'],
            'PAYMENTREQUEST_0_PAYMENTACTION' => $this->paymentAction,
            'PAYMENTREQUEST_0_CURRENCYCODE'  => $this->currency,
            'PAYMENTREQUEST_0_DESC'          => $data['invoice_description'],
            'PAYMENTREQUEST_0_INVNUM'        => $data['invoice_id'],
            'NOSHIPPING'                     => 1,
            'RETURNURL'                      => $data['return_url'],
            'CANCELURL'                      => $data['cancel_url'],
            'LOCALE'                         => $this->locale,
        ]);

        $this->setShippingAmount($data);

        $this->setShippingDiscount($data);

        $this->setExpressCheckoutRecurringPaymentConfig($data, $subscription);

        $response = $this->doPayPalRequest('SetExpressCheckout');

        return collect($response)->merge([
            'paypal_link' => !empty($response['TOKEN']) ? $this->config['gateway_url'].'/webscr?cmd=_express-checkout&token='.$response['TOKEN'] : null,
        ])->toArray();
    }
1075350
def __set_method(self, value):
        '''
        
        '''
        if value not in [PAYMENT_METHOD_OTHER, PAYMENT_METHOD_CARD,
                         PAYMENT_METHOD_CHEQUE, PAYMENT_METHOD_CASH, ]:
            raise ValueError('Invalid amount value')

        self.__method = value
982674
public function setAutoOnPaymentMethod($accountID, $paymentMethodID, $auto)
    {
        return $this->httpHelper->patch("/accounts/" . intval($accountID) . "/payment_methods/" . intval($paymentMethodID) . "/toggle_auto", [
            'auto' => (boolean)$auto
        ]);
    }
124986
public function sendPreApprovalPaymentMethod(array $paymentSettings)
    {
        if (empty($this->billingAddress)) {
            $this->setBillingAddress([]);
        }
        $this->validatePaymentSettings($paymentSettings);

        $data = $this->formatPreApprovalPaymentMethodData($paymentSettings);

        return (string) $this->sendJsonTransaction($data, $this->url['preApproval'].'/'.$this->preApprovalCode.'/payment-method', 'PUT');
    }
258133
public function setPaymentMethod($value)
    {
        if (!$this->_isNumericArray($value)) {
            $value = array ($value);
        }
        $this->_fields['PaymentMethod']['FieldValue'] = $value;
        return $this;
    }
1182728
public function isPaymentActive()
    {
        $result = false;
        if ($payPalPayment = $this->getPayment()) {
            $result = $payPalPayment->oxpayments__oxactive->value ? true : false;
        }

        return $result;
    }
1212665
public static function setPayStatus($orderId, $paymentId, $status, $params)
    {
        if (($model = static::findOne(['id' => $orderId])) != null && $status == true) {
            $coin = static::getCoin($model->money, $model->currency);
            coin($model->user_id, 'purchase', $coin);
            return true;
        }
        return false;
    }
1354381
public function add(HpsPayPlanPaymentMethod $paymentMethod)
    {
        $result = null;
        if ($paymentMethod->paymentMethodType == HpsPayPlanPaymentMethodType::ACH) {
            $result = $this->addACH($paymentMethod);
        } else {
            $result = $this->addCreditCard($paymentMethod);
        }
        return $this->hydrateObject($result, 'HpsPayPlanPaymentMethod');
    }
92996
public function _resetPaymentMethod( array $aPostData )
    {
        $oSession = oxRegistry::getSession();

        if ( $oSession->getVariable( 'paymentid' ) and
             array_key_exists( 'paymentid', $aPostData ) and
             ( $oSession->getVariable( 'paymentid' ) != $aPostData['paymentid'] )
        ) {
            // Remove previous method from sessions
            $oSession->deleteVariable( 'paymentid' );

            // Adjust basket by removing payment surcharge and recalculating the basket
            $oBasket = $oSession->getBasket();
            $oBasket->setPayment();
            $oBasket->setCost( 'oxpayment' );
            $oBasket->calculateBasket( true );
        }
    }
594582
public function onPaymentDone(PaymentEvent $event)
    {
        $payment = $event->getPayment();
        if (!$payment instanceof OrderPayment) {
            return;
        }

        $order = $payment->getOrder();
        if ($order->getLocked()) {
            $order->setLocked(false);
            $this->updateOrder($order, $event);
        }

        $returnPath = null;
        $details = $payment->getDetails();
        if (array_key_exists('done_redirect_path', $details)) {
            $returnPath = $details['done_redirect_path'];
        } else {
            $type = $order->getType();
            if ($type === OrderTypes::TYPE_CART) {
                $returnPath = $this->urlGenerator->generate('ekyna_cart_payment');
            } elseif ($type === OrderTypes::TYPE_QUOTE) {
                throw new \BadMethodCallException('Not yet implemented');
            } elseif ($type === OrderTypes::TYPE_ORDER) {
                if ($this->authorization->isGranted('ROLE_ADMIN')) {
                    $returnPath = $this->urlGenerator->generate(
                        'ekyna_order_order_admin_show',
                        array('orderId' => $order->getId())
                    );
                } else {
                    $returnPath = $this->urlGenerator->generate(
                        'ekyna_cart_confirmation',
                        array(
                            'orderKey' => $order->getKey(),
                            'paymentId' => $payment->getId(),
                        )
                    );
                }
            }
        }

        if (null === $returnPath) {
            throw new LogicException('Unable to determine return path.');
        }

        $event->setResponse(new RedirectResponse($returnPath));
    }
478074
protected function _isInvalidKcp($paymentMethod, $amountValue)
    {
        if ($paymentMethod == Adyen_Payment_Model_Adyen_Hpp::KCP_CREDITCARD
            || $paymentMethod == Adyen_Payment_Model_Adyen_Hpp::KCP_BANKTRANSFER
        ) {
            if ($amountValue == 0) {
                return true;
            }
        }

        return false;
    }
748743
public function getOrderPaymentSetter()
    {
        if (is_null($this->payPalIPNPaymentSetter)) {
            $payPalIPNPaymentSetter = oxNew(\OxidEsales\PayPalModule\Model\IPNRequestPaymentSetter::class);
            $this->setOrderPaymentSetter($payPalIPNPaymentSetter);
        }

        return $this->payPalIPNPaymentSetter;
    }
1199447
public function execute($paymentId)
    {
        $url    = $this->environment->getApiUrl() . '1/sales/' . $paymentId . '/' . $this->type;
        $params = [];

        if ($this->amount != null) {
            $params['amount'] = $this->amount;
        }

        if ($this->serviceTaxAmount != null) {
            $params['serviceTaxAmount'] = $this->serviceTaxAmount;
        }

        $url .= '?' . http_build_query($params);

        return $this->sendRequest('PUT', $url);
    }