spec/paypal/payment/request_spec.rb in paypal-express-0.3.1 vs spec/paypal/payment/request_spec.rb in paypal-express-0.4.0.alpha
- old
+ new
@@ -29,16 +29,15 @@
:billing_type => :RecurringPayments,
:billing_agreement_description => 'Recurring Payment Request'
)
end
- let :recurring_request_with_reference_transaction do
+ let :reference_transaction_request do
Paypal::Payment::Request.new(
:currency_code => :JPY,
- :billing_type => :RecurringPayments,
- :billing_agreement_description => 'Recurring Payment Request',
- :reference_transactions_billing_type => :MerchantInitiatedBillingSingleAgreement
+ :billing_type => :MerchantInitiatedBillingSingleAgreement,
+ :billing_agreement_description => 'Reference Transaction Request'
)
end
describe '.new' do
it 'should handle Instant Payment parameters' do
@@ -55,13 +54,13 @@
recurring_request.billing_type.should == :RecurringPayments
recurring_request.billing_agreement_description.should == 'Recurring Payment Request'
end
it 'should handle Recurring Payment parameters' do
- recurring_request_with_reference_transaction.currency_code.should == :JPY
- recurring_request_with_reference_transaction.billing_type.should == :RecurringPayments
- recurring_request_with_reference_transaction.billing_agreement_description.should == 'Recurring Payment Request'
+ reference_transaction_request.currency_code.should == :JPY
+ reference_transaction_request.billing_type.should == :MerchantInitiatedBillingSingleAgreement
+ reference_transaction_request.billing_agreement_description.should == 'Reference Transaction Request'
end
end
describe '#to_params' do
it 'should handle Instant Payment parameters' do
@@ -93,18 +92,17 @@
:L_BILLINGTYPE0 => :RecurringPayments,
:L_BILLINGAGREEMENTDESCRIPTION0 => "Recurring Payment Request"
}
end
- it 'should handle Recurring Payment with Reference Transactions parameters' do
- recurring_request_with_reference_transaction.to_params.should == {
+ it 'should handle Reference Transactions parameters' do
+ reference_transaction_request.to_params.should == {
:PAYMENTREQUEST_0_AMT => "0.00",
:PAYMENTREQUEST_0_TAXAMT => "0.00",
:PAYMENTREQUEST_0_SHIPPINGAMT => "0.00",
:PAYMENTREQUEST_0_CURRENCYCODE => :JPY,
- :L_BILLINGTYPE0 => :RecurringPayments,
- :L_BILLINGAGREEMENTDESCRIPTION0 => "Recurring Payment Request",
- :BILLINGTYPE => :MerchantInitiatedBillingSingleAgreement,
+ :L_BILLINGTYPE0 => :MerchantInitiatedBillingSingleAgreement,
+ :L_BILLINGAGREEMENTDESCRIPTION0 => "Reference Transaction Request"
}
end
end
end