Ejemplo n.º 1
0
 /**
  * @covers OpenBuildings\PayPal\Payment_Adaptive_Simple::action_type
  */
 public function test_action_type()
 {
     $payment = Payment::instance('Adaptive_Simple');
     $this->assertEquals('PAY', $payment->action_type());
     $payment->action_type('CREATE');
     $this->assertEquals('CREATE', $payment->action_type());
 }
Ejemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     $this->payment = Payment::instance('Adaptive_Simple');
     $this->payment->order(array('receiver' => array('email' => '*****@*****.**', 'amount' => 10)));
     $this->payment->config('fees_payer', Payment_Adaptive_Simple::FEES_PAYER_EACHRECEIVER)->config('email', '*****@*****.**');
 }
Ejemplo n.º 3
0
 /**
  * @covers OpenBuildings\PayPal\Payment_Adaptive::common_fields
  */
 public function test_common_fields()
 {
     $this->assertSame(array('requestEnvelope.errorLanguage' => 'en_US', 'requestEnvelope.detailLevel' => 'ReturnAll'), Payment::instance('Adaptive_Simple')->common_fields());
 }
Ejemplo n.º 4
0
 /**
  * @covers OpenBuildings\PayPal\Payment_ExpressCheckout::get_express_checkout_details
  */
 public function test_get_express_checkout_details_require_token()
 {
     $payment = Payment::instance('ExpressCheckout');
     $this->setExpectedException('OpenBuildings\\PayPal\\Exception', 'You must provide a TOKEN parameter for method "OpenBuildings\\PayPal\\Payment_ExpressCheckout::get_express_checkout_details"');
     $payment->get_express_checkout_details(array());
 }
Ejemplo n.º 5
0
 public function test_instance_pattern()
 {
     $this->assertSame(Payment::instance('ExpressCheckout'), Payment::instance('ExpressCheckout'));
 }
Ejemplo n.º 6
0
 public function setUp()
 {
     parent::setUp();
     $this->payment = Payment::instance('ExpressCheckout');
 }