Get user data for the payment form initialization in JSON format.

@return string
540611
public function printPmData()
    {
        $aData      = $this->collectEshopData();
        $aPrintData = array(
            'phone'               => $this->_findInArray( $aData, 'customer_phoneNumber' ),
            'mobile'              => $this->_findInArray( $aData, 'customer_mobileNumber' ),
            'session_id'          => $this->_findInArray( $aData, 'client_browser_session_id' ),
            'cookie_id'           => $this->_findInArray( $aData, 'client_cookies_id' ),
            'firstName'           => $this->_findInArray( $aData, 'customer_firstName' ),
            'lastName'            => $this->_findInArray( $aData, 'customer_lastName' ),
            'dob'                 => $this->_findInArray( $aData, 'customer_dateOfBirth' ),
            'gender'              => $this->_findInArray( $aData, 'customer_gender' ),
            'email'               => $this->_findInArray( $aData, 'customer_email' ),
            'street'              => $this->_findInArray( $aData, 'customer_billingAddress_street' ),
            'houseNumber'         => $this->_findInArray( $aData, 'customer_billingAddress_houseNo' ),
            'locality'            => $this->_findInArray( $aData, 'customer_billingAddress_city' ),
            'postalCode'          => $this->_findInArray( $aData, 'customer_billingAddress_postalCode' ),
            'country'             => $this->_findInArray( $aData, 'customer_billingAddress_country' ),
            'shippingStreet'      => $this->_findInArray( $aData, 'customer_shippingAddress_street' ),
            'shippingHouseNumber' => $this->_findInArray( $aData, 'customer_shippingAddress_houseNo' ),
            'shippingLocality'    => $this->_findInArray( $aData, 'customer_shippingAddress_city' ),
            'shippingPostalCode'  => $this->_findInArray( $aData, 'customer_shippingAddress_postalCode' ),
            'shippingCountry'     => $this->_findInArray( $aData, 'customer_shippingAddress_country' ),
            'shippingFirstName'   => $this->_findInArray( $aData, 'customer_shippingAddress_firstName' ),
            'shippingLastName'    => $this->_findInArray( $aData, 'customer_shippingAddress_lastName' ),
            'orderAmount'         => $this->_findInArray( $aData, 'order_grossAmount' ),
            'langcode'            => $this->_findInArray( $aData, 'request_languageCode' ),
            'client_ip'           => $this->_findInArray( $aData, 'client_ipAddress' ),
            'currencyCode'        => $this->_findInArray( $aData, 'order_currency' ),
        );

        // Check if there are session fields set and add to print data if available
        $aSessionData = (array) oxRegistry::getSession()->getVariable( 'pm_init_data' );

        if ( !empty( $aSessionData ) ) {
            $aPrintData = array_merge( $aPrintData, $aSessionData );
        }

        return json_encode( $aPrintData );
    }
109371
public function getData()
    {
        parent::getData();

        $this->validate(
            'amount',
            'currency',
            'description',
            'transactionId',
            'type'
        );

        // Direct order.
        if ($this->getType() === 'direct') {
            $this->validate('gateway');
        }

        // When the gateway is set to IDEAL,
        // the issuer parameter is required.
        if ($this->getType() == 'direct' && $this->getGateway() == 'IDEAL') {
            $this->validate('issuer');
        }

        $data = array(
            'amount'           => $this->getAmountInteger(),
            'currency'         => $this->getCurrency(),
            'days_active'      => $this->getDaysActive(),
            'description'      => $this->getDescription(),
            'gateway'          => $this->getGateway(),
            'google_analytics' => $this->getGoogleAnalyticsCode(),
            'items'            => $this->getItemsHtml(),
            'manual'           => $this->getManual(),
            'order_id'         => $this->getTransactionId(),
            'recurring_id'     => $this->getRecurringId(),
            'type'             => $this->getType(),
            'var1'             => $this->getVar1(),
            'var2'             => $this->getVar2(),
            'var3'             => $this->getVar3(),
        );

        $paymentData = $this->getPaymentData();

        if (! empty($paymentData)) {
            $data['payment_options'] = $paymentData;
        }

        $customerData = $this->getCustomerData();

        if (! empty($customerData)) {
            $data['customer'] = $customerData;
        }

        $gatewayData = $this->getGatewayData();

        if (! empty($gatewayData)) {
            $data['gateway_info'] = $gatewayData;
        }

        $getItemBagData = $this->getItemBagData();

        if (! empty($getItemBagData)) {
            $data['shopping_cart']['items'] = $getItemBagData;
        }

        return array_filter($data);
    }
441342
public function getData()
    {
        $this->validate('transactionReference', 'MD', 'PaRes');

        return [
            'opcode'     => 3,
            'payment_id' => $this->getTransactionReference(),
            'PaRes'      => $this->getPaRes(),
            'MD'         => $this->getMD(),
            'token'      => $this->getRequestToken(),
        ];
    }
822648
public function getInitial()
    {
        $initial = [
            (float) $this->InitialRotationH,
            (float) $this->InitialRotationV
        ];
        
        return json_encode($initial);
    }
130409
protected function getPaymentTransactionStructure()
    {
        return [
            'payment_type'       => $this->payment_type,
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'return_success_url' => $this->return_success_url,
            'return_failure_url' => $this->return_failure_url,
            'customer_email'     => $this->customer_email,
            'customer_phone'     => $this->customer_phone,
            'account_number'     => $this->account_number,
            'bank_code'          => $this->bank_code,
            'bic'                => $this->bic,
            'iban'               => $this->iban,
            'account_phone'      => $this->account_phone,
            'billing_address'    => $this->getBillingAddressParamsStructure(),
            'shipping_address'   => $this->getShippingAddressParamsStructure()
        ];
    }
402340
protected function getPaymentTransactionStructure()
    {
        return array_merge(
            parent::getPaymentTransactionStructure(),
            [
                'customer_email'          => $this->customer_email,
                'customer_phone'          => $this->customer_phone,
                'payment_method_category' => $this->payment_method_category,
                'customer_gender'         => $this->customer_gender,
                'billing_address'         => $this->getBillingAddressParamsStructure(),
                'shipping_address'        => $this->getShippingAddressParamsStructure(),
                'return_success_url'      => $this->return_success_url,
                'return_failure_url'      => $this->return_failure_url
            ]
        );
    }
1318572
protected function GetDefaultUserPaymentData()
    {
        $aData = parent::GetDefaultUserPaymentData();
        $aData['creditCardType'] = '';
        $aData['creditCardNumber'] = '';

        $oUser = TdbDataExtranetUser::GetInstance();
        $oBillingAdr = $oUser->GetBillingAddress();
        $aData['creditCardOwnerName'] = $oBillingAdr->fieldFirstname.' '.$oBillingAdr->fieldLastname;
        $aData['creditCardValidToMonth'] = '';
        $aData['creditCardValidToYear'] = '';
        $aData['creditCardChecksum'] = '';

        $aData['pseudocardpan'] = '';
        $aData['truncatedcardpan'] = '';

        return $aData;
    }
1058763
protected function getBaseAuthorizeData()
    {
        $this->validate('amount', 'card', 'transactionId');

        // Start with the authorisation and API version details.
        $data = $this->getBaseData();

        $data['Description'] = $this->getDescription();

        // Money formatted as major unit decimal.
        $data['Amount'] = $this->getAmount();
        $data['Currency'] = $this->getCurrency();

        $data['VendorData'] = $this->getVendorData();
        $data['VendorTxCode'] = $this->getTransactionId();
        $data['ClientIPAddress'] = $this->getClientIp();

        $data['ApplyAVSCV2'] = $this->getApplyAVSCV2() ?: static::APPLY_AVSCV2_DEFAULT;
        $data['Apply3DSecure'] = $this->getApply3DSecure() ?: static::APPLY_3DSECURE_APPLY;

        if ($this->getReferrerId()) {
            $data['ReferrerID'] = $this->getReferrerId();
        }

        // Billing details

        $data = $this->getBillingAddressData($data);

        // Shipping details

        $data = $this->getDeliveryAddressData($data);

        $card = $this->getCard();

        if ($card->getEmail()) {
            $data['CustomerEMail'] = $card->getEmail();
        }

        if ((bool)$this->getUseOldBasketFormat()) {
            $basket = $this->getItemDataNonXML();

            if (!empty($basket)) {
                $data['Basket'] = $basket;
            }
        } else {
            $basketXML = $this->getItemData();

            if (!empty($basketXML)) {
                $data['BasketXML'] = $basketXML;
            }
        }

        $surchargeXml = $this->getSurchargeXml();

        if ($surchargeXml) {
            $data['surchargeXml'] = $surchargeXml;
        }

        return $data;
    }
