Skip to content

Instantly share code, notes, and snippets.

@Daniel-Rafique
Created August 25, 2020 16:04
Show Gist options
  • Save Daniel-Rafique/4800ffba5a1575c33612c57f98170653 to your computer and use it in GitHub Desktop.
Save Daniel-Rafique/4800ffba5a1575c33612c57f98170653 to your computer and use it in GitHub Desktop.
var_dump still in the module
<?php
/**
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future. If you wish to customize the module for your
* needs please contact us to https://www.milople.com/contact-us.html
*
* @category Ecommerce
* @package Milople_Stripe
* @copyright Copyright (c) 2018 Milople Technologies Pvt. Ltd. All Rights Reserved.
* @url https://www.milople.com/magento2-extensions/ecurring-and-subscription-payments-m2.html
*
**/
namespace Milople\Stripe\Controller\Index;
class Index extends \Magento\Framework\App\Action\Action
{
protected $resultJsonFactory;
protected $regionColFactory;
public function __construct(
\Magento\Framework\App\Action\Context $context,
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
\Magento\Directory\Model\RegionFactory $regionColFactory)
{
$this->regionColFactory = $regionColFactory;
$this->resultJsonFactory = $resultJsonFactory;
parent::__construct($context);
}
public function execute()
{
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$partialpaymentHelper = $objectManager->create('Milople\Stripe\Helper\PartialPayment');
$orderid = 6;
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Api\Data\OrderInterface')->load($orderid);
var_dump($partialpaymentHelper->getDownPayment($order));
/* $result = $this->resultJsonFactory->create();
$regions=$this->regionColFactory->create()->getCollection()->addFieldToFilter('country_id',$this->getRequest()->getParam('country'));
$html = '';
if(count($regions) > 0)
{
$html.='<option selected="selected" value="">Please select a region, state or province.</option>';
foreach($regions as $state)
{
$html.= '<option value="'.$state->getName().'">'.$state->getName().'.</option>';
}
}
return $result->setData(['success' => true,'value'=>$html]); */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment