public function testOutList() { $a = $this->object->downloadISOCodes(); $b = $a['currency']; foreach ($this->object->str2code as $key => $value) { $name = $b[$key]['name']; //echo "\$this->insert('{{%currency}}',['currency'=>'$key','currency_code'=>'$value','name'=>'$name','created_at'=>1,'updated_at'=>1]);\n"; } // self::assertCount(5, $a); // self::assertTrue(isset($a["country"]["POLAND"])); // $poland = $a["country"]["POLAND"]; // self::assertEquals('PLN',$poland['currency']); // self::assertEquals(985,$poland['code']); // self::assertEquals('Zloty',$poland['name']); // self::assertEquals(2,$poland['minor_unit']); }
public function getOutput() { $output = array(); $output["returnUrl"] = $this->returnUrl; $output["cancelUrl"] = $this->cancelUrl; $output["ipnNotificationUrl"] = $this->ipnUrl; $output["memo"] = $this->memo; if (isset($this->localeCode)) { $output["localeCode"] = LocaleCode::ConstantToString($this->localeCode); } if (isset($this->currencyCode)) { $output["currencyCode"] = CurrencyCode::ConstantToString($this->currencyCode); } $this->sender->addSenderToOutput($output); Receiver::addReceiversToOutput($this->receivers, $output); OrderItem::addOrderItemsToOutput($this->orderItems, $output); if (isset($this->fundingConstraints)) { FundingConstraint::addConstraintsToOutput($this->fundingConstraints, $output); if (in_array(FundingConstraint::INVOICE, $this->fundingConstraints) and isset($this->invoiceFee)) { $output["invoiceFee"] = $this->invoiceFee; } } if (isset($this->custom)) { $output["custom"] = $this->custom; } if (isset($this->trackingId)) { $output["trackingId"] = $this->trackingId; } if (isset($this->feesPayer)) { $output["feesPayer"] = FeesPayer::ConstantToString($this->feesPayer); } if (isset($this->guaranteeOffered)) { $output["guaranteeOffered"] = GuaranteeOffered::ConstantToString($this->guaranteeOffered); } return $output; }
/** * The currency code. * @return CurrencyCode */ public function currencyCode() { if ( $this->currencyCode == null ) { $this->currencyCode = CurrencyCode::create( 'USD' ); } return $this->currencyCode; }