spec/integration/test_helper.rb in mundipagg_sdk-1.0.0 vs spec/integration/test_helper.rb in mundipagg_sdk-1.0.1

- old
+ new

@@ -37,11 +37,11 @@ parser = Nori.new(:convert_tags_to => lambda { |tag| tag }) hash = parser.parse(xml) credit_card_result = create_order_result['CreditCardTransactionResultCollection'][0] - manage_transaction_reuslt = manage_order_result['CreditCardTransactionResultCollection'][0] + manage_transaction_result = manage_order_result['CreditCardTransactionResultCollection'][0] root = hash['StatusNotification'] root['AmountPaidInCents'] = 0 root['CreditCardTransaction'] = { @@ -55,15 +55,15 @@ 'TransactionIdentifier' => Array.new(12){[*'0'..'9', *'A'..'Z'].sample}.join, 'TransactionKey'=> credit_card_result['TransactionKey'], 'TransactionReference'=> credit_card_result['TransactionReference'], 'UniqueSequentialNumber' => Array.new(6){[*'0'..'9'].sample}.join, 'PreviousCreditCardTransactionStatus' => credit_card_result['CreditCardTransactionStatus'], - 'CreditCardTransactionStatus' => manage_transaction_reuslt['CreditCardTransactionStatus'] + 'CreditCardTransactionStatus' => (manage_transaction_result.nil? == true) ? 'null' : manage_transaction_result['CreditCardTransactionStatus'] } root['MerchantKey'] = create_order_result['MerchantKey'] root['OrderKey'] = create_order_result['OrderResult']['OrderKey'] root['OrderReference'] = create_order_result['OrderResult']['OrderReference'] - root['OrderStatus'] = manage_transaction_reuslt['CreditCardTransactionStatus'] + root['OrderStatus'] = (manage_transaction_result.nil? == true) ? 'null' : manage_transaction_result['CreditCardTransactionStatus'] return CGI::escapeHTML(Gyoku.xml(hash)) end end \ No newline at end of file