1162881
public function getData()
    {
        $this->validate(
            'username',
            'password',
            'transactionId',
            'amount',
            'currency',
            'email',
            'clientMerchantId',
            'firstName',
            'lastName',
            'birthday'
        );

        $document = new \DOMDocument('1.0', 'utf-8');
        $document->formatOutput = false;
        $document->createElement('soapenv:Header');

        $envelope = $document->appendChild(
            $document->createElementNS('http://schemas.xmlsoap.org/soap/envelope/', 'soapenv:Envelope')
        );
        $envelope->setAttribute('xmlns:urn', 'urn:pscservice');

        $body = $envelope->appendChild(
            $document->createElement('soapenv:Body')
        );

        $payout = $body->appendChild(
            $document->createElement('urn:payout')
        );

        $payout->appendChild(
            $document->createElement('urn:username', $this->getUsername())
        );

        $payout->appendChild(
            $document->createElement('urn:password', $this->getPassword())
        );

        $payout->appendChild(
            $document->createElement('urn:ptid', $this->getTransactionId())
        );

        $payout->appendChild(
            $document->createElement('urn:subId', $this->getSubId())
        );

        $payout->appendChild(
            $document->createElement('urn:amount', $this->getAmount())
        );

        $payout->appendChild(
            $document->createElement('urn:currency', $this->getCurrency())
        );

        $payout->appendChild(
            $document->createElement('urn:customerIdType', 'EMAIL')
        );

        $payout->appendChild(
            $document->createElement('urn:customerId', $this->getEmail())
        );

        $payout->appendChild(
            $document->createElement('urn:merchantClientId', $this->getClientMerchantId())
        );

        $payout->appendChild(
            $document->createElement('urn:validationOnly', $this->getValidationOnly())
        );

        $payout->appendChild(
            $document->createElement('urn:utcOffset', $this->getUtcOffset())
        );

        $customer = $payout->appendChild(
            $document->createElement('urn:customerDetailsBasic')
        );

        $customer->appendChild(
            $document->createElement('urn:firstName', $this->getFirstName())
        );

        $customer->appendChild(
            $document->createElement('urn:lastName', $this->getLastName())
        );

        $customer->appendChild(
            $document->createElement('urn:dateOfBirth', $this->getBirthday())
        );

        return $document->saveXML();
    }
1138126
public function getData ()
	{
		
		// PaymentMethod independant checks
		$this->validate( 'transactionReference', 'currency', 'siteId', 'amount', 'description', 'returnUrl', 
				'notifyUrl', 'ipaddress' );
		
		// PaymentMethod specific checks
		$this->validatePaymentMethodSpecific();
		
		// Transaction data
		$data = array( 
				'ref' => $this->getTransactionReference(), 
				'currency' => $this->getCurrency(), 
				'site_id' => $this->getSiteId(), 
				'amount' => $this->getAmountInteger(), 
				'description' => $this->getDescription(), 
				'control_url' => $this->getNotifyUrl(), 
				'return_url' => $this->getReturnUrl(), 
				'return_url_failed' => $this->getCancelUrl(), 
				'ip_address' => $this->getIpAddress(), 
				'language' => $this->getLanguage() 
		);
		if ( $this->getPaymentMethod() == 'ideal' ) {
			$data['issuer_id'] = $this->getIssuer();
		}
		
		// Customer data
		$customerData = new CreditCard( $_POST );
		if ( $customerData && strlen( $customerData->getFirstName() ) && strlen( $customerData->getLastName() ) ) {
			$data['customer'] = array( 
					'first_name' => $customerData->getFirstName(), 
					'last_name' => $customerData->getLastName(), 
					'company_name' => $customerData->getCompany(), 
					'address' => $customerData->getAddress1(), 
					'city' => $customerData->getCity(), 
					'state' => $customerData->getState(), 
					'postal_code' => $customerData->getPostcode(), 
					'country_code' => $customerData->getCountry(), 
					'phone_number' => $customerData->getPhone(), 
					'email' => $customerData->getEmail() 
			);
		}
		
		return $data;
	}
876758
protected function getPaymentTransactionStructure()
    {
        return [
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'customer_email'     => $this->customer_email,
            'customer_phone'     => $this->customer_phone,
            'holder_name'        => $this->holder_name,
            'iban'               => $this->iban,
            'swift_code'         => $this->swift_code,
            'account_number'     => $this->account_number,
            'bank_name'          => $this->bank_name,
            'bank_city'          => $this->bank_city,
            'bank_code'          => $this->bank_code,
            'branch_code'        => $this->branch_code,
            'branch_check_digit' => $this->branch_check_digit,
            'billing_address'    => $this->getBillingAddressParamsStructure(),
            'shipping_address'   => $this->getShippingAddressParamsStructure()
        ];
    }
1152603
public function getWindowPickerData()
    {
        $data = array();

        foreach ($this->getSellerHubRefsAsSeller() as $sellerHubRef) {
            foreach ($sellerHubRef->getSellerWindows() as $window) {
                $data[$sellerHubRef->getHub()->getName()][$window->getStartTime()->format('D j M')][$window->getStartTime()->format('H:i')] = $window->getId();
            }
        }

        return json_encode($data);
    }
1006767
protected function initUserAttributes()
    {
        $attributes = $this->api('account/verify_credentials.json', 'GET');

        $return_attributes = [
            'User' => [
                $this->email        => '',
                $this->first_name   => $attributes['name'],
                $this->avatar       => '',
                $this->gender       => $this->male,
                $this->status       => $this->statusActive
            ],
            'provider_user_id' => $attributes['id'],
            'provider_id' => UserOauthKey::getAvailableClients()['twitter'],
            'page' => $attributes['screen_name'],
        ];

        return $return_attributes;
    }
823071
final protected static function initialJSON()
    {
        $base = __DIR__."/../../";
        $f = json_decode(file_get_contents($base."/elements/config_files/core/framework.config.json"));
        $f->installation = new \DateTime();
        $f->location = realpath($base);
        $f->default_env = "dev";
        $rs = json_encode($f, JSON_PRETTY_PRINT);
        file_put_contents($base."/elements/config_files/core/framework.config.json", $rs);
    }
965001
public function initialize()
    {
        return !is_null($this->transactionRef) ?
           $this->getTransactionResource()->initialize($this->_requestPayload()) :
            new PaystackInvalidTransactionException(
                json_decode(
                    json_encode(
                        [
                            'message' => 'Transaction Reference Not Generated.',
                        ]
                    ),
                    false
                )
            );
    }
918968
public function getUserPayments()
    {
        if ($this->_oUserPayments == null) {
            $this->_oUserPayments = false;
            if ($oUser = $this->getUser()) {
                $sTplLang = \OxidEsales\Eshop\Core\Registry::getLang()->getObjectTplLanguage();
                $sPaymentId = $this->getPaymentId();
                $this->_oUserPayments = $oUser->getUserPayments();
                // generate selected
                foreach ($this->_oUserPayments as $oUserPayment) {
                    $oPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
                    $oPayment->setLanguage($sTplLang);
                    $oPayment->load($oUserPayment->oxuserpayments__oxpaymentsid->value);
                    $oUserPayment->oxpayments__oxdesc = clone $oPayment->oxpayments__oxdesc;
                    if ($oUserPayment->oxuserpayments__oxid->value == $sPaymentId) {
                        $oUserPayment->selected = 1;
                        break;
                    }
                }
            }
        }

        return $this->_oUserPayments;
    }
591996
public function collectCommonData()
    {
        /** @var OxpsPaymorrowSettings $oPmSettings */
        $oPmSettings = oxNew( 'OxpsPaymorrowSettings' );

        /** @var oxUser|OxpsPaymorrowOxUser $oUser */
        $oUser = $this->getUser();

        return array(
            'merchantId'           => $oPmSettings->getMerchantId(),
            'mpiSignature'         => $oPmSettings->getMpiSignature(),
            'request_languageCode' => $oUser->getUserPaymorrowRequestLanguage(),
            'request_id'           => $this->getUniqueString(),
        );
    }