spec/refund_spec.rb in iyzipay-1.0.31 vs spec/refund_spec.rb in iyzipay-1.0.32
- old
+ new
@@ -5,20 +5,21 @@
RSpec.describe 'Iyzipay' do
before :all do
@options = Iyzipay::Options.new
@options.api_key = 'your api key'
@options.secret_key = 'your secret key'
- @options.base_url = 'https://api.iyzipay.com'
+ @options.base_url = 'https://sandbox-api.iyzipay.com'
end
it 'should refund payment' do
request = {
locale: 'tr',
conversationId: '123456789',
paymentTransactionId: '702',
price: '0.1',
- ip: '85.34.78.112'
+ ip: '85.34.78.112',
+ currency: Iyzipay::Model::Currency::TRY
}
refund = Iyzipay::Model::Refund.new.create(request, @options)
begin
$stderr.puts refund.inspect
rescue
@@ -31,10 +32,11 @@
request = {
locale: 'tr',
conversationId: '123456789',
paymentTransactionId: '258',
price: '0.1',
- ip: '85.34.78.112'
+ ip: '85.34.78.112',
+ currency: Iyzipay::Model::Currency::TRY
}
refund = Iyzipay::Model::RefundChargedFromMerchant.new.create(request, @options)
begin
$stderr.puts refund.inspect
rescue
\ No newline at end of file