예제 #1
0
function exampleConfigPaymentWay($param)
{
    $moip = new Moip_Api();
    $moip->setEnvironment('test');
    $moip->setCredential(array('key' => 'ABABABABABABABABABABABABABABABABABABABAB', 'token' => '01010101010101010101010101010101'));
    $moip->setUniqueID(false);
    $moip->setValue('100.00');
    $moip->setReason('Teste do Moip-PHP');
    $moip->setPayer(array('name' => 'Nome Sobrenome', 'email' => '*****@*****.**', 'payerId' => 'id_usuario', 'billingAddress' => array('address' => 'Rua do Z�zinho Cora��o', 'number' => '45', 'complement' => 'z', 'city' => 'S�o Paulo', 'neighborhood' => 'Palha�o J�o', 'state' => 'SP', 'country' => 'BRA', 'zipCode' => '01230-000', 'phone' => '(11)8888-8888')));
    $moip->validate('Identification');
    $moip->addPaymentWay('creditCard');
    $moip->addPaymentWay('billet');
    $moip->setBilletConf("2011-04-06", true, array("Primeira linha", "Segunda linha", "Terceira linha"), "http://seusite.com.br/logo.gif");
    print_r($moip->send());
}
예제 #2
0
파일: index.php 프로젝트: davixz/moip-php
<?php

/**
 include_once 'examples.php';

 exampleBasicInstructions();
 exampleFull();
 exampleQueryParcels();
* 
*/
include '../boot.php';
$moip = new Moip_Api();
$moip->setEnvironment(Moip_Environment::ENVIRONMENT_DEV);
$moip->setCredential(array('key' => 'ABABABABABABABABABABABABABABABABABABABAB', 'token' => '01010101010101010101010101010101'));
$moip->setUniqueID(false);
$moip->setValue('100.00');
$moip->setReason('Teste do Moip-PHP');
$moip->validate('Basic');
$moip->send();
echo '<pre>';
print_r($moip->getAnswer